public class ArrayDBIDStore extends Object implements WritableDBIDDataStore
Modifier and Type | Field and Description |
---|---|
private ArrayModifiableDBIDs |
data
Data array
|
private DataStoreIDMap |
idmap
DBID to index map
|
Constructor and Description |
---|
ArrayDBIDStore(int size,
DataStoreIDMap idmap)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
assignVar(DBIDRef id,
DBIDVar var)
Retrieves an object from the storage.
|
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.
|
DBID |
get(DBIDRef id)
Deprecated.
|
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.
|
DBID |
put(DBIDRef id,
DBID value)
Deprecated.
|
void |
put(DBIDRef id,
DBIDRef value)
Associates the specified value with the specified id in this storage.
|
void |
putDBID(DBIDRef id,
DBIDRef value)
Associates the specified value with the specified id in this storage.
|
private ArrayModifiableDBIDs data
private DataStoreIDMap idmap
public ArrayDBIDStore(int size, DataStoreIDMap idmap)
size
- Sizeidmap
- ID map@Deprecated public DBID get(DBIDRef id)
DBIDDataStore
get
in interface DataStore<DBID>
get
in interface DBIDDataStore
id
- Database ID.null
public void assignVar(DBIDRef id, DBIDVar var)
DBIDDataStore
assignVar
in interface DBIDDataStore
id
- Database ID.var
- Variable to update.@Deprecated public DBID put(DBIDRef id, DBID value)
WritableDBIDDataStore
put
in interface WritableDataStore<DBID>
put
in interface WritableDBIDDataStore
id
- Database ID.value
- Value to store.public void putDBID(DBIDRef id, DBIDRef value)
WritableDBIDDataStore
putDBID
in interface WritableDBIDDataStore
id
- Database ID.value
- Value to store.public void put(DBIDRef id, DBIDRef value)
WritableDBIDDataStore
put
in interface WritableDBIDDataStore
id
- Database ID.value
- Value to store.public void destroy()
WritableDataStore
destroy
in interface WritableDataStore<DBID>
public void delete(DBIDRef id)
WritableDataStore
delete
in interface WritableDataStore<DBID>
id
- Database ID.public String getLongName()
Result
getLongName
in interface Result
public String getShortName()
Result
getShortName
in interface Result