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 |
---|---|
DBIDVar |
assignVar(DBIDRef id,
DBIDVar var)
Retrieves an object from the storage.
|
void |
clear()
Clear the storage (resetting it to the default value).
|
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 DBIDVar assignVar(DBIDRef id, DBIDVar var)
DBIDDataStore
assignVar
in interface DBIDDataStore
id
- Database ID.var
- Variable to update.var
@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 clear()
WritableDataStore
clear
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
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.