Package uk.ac.ebi.utils.collections
Class ObjectStore<T,K,V>
java.lang.Object
uk.ac.ebi.utils.collections.ObjectStore<T,K,V>
- Direct Known Subclasses:
SortedObjectStore
Implements an object store.
Basically, allows to associate a Java object to a type and a key/identifier.
User: brandizi
Date: Oct 29, 2007
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets an object identified by type and key.voidStores an object, identified by a type and an identifier If value is null deletes the entry.voidRemove all the values associated to the typeintsize()Prints full contents of the object store.All the identifiers of objects belonging to a given typetypes()All the types in the storeAll the values of a certain type.
-
Field Details
-
size
protected int size -
log
protected final org.slf4j.Logger log
-
-
Constructor Details
-
ObjectStore
public ObjectStore()
-
-
Method Details
-
getInternalTypes
-
put
Stores an object, identified by a type and an identifier If value is null deletes the entry. -
remove
Remove all the values associated to the type -
get
Gets an object identified by type and key. Returns null in case the entry is empty. -
size
public int size() -
types
All the types in the store -
typeKeys
All the identifiers of objects belonging to a given type -
values
All the values of a certain type. Never returns null. -
toStringVerbose
Prints full contents of the object store.
-