Package elki.database.datastore.memory
Class MapIntegerDBIDDBIDStore
- java.lang.Object
-
- elki.database.datastore.memory.MapIntegerDBIDDBIDStore
-
- All Implemented Interfaces:
DataStore<DBID>
,DBIDDataStore
,WritableDataStore<DBID>
,WritableDBIDDataStore
public class MapIntegerDBIDDBIDStore extends java.lang.Object implements WritableDBIDDataStore
Writable data store for double values.- Since:
- 0.5.5
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private it.unimi.dsi.fastutil.ints.Int2IntMap
map
Data storage.
-
Constructor Summary
Constructors Constructor Description MapIntegerDBIDDBIDStore(int size)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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.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.
-
-
-
Method Detail
-
get
@Deprecated public DBID get(DBIDRef id)
Deprecated.Description copied from interface:DBIDDataStore
Getter, but using objects.- Specified by:
get
in interfaceDataStore<DBID>
- Specified by:
get
in interfaceDBIDDataStore
- Parameters:
id
- Database ID.- Returns:
- Object or
null
-
put
@Deprecated public DBID put(DBIDRef id, DBID value)
Deprecated.Description copied from interface:WritableDBIDDataStore
Setter, but using materialized DBIDs.- Specified by:
put
in interfaceWritableDataStore<DBID>
- Specified by:
put
in interfaceWritableDBIDDataStore
- Parameters:
id
- Database ID.value
- Value to store.- Returns:
- previous value
-
put
public void put(DBIDRef id, DBIDRef value)
Description copied from interface:WritableDBIDDataStore
Associates the specified value with the specified id in this storage. If the storage previously contained a value for the id, the previous value is replaced by the specified value.- Specified by:
put
in interfaceWritableDBIDDataStore
- Parameters:
id
- Database ID.value
- Value to store.
-
putDBID
public void putDBID(DBIDRef id, DBIDRef value)
Description copied from interface:WritableDBIDDataStore
Associates the specified value with the specified id in this storage. If the storage previously contained a value for the id, the previous value is replaced by the specified value.- Specified by:
putDBID
in interfaceWritableDBIDDataStore
- Parameters:
id
- Database ID.value
- Value to store.
-
assignVar
public DBIDVar assignVar(DBIDRef id, DBIDVar var)
Description copied from interface:DBIDDataStore
Retrieves an object from the storage.- Specified by:
assignVar
in interfaceDBIDDataStore
- Parameters:
id
- Database ID.var
- Variable to update.- Returns:
var
-
delete
public void delete(DBIDRef id)
Description copied from interface:WritableDataStore
Delete the contents for a particular ID and notifies the registered listeners.- Specified by:
delete
in interfaceWritableDataStore<DBID>
- Parameters:
id
- Database ID.
-
destroy
public void destroy()
Description copied from interface:WritableDataStore
Deallocate the storage, freeing the memory and notifies the registered listeners.- Specified by:
destroy
in interfaceWritableDataStore<DBID>
-
clear
public void clear()
Description copied from interface:WritableDataStore
Clear the storage (resetting it to the default value).- Specified by:
clear
in interfaceWritableDataStore<DBID>
-
-