|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.anasoft.os.daofusion.util.SimpleMapContainer<K,T>
K
- Type of the object key to be used within
the object map.T
- Type of the object the container works with.public abstract class SimpleMapContainer<K,T>
Utility class intended to ease the implementation of simple map-based object containers.
Constructor Summary | |
---|---|
SimpleMapContainer()
|
Method Summary | |
---|---|
SimpleMapContainer<K,T> |
add(T object)
Adds the given object to this container. |
void |
clear()
Clears the list of objects. |
boolean |
containsKey(K key)
Checks whether the object map contains the given key. |
protected abstract K |
getKey(T object)
Returns the key for the given object. |
java.util.Map<K,T> |
getObjectMap()
Returns the map of objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleMapContainer()
Method Detail |
---|
protected abstract K getKey(T object)
object
- Object for which the key
is required.
public SimpleMapContainer<K,T> add(T object)
object
- Object to add.
public void clear()
public java.util.Map<K,T> getObjectMap()
Note that the method returns an unmodifiable map to prevent further map manipulation.
public boolean containsKey(K key)
key
- Object key.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |