|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.database.datastore.memory.MapRecordStore
public class MapRecordStore
A class to answer representation queries using a map and an index within the record.
Nested Class Summary | |
---|---|
protected class |
MapRecordStore.StorageAccessor<T>
Access a single record in the given data. |
Field Summary | |
---|---|
private Map<DBID,Object[]> |
data
Storage Map |
private int |
rlen
Record length |
Constructor Summary | |
---|---|
MapRecordStore(int rlen)
Constructor without existing data. |
|
MapRecordStore(int rlen,
Map<DBID,Object[]> data)
Constructor with existing data. |
Method Summary | ||
---|---|---|
protected
|
get(DBID id,
int index)
Actual getter |
|
|
getStorage(int col,
Class<? super T> datatype)
Get a WritableDataStore instance for a particular record column. |
|
boolean |
remove(DBID id)
Remove an object from the store, all columns. |
|
protected
|
set(DBID id,
int index,
T value)
Actual setter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final int rlen
private final Map<DBID,Object[]> data
Constructor Detail |
---|
public MapRecordStore(int rlen, Map<DBID,Object[]> data)
rlen
- Number of columns (record length)data
- Existing data mappublic MapRecordStore(int rlen)
rlen
- Number of columns (record length)Method Detail |
---|
public <T> WritableDataStore<T> getStorage(int col, Class<? super T> datatype)
WritableRecordStore
WritableDataStore
instance for a particular record column.
getStorage
in interface RecordStore
getStorage
in interface WritableRecordStore
T
- Data typecol
- Column numberdatatype
- data class
protected <T> T get(DBID id, int index)
id
- Database IDindex
- column index
protected <T> T set(DBID id, int index, T value)
id
- Database IDindex
- column indexvalue
- new value
public boolean remove(DBID id)
WritableRecordStore
remove
in interface WritableRecordStore
id
- object ID to remove
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |