|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jvnet.substance.utils.LazyResettableHashMap<T>
T - Class for the stored values.public class LazyResettableHashMap<T>
Lazily initialized hash map for caching images. Note that this class is not thread safe. In Substance, it is used only from EDT.
| Constructor Summary | |
|---|---|
LazyResettableHashMap(java.lang.String displayName)
Creates a new hash map. |
|
| Method Summary | |
|---|---|
boolean |
containsKey(HashMapKey key)
Checks whether there is a value associated with the specified key. |
T |
get(HashMapKey key)
Returns the value registered for the specified key. |
static java.util.List<java.lang.String> |
getStats()
Returns statistical information of the existing hash maps. |
void |
put(HashMapKey key,
T entry)
Puts a new key-value pair in the map. |
static void |
reset()
Resets all existing hash maps. |
int |
size()
Returns the number of key-value pairs of this hash map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LazyResettableHashMap(java.lang.String displayName)
displayName - Display name of the new hash map.| Method Detail |
|---|
public void put(HashMapKey key,
T entry)
key - Pair key.entry - Pair value.public T get(HashMapKey key)
key - Key.
null if none.public boolean containsKey(HashMapKey key)
key - Key.
true if there is an associated value,
false otherwise.public int size()
public static void reset()
public static java.util.List<java.lang.String> getStats()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||