public class MapIntegerDBIDIntegerStore extends java.lang.Object implements WritableIntegerDataStore
Modifier and Type | Field and Description |
---|---|
private it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap |
map
Data storage.
|
Constructor and Description |
---|
MapIntegerDBIDIntegerStore(int size)
Constructor.
|
MapIntegerDBIDIntegerStore(int size,
int def)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
java.lang.Integer |
get(DBIDRef id)
Deprecated.
|
void |
increment(DBIDRef id,
int adjust)
Increment a value.
|
int |
intValue(DBIDRef id)
Retrieves a value from the storage.
|
int |
put(DBIDRef id,
int value)
Associates the specified value with the specified id in this storage.
|
java.lang.Integer |
put(DBIDRef id,
java.lang.Integer value)
Deprecated.
|
int |
putInt(DBIDRef id,
int value)
Associates the specified value with the specified id in this storage.
|
public MapIntegerDBIDIntegerStore(int size)
size
- Expected sizepublic MapIntegerDBIDIntegerStore(int size, int def)
size
- Expected sizedef
- Default value@Deprecated public java.lang.Integer get(DBIDRef id)
IntegerDataStore
get
in interface DataStore<java.lang.Integer>
get
in interface IntegerDataStore
id
- Database ID.null
public int intValue(DBIDRef id)
IntegerDataStore
intValue
in interface IntegerDataStore
id
- Database ID.@Deprecated public java.lang.Integer put(DBIDRef id, java.lang.Integer value)
WritableIntegerDataStore
put
in interface WritableDataStore<java.lang.Integer>
put
in interface WritableIntegerDataStore
id
- Database ID.value
- Value to store.public void destroy()
WritableDataStore
destroy
in interface WritableDataStore<java.lang.Integer>
public void delete(DBIDRef id)
WritableDataStore
delete
in interface WritableDataStore<java.lang.Integer>
id
- Database ID.public int putInt(DBIDRef id, int value)
WritableIntegerDataStore
putInt
in interface WritableIntegerDataStore
id
- Database ID.value
- Value to store.public int put(DBIDRef id, int value)
WritableIntegerDataStore
put
in interface WritableIntegerDataStore
id
- Database ID.value
- Value to store.public void increment(DBIDRef id, int adjust)
WritableIntegerDataStore
increment
in interface WritableIntegerDataStore
id
- Database ID.adjust
- Value to add to the previous value.public void clear()
WritableDataStore
clear
in interface WritableDataStore<java.lang.Integer>
Copyright © 2019 ELKI Development Team. License information.