All Packages Class Hierarchy This Package Previous Next Index
Class collections.LLPair
java.lang.Object
|
+----collections.Cell
|
+----collections.LLCell
|
+----collections.LLPair
- public class LLPair
- extends LLCell
- implements Pair
LLPairs are LLCells with keys, and operations that deal with them.
As with LLCells, the are pure implementation tools.
-
LLPair()
- Make a pair with null key, elment, and next link
-
LLPair(Object, Object)
- Make a pair with given key and element, and null next link
-
LLPair(Object, Object, LLPair)
- Make a cell with given key, elment, and next link
-
clone()
- Clone is SHALLOW; i.e., just makes a copy of the current cell
-
count(Object, Object)
- Return the number of cells with indicated pair
-
countKey(Object)
- Return the number of cells with key() key.
-
find(Object, Object)
- return a cell holding the indicated pair or null if no such
-
findKey(Object)
- return a cell with key() key or null if no such
-
index(Object, Object)
- Return the number of cells traversed to find a cell with indicated pair
or -1 if not present
-
indexKey(Object)
- Return the number of cells traversed to find a cell with key() key,
or -1 if not present
-
key()
- return the key
-
key(Object)
- set the key
LLPair
public LLPair(Object k,
Object v,
LLPair n)
- Make a cell with given key, elment, and next link
LLPair
public LLPair(Object k,
Object v)
- Make a pair with given key and element, and null next link
LLPair
public LLPair()
- Make a pair with null key, elment, and next link
key
public final Object key()
- return the key
key
public final void key(Object k)
- set the key
findKey
public final LLPair findKey(Object key)
- return a cell with key() key or null if no such
find
public final LLPair find(Object key,
Object element)
- return a cell holding the indicated pair or null if no such
indexKey
public final int indexKey(Object key)
- Return the number of cells traversed to find a cell with key() key,
or -1 if not present
index
public final int index(Object key,
Object element)
- Return the number of cells traversed to find a cell with indicated pair
or -1 if not present
countKey
public final int countKey(Object key)
- Return the number of cells with key() key.
count
public final int count(Object key,
Object element)
- Return the number of cells with indicated pair
clone
protected Object clone() throws CloneNotSupportedException
- Clone is SHALLOW; i.e., just makes a copy of the current cell
- Overrides:
- clone in class LLCell
All Packages Class Hierarchy This Package Previous Next Index