|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fri.gui.swing.polytreetable.NodeCache
A node cache that holds different caches for different classes. For polytreetable it holds the userObject as key and the PolyTreeNode as value.
Do not forget to implement equals() method of userObject to satisfy Hashtable!
PolyTreeNode node = NodeCache.get(userObject); if (node == null) { node = new SomeNodeClass(userObject); NodeCache.put(userObject, node); }
Method Summary | |
static void |
clear()
Clear all class caches. |
static void |
clear(java.lang.Class cls)
Clear the cache for passed class. |
static java.util.Enumeration |
elements(java.lang.Class cls)
Returns the elements (PolyTreeNode) from the cache of passed class, or null. |
static PolyTreeNode |
get(java.lang.Object userObject)
Find an Object's node in a class cache. |
static java.util.Enumeration |
keys(java.lang.Class cls)
Returns the keys (userObject) from the cache of passed class, or null. |
static void |
put(java.lang.Object userObject,
PolyTreeNode node)
Store an Object and its node to a class cache. |
static void |
remove(java.lang.Object userObject)
Remove an Object and its node from a class cache. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static PolyTreeNode get(java.lang.Object userObject)
userObject.getClass()
class is used
to identify the cache.
public static void put(java.lang.Object userObject, PolyTreeNode node)
userObject.getClass()
class is used
to create class caches if not already exisiting.
public static void remove(java.lang.Object userObject)
userObject.getClass()
class is used
to identify the cache.
public static void clear(java.lang.Class cls)
userObject.getClass()
class was used
to create class caches.
public static void clear()
public static java.util.Enumeration keys(java.lang.Class cls)
public static java.util.Enumeration elements(java.lang.Class cls)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |