
public class ArrayRecordStore extends Object implements WritableRecordStore
| Modifier and Type | Class and Description |
|---|---|
protected class |
ArrayRecordStore.StorageAccessor<T>
Access a single record in the given data.
|
| Modifier and Type | Field and Description |
|---|---|
private Object[][] |
data
Data array
|
private DataStoreIDMap |
idmap
DBID to index map
|
| Constructor and Description |
|---|
ArrayRecordStore(Object[][] data,
DataStoreIDMap idmap)
Constructor with existing data
|
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
get(DBIDRef id,
int index)
Actual getter
|
<T> WritableDataStore<T> |
getStorage(int col,
Class<? super T> datatype)
Get a
WritableDataStore instance for a particular record column. |
boolean |
remove(DBIDRef id)
Remove an object from the store, all columns.
|
protected <T> T |
set(DBIDRef id,
int index,
T value)
Actual setter
|
private final Object[][] data
private final DataStoreIDMap idmap
public ArrayRecordStore(Object[][] data, DataStoreIDMap idmap)
data - Existing dataidmap - Map for array offsetspublic <T> WritableDataStore<T> getStorage(int col, Class<? super T> datatype)
WritableRecordStoreWritableDataStore instance for a particular record column.getStorage in interface RecordStoregetStorage in interface WritableRecordStoreT - Data typecol - Column numberdatatype - data classprotected <T> T get(DBIDRef id, int index)
id - Database IDindex - column indexprotected <T> T set(DBIDRef id, int index, T value)
id - Database IDindex - column indexvalue - New valuepublic boolean remove(DBIDRef id)
WritableRecordStoreremove in interface WritableRecordStoreid - object ID to remove