java.lang.Object | ||
↳ | android.database.AbstractCursor | |
↳ | android.database.MatrixCursor |
A mutable cursor implementation backed by an array of Object
s. Use
newRow() to add rows. Automatically expands internal capacity
as needed.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MatrixCursor.RowBuilder | Builds a row, starting from the left-most column and adding one column value at a time. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.database.AbstractCursor
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new cursor with the given initial capacity.
| |||||||||||
Constructs a new cursor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds a new row to the end with the given column values.
| |||||||||||
Adds a new row to the end with the given column values.
| |||||||||||
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.
| |||||||||||
Returns the numbers of rows in the cursor.
| |||||||||||
Returns the value of the requested column as a double.
| |||||||||||
Returns the value of the requested column as a float.
| |||||||||||
Returns the value of the requested column as an int.
| |||||||||||
Returns the value of the requested column as a long.
| |||||||||||
Returns the value of the requested column as a short.
| |||||||||||
Returns the value of the requested column as a String.
| |||||||||||
Returns
true if the value in the indicated column is null. | |||||||||||
Adds a new row to the end and returns a builder for that row.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class android.database.AbstractCursor
| |||||||||||
From class java.lang.Object
| |||||||||||
From interface android.database.CrossProcessCursor
| |||||||||||
From interface android.database.Cursor
|
Constructs a new cursor with the given initial capacity.
columnNames | names of the columns, the ordering of which determines column ordering elsewhere in this cursor |
---|---|
initialCapacity | in rows |
Constructs a new cursor.
columnNames | names of the columns, the ordering of which determines column ordering elsewhere in this cursor |
---|
Adds a new row to the end with the given column values. Not safe for concurrent use.
columnValues | in the same order as the the column names specified at cursor construction time |
---|
IllegalArgumentException | if columnValues.length !=
columnNames.length |
---|
Adds a new row to the end with the given column values. Not safe for concurrent use.
columnValues | in the same order as the the column names specified at cursor construction time |
---|
IllegalArgumentException | if columnValues.size() !=
columnNames.length |
---|
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.
Returns the numbers of rows in the cursor.
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).
column | the zero-based index of the target column. |
---|
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).
column | the zero-based index of the target column. |
---|
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).
column | the zero-based index of the target column. |
---|
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).
column | the zero-based index of the target column. |
---|
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).
column | the zero-based index of the target column. |
---|
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).
column | the zero-based index of the target column. |
---|
Returns true
if the value in the indicated column is null.
column | the zero-based index of the target column. |
---|
Adds a new row to the end and returns a builder for that row. Not safe for concurrent use.