@Test public void getObject() { List<Object> data0 = Arrays.asList((Object) 1, "kk"); cursor = new ShadowCursor(Arrays.asList("id", "name"), Arrays.asList(data0)); cursor.moveToFirst(); Assert.assertEquals(1, cursor.getObject(0)); Assert.assertEquals("kk", cursor.getObject(1)); }
protected Object getObject(int columnIndex, Object defaultValue) { Object value = getObject(columnIndex); if (value == null) { return defaultValue; } return value; }
ShadowCursor implements Cursor { protected Object getObject(int columnIndex, Object defaultValue) { Object value = getObject(columnIndex); if (value == null) { return defaultValue; } return value; } }
ShadowCursor implements Cursor { protected Object getObject(int columnIndex, Object defaultValue) { Object value = getObject(columnIndex); if (value == null) { return defaultValue; } return value; } ShadowCursor(List<String> colums, List<List<Object>> datas); }
ShadowCursor implements Cursor { protected Object getObject(int columnIndex, Object defaultValue) { Object value = getObject(columnIndex); if (value == null) { return defaultValue; } return value; } ShadowCursor(List<String> colums, List<List<Object>> datas); @Override int getCount(); @Override int getPosition(); @Override boolean move(int offset); @Override boolean moveToPosition(int position); @Override boolean moveToFirst(); @Override boolean moveToLast(); @Override boolean moveToNext(); @Override boolean moveToPrevious(); @Override boolean isFirst(); @Override boolean isLast(); @Override boolean isBeforeFirst(); @Override boolean isAfterLast(); @Override int getColumnIndex(String columnName); @Override int getColumnIndexOrThrow(String columnName); @Override String getColumnName(int columnIndex); @Override String[] getColumnNames(); @Override int getColumnCount(); @Override byte[] getBlob(int columnIndex); @Override String getString(int columnIndex); @Override void copyStringToBuffer(int columnIndex, CharArrayBuffer buffer); @Override short getShort(int columnIndex); @Override int getInt(int columnIndex); @Override long getLong(int columnIndex); @Override float getFloat(int columnIndex); @Override double getDouble(int columnIndex); @Override int getType(int columnIndex); @Override boolean isNull(int columnIndex); @Override void deactivate(); @Override boolean requery(); @Override void close(); @Override boolean isClosed(); @Override void registerContentObserver(ContentObserver observer); @Override void unregisterContentObserver(ContentObserver observer); @Override void registerDataSetObserver(DataSetObserver observer); @Override void unregisterDataSetObserver(DataSetObserver observer); @Override void setNotificationUri(ContentResolver cr, Uri uri); @Override Uri getNotificationUri(); @Override boolean getWantsAllOnMoveCalls(); @Override void setExtras(Bundle extras); @Override Bundle getExtras(); @Override Bundle respond(Bundle extras); }
ShadowCursor implements Cursor { protected Object getObject(int columnIndex, Object defaultValue) { Object value = getObject(columnIndex); if (value == null) { return defaultValue; } return value; } ShadowCursor(List<String> colums, List<List<Object>> datas); @Override int getCount(); @Override int getPosition(); @Override boolean move(int offset); @Override boolean moveToPosition(int position); @Override boolean moveToFirst(); @Override boolean moveToLast(); @Override boolean moveToNext(); @Override boolean moveToPrevious(); @Override boolean isFirst(); @Override boolean isLast(); @Override boolean isBeforeFirst(); @Override boolean isAfterLast(); @Override int getColumnIndex(String columnName); @Override int getColumnIndexOrThrow(String columnName); @Override String getColumnName(int columnIndex); @Override String[] getColumnNames(); @Override int getColumnCount(); @Override byte[] getBlob(int columnIndex); @Override String getString(int columnIndex); @Override void copyStringToBuffer(int columnIndex, CharArrayBuffer buffer); @Override short getShort(int columnIndex); @Override int getInt(int columnIndex); @Override long getLong(int columnIndex); @Override float getFloat(int columnIndex); @Override double getDouble(int columnIndex); @Override int getType(int columnIndex); @Override boolean isNull(int columnIndex); @Override void deactivate(); @Override boolean requery(); @Override void close(); @Override boolean isClosed(); @Override void registerContentObserver(ContentObserver observer); @Override void unregisterContentObserver(ContentObserver observer); @Override void registerDataSetObserver(DataSetObserver observer); @Override void unregisterDataSetObserver(DataSetObserver observer); @Override void setNotificationUri(ContentResolver cr, Uri uri); @Override Uri getNotificationUri(); @Override boolean getWantsAllOnMoveCalls(); @Override void setExtras(Bundle extras); @Override Bundle getExtras(); @Override Bundle respond(Bundle extras);  }