public class NodeCache extends Object
Constructor and Description |
---|
NodeCache() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Wipe the cache of all entries.
|
Node |
get(Object label)
Answer the node with the given
label in the cache, or
null if there isn't one. |
void |
put(Object label,
Node cached)
Record in the cache the designated Node, using the given label (which must
be .equals() to the Node's label).
|
int |
size() |
public void clear()
public int size()
public Node get(Object label)
label
in the cache, or
null
if there isn't one. Selects the slot in the cache by the
reduced hash of the label, and confirms that the Node is the right one using
.equals() on this label and that node's label.Copyright ? 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP