|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.spif.StoreChain | +--net.sf.spif.HashStore
A store backed by a plain HashMap. Put is always propagated, get is never propagated.
Field Summary |
Fields inherited from class net.sf.spif.StoreChain |
chained |
Constructor Summary | |
HashStore()
|
Method Summary | |
void |
clear()
Forgets everything |
java.lang.Object |
get(Id id,
boolean writeable)
Returns an object from the store. |
Id |
put(Id id,
java.lang.Object object)
Puts an object in the store. |
boolean |
remove(Id id)
Removes and propagates |
Methods inherited from class net.sf.spif.StoreChain |
equals, getChained, getChained, getChained, hashCode, setChained |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HashStore()
Method Detail |
public java.lang.Object get(Id id, boolean writeable)
StoreChain
Returns an object from the store.
This default implementation just forwards to the chained. for (optional) use by subclasses.
get
in class StoreChain
id
- the id of the object to return
public Id put(Id id, java.lang.Object object)
StoreChain
Puts an object in the store. The objects may be new, or previously acquired by getting writeable. It is an error to attempt to put an existing object not previously acquired by getting writeable.
This default implementation just forwards to the chained. for (optional) use by subclasses.
put
in class StoreChain
id
- the id of the object to put. May be nullobject
- the object to put. May be null
public boolean remove(Id id)
remove
in class StoreChain
id
- the id of the object to remove
public void clear()
clear
in class StoreChain
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |