de.lmu.ifi.dbs.elki.database.datastore.memory
Class ArrayRecordStore.StorageAccessor<T>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.database.datastore.memory.ArrayRecordStore.StorageAccessor<T>
Type Parameters:
T - Object data type to access
All Implemented Interfaces:
DataStore<T>, WritableDataStore<T>, Result
Enclosing class:
ArrayRecordStore

protected class ArrayRecordStore.StorageAccessor<T>
extends Object
implements WritableDataStore<T>

Access a single record in the given data.


Field Summary
private  int index
          Representation index.
 
Constructor Summary
protected ArrayRecordStore.StorageAccessor(int index)
          Constructor.
 
Method Summary
 void delete(DBID 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.
 T get(DBID id)
          Retrieves an object from the storage.
 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.
 T put(DBID id, T value)
          Associates the specified value with the specified id in this storage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

index

private final int index
Representation index.

Constructor Detail

ArrayRecordStore.StorageAccessor

protected ArrayRecordStore.StorageAccessor(int index)
Constructor.

Parameters:
index - In-record index
Method Detail

get

public T get(DBID id)
Description copied from interface: DataStore
Retrieves an object from the storage.

Specified by:
get in interface DataStore<T>
Parameters:
id - Database ID.
Returns:
Object or null

put

public T put(DBID id,
             T value)
Description copied from interface: WritableDataStore
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 interface WritableDataStore<T>
Parameters:
id - Database ID.
value - Value to store.
Returns:
previous value

destroy

public void destroy()
Description copied from interface: WritableDataStore
Deallocate the storage, freeing the memory and notifies the registered listeners.

Specified by:
destroy in interface WritableDataStore<T>

delete

public void delete(DBID id)
Description copied from interface: WritableDataStore
Delete the contents for a particular ID and notifies the registered listeners.

Specified by:
delete in interface WritableDataStore<T>
Parameters:
id - Database ID.

getLongName

public String getLongName()
Description copied from interface: Result
A "pretty" name for the result, for use in titles, captions and menus.

Specified by:
getLongName in interface Result
Returns:
result name

getShortName

public String getShortName()
Description copied from interface: Result
A short name for the result, useful for file names.

Specified by:
getShortName in interface Result
Returns:
result name

Release 0.4.0 (2011-09-20_1324)