
T - Representation object typpublic class ArrayStore<T> extends Object implements WritableDataStore<T>
| Modifier and Type | Field and Description |
|---|---|
private Object[] |
data
Data array.
|
private DataStoreIDMap |
idmap
DBID to index map.
|
| Constructor and Description |
|---|
ArrayStore(Object[] data,
DataStoreIDMap idmap)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete(DBIDRef id)
Delete the contents for a particular ID and notifies the registered
listeners.
|
void |
destroy()
Deallocate the storage, freeing the memory and notifies the registered
listeners.
|
T |
get(DBIDRef id)
Retrieves an object from the storage.
|
String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus.
|
String |
getShortName()
A short name for the result, useful for file names.
|
T |
put(DBIDRef id,
T value)
Associates the specified value with the specified id in this storage.
|
private Object[] data
private DataStoreIDMap idmap
public ArrayStore(Object[] data, DataStoreIDMap idmap)
data - Data arrayidmap - DBID to offset mappingpublic T get(DBIDRef id)
DataStorepublic T put(DBIDRef id, T value)
WritableDataStoreput in interface WritableDataStore<T>id - Database ID.value - Value to store.public void destroy()
WritableDataStoredestroy in interface WritableDataStore<T>public void delete(DBIDRef id)
WritableDataStoredelete in interface WritableDataStore<T>id - Database ID.public String getLongName()
ResultgetLongName in interface Resultpublic String getShortName()
ResultgetShortName in interface Result