English | Site Directory

Android - An Open Handset Alliance Project

android.database
public class

android.database.ArrayListCursor

java.lang.Object
android.database.AbstractCursor Cursor
android.database.ArrayListCursor

A convenience class that presents a two-dimensional ArrayList as a Cursor.

Summary

Fields inherited from class android.database.AbstractCursor

Public Constructors

          ArrayListCursor(String[] columnNames, ArrayList rows)

Public Methods

        int  count()
Returns the numbers of rows in the cursor.
        boolean  deleteRow()
Removes the row at the current cursor position from the underlying data store.
        String[]  getColumnNames()
Returns a string array holding the names of all of the columns in the result set in the order in which they were listed in the result.
        double  getDouble(int columnIndex)
Returns the value of the requested column as a double.
        float  getFloat(int columnIndex)
Returns the value of the requested column as a float.
        int  getInt(int columnIndex)
Returns the value of the requested column as an int.
        long  getLong(int columnIndex)
Returns the value of the requested column as a long.
        short  getShort(int columnIndex)
Returns the value of the requested column as a short.
        String  getString(int columnIndex)
Returns the value of the requested column as a String.
        boolean  isNull(int columnIndex)
Returns true if the value in the indicated column is null.
Methods inherited from class android.database.AbstractCursor
Methods inherited from class java.lang.Object
Methods inherited from interface android.database.Cursor

Details

Public Constructors

public ArrayListCursor(String[] columnNames, ArrayList rows)

Public Methods

public int count()

Returns the numbers of rows in the cursor.

public boolean deleteRow()

Removes the row at the current cursor position from the underlying data store. After this method returns the cursor will be pointing to the row after the row that is deleted. This has the side effect of decrementing the result of count() by one.

public String[] getColumnNames()

Returns a string array holding the names of all of the columns in the result set in the order in which they were listed in the result.

public double getDouble(int columnIndex)

Returns the value of the requested column as a double.

If the native content of that column is not numeric the result will be the result of passing the column value to Double.valueOf(x).

public float getFloat(int columnIndex)

Returns the value of the requested column as a float.

If the native content of that column is not numeric the result will be the result of passing the column value to Float.valueOf(x).

public int getInt(int columnIndex)

Returns the value of the requested column as an int.

If the native content of that column is not numeric the result will be the result of passing the column value to Integer.valueOf(x).

public long getLong(int columnIndex)

Returns the value of the requested column as a long.

If the native content of that column is not numeric the result will be the result of passing the column value to Long.valueOf(x).

public short getShort(int columnIndex)

Returns the value of the requested column as a short.

If the native content of that column is not numeric the result will be the result of passing the column value to Short.valueOf(x).

public String getString(int columnIndex)

Returns the value of the requested column as a String.

If the native content of that column is not text the result will be the result of passing the column value to String.valueOf(x).

public boolean isNull(int columnIndex)

Returns true if the value in the indicated column is null.
Build m5-rc15g - 14 May 2008 12:50