public class RoboCursor extends BaseCursor
Robolectric implementation of Cursor
.
Modifier and Type | Field and Description |
---|---|
protected List<String> |
columnNames |
String[] |
projection |
protected Object[][] |
results |
String |
selection |
String[] |
selectionArgs |
String |
sortOrder |
Uri |
uri |
FIELD_TYPE_BLOB, FIELD_TYPE_FLOAT, FIELD_TYPE_INTEGER, FIELD_TYPE_NULL, FIELD_TYPE_STRING
Constructor and Description |
---|
RoboCursor() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
byte[] |
getBlob(int columnIndex) |
boolean |
getCloseWasCalled() |
int |
getColumnCount() |
int |
getColumnIndex(String columnName) |
int |
getColumnIndexOrThrow(String columnName) |
String |
getColumnName(int index) |
String[] |
getColumnNames() |
int |
getCount() |
double |
getDouble(int columnIndex) |
Bundle |
getExtras() |
float |
getFloat(int columnIndex) |
int |
getInt(int columnIndex) |
long |
getLong(int columnIndex) |
int |
getPosition() |
short |
getShort(int columnIndex) |
String |
getString(int columnIndex) |
int |
getType(int columnIndex) |
boolean |
isAfterLast() |
boolean |
isBeforeFirst() |
boolean |
isClosed() |
boolean |
isFirst() |
boolean |
isLast() |
boolean |
isNull(int columnIndex) |
boolean |
move(int offset) |
boolean |
moveToFirst() |
boolean |
moveToLast() |
boolean |
moveToNext() |
boolean |
moveToPosition(int position) |
boolean |
moveToPrevious() |
void |
setColumnNames(List<String> columnNames) |
void |
setExtras(Bundle extras) |
void |
setQuery(Uri uri,
String[] projection,
String selection,
String[] selectionArgs,
String sortOrder) |
void |
setResults(Object[][] results) |
copyStringToBuffer, deactivate, getNotificationUri, getWantsAllOnMoveCalls, registerContentObserver, registerDataSetObserver, requery, respond, setNotificationUri, unregisterContentObserver, unregisterDataSetObserver
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNotificationUris, setNotificationUris
public Uri uri
public String[] projection
public String selection
public String[] selectionArgs
public String sortOrder
protected Object[][] results
public void setQuery(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
setQuery
in class BaseCursor
public int getColumnIndexOrThrow(String columnName) throws IllegalArgumentException
getColumnIndexOrThrow
in interface Cursor
getColumnIndexOrThrow
in class BaseCursor
IllegalArgumentException
public int getColumnIndex(String columnName)
getColumnIndex
in interface Cursor
getColumnIndex
in class BaseCursor
public String getString(int columnIndex)
getString
in interface Cursor
getString
in class BaseCursor
public short getShort(int columnIndex)
getShort
in interface Cursor
getShort
in class BaseCursor
public int getInt(int columnIndex)
getInt
in interface Cursor
getInt
in class BaseCursor
public long getLong(int columnIndex)
getLong
in interface Cursor
getLong
in class BaseCursor
public float getFloat(int columnIndex)
getFloat
in interface Cursor
getFloat
in class BaseCursor
public double getDouble(int columnIndex)
getDouble
in interface Cursor
getDouble
in class BaseCursor
public byte[] getBlob(int columnIndex)
getBlob
in interface Cursor
getBlob
in class BaseCursor
public int getType(int columnIndex)
getType
in interface Cursor
getType
in class BaseCursor
public boolean isNull(int columnIndex)
isNull
in interface Cursor
isNull
in class BaseCursor
public int getCount()
getCount
in interface Cursor
getCount
in class BaseCursor
public boolean moveToNext()
moveToNext
in interface Cursor
moveToNext
in class BaseCursor
public boolean moveToFirst()
moveToFirst
in interface Cursor
moveToFirst
in class BaseCursor
public boolean moveToPosition(int position)
moveToPosition
in interface Cursor
moveToPosition
in class BaseCursor
public void close()
close
in interface Cursor
close
in interface Closeable
close
in interface AutoCloseable
close
in class BaseCursor
public int getColumnCount()
getColumnCount
in interface Cursor
getColumnCount
in class BaseCursor
public String getColumnName(int index)
getColumnName
in interface Cursor
getColumnName
in class BaseCursor
public boolean isBeforeFirst()
isBeforeFirst
in interface Cursor
isBeforeFirst
in class BaseCursor
public boolean isAfterLast()
isAfterLast
in interface Cursor
isAfterLast
in class BaseCursor
public boolean isFirst()
isFirst
in interface Cursor
isFirst
in class BaseCursor
public boolean isLast()
isLast
in interface Cursor
isLast
in class BaseCursor
public int getPosition()
getPosition
in interface Cursor
getPosition
in class BaseCursor
public boolean move(int offset)
move
in interface Cursor
move
in class BaseCursor
public boolean moveToLast()
moveToLast
in interface Cursor
moveToLast
in class BaseCursor
public boolean moveToPrevious()
moveToPrevious
in interface Cursor
moveToPrevious
in class BaseCursor
public String[] getColumnNames()
getColumnNames
in interface Cursor
getColumnNames
in class BaseCursor
public boolean isClosed()
isClosed
in interface Cursor
isClosed
in class BaseCursor
public Bundle getExtras()
getExtras
in interface Cursor
getExtras
in class BaseCursor
public void setExtras(Bundle extras)
setExtras
in interface Cursor
setExtras
in class BaseCursor
public void setResults(Object[][] results)
public boolean getCloseWasCalled()