infovis.utils
Class RBTree
java.lang.Object
cern.colt.PersistentObject
cern.colt.map.AbstractMap
cern.colt.map.AbstractIntIntMap
infovis.utils.RBTree
- All Implemented Interfaces:
- Serializable, Cloneable
- Direct Known Subclasses:
- IntIntSortedMap
public class RBTree
- extends AbstractIntIntMap
- implements Cloneable, Serializable
Red-Black Tree
- Version:
- $Revision: 1.8 $
- Author:
- Jean-Daniel Fekete
- See Also:
- Serialized Form
Methods inherited from class cern.colt.map.AbstractIntIntMap |
containsValue, copy, equals, keyOf, keys, keys, keysSortedByValue, pairsMatching, pairsSortedByKey, pairsSortedByValue, toString, toStringByValue, values, values |
RED
public static final boolean RED
- See Also:
- Constant Field Values
BLACK
public static final boolean BLACK
- See Also:
- Constant Field Values
NIL
public static final RBTree.RBNode NIL
RBTree
public RBTree()
RBTree
public RBTree(RBTree other)
RBTree
public RBTree(IntComparator comp)
clone
public Object clone()
- Overrides:
clone
in class PersistentObject
forEachKey
public boolean forEachKey(IntProcedure proc)
- Specified by:
forEachKey
in class AbstractIntIntMap
forEachPair
public boolean forEachPair(IntIntProcedure proc)
- Overrides:
forEachPair
in class AbstractIntIntMap
removeKey
public boolean removeKey(int key)
- Specified by:
removeKey
in class AbstractIntIntMap
compare
public int compare(int key1,
int key2)
size
public int size()
- Report the number of elements in the tree.
- Overrides:
size
in class AbstractMap
- Returns:
- the number of elements
isEmpty
public boolean isEmpty()
- Report whether this tree has no elements.
- Overrides:
isEmpty
in class AbstractMap
- Returns:
- true if size() == 0
containsKey
public boolean containsKey(int key)
- Overrides:
containsKey
in class AbstractIntIntMap
get
public int get(int key)
- Specified by:
get
in class AbstractIntIntMap
put
public boolean put(int key,
int value)
- Specified by:
put
in class AbstractIntIntMap
remove
public int remove(int key)
clear
public void clear()
- Specified by:
clear
in class AbstractMap
firstKey
public int firstKey()
lastKey
public int lastKey()
nodeIterator
public RBTree.RBNodeIterator nodeIterator()
keyIterator
public RowIterator keyIterator()
keyIterator
public RowIterator keyIterator(int key)
valueIterator
public RowIterator valueIterator()
getComparator
public IntComparator getComparator()
isNull
public static boolean isNull(RBTree.RBNode node)
Copyright © 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.