prefuse.util.collections
Class AbstractTreeMap
java.lang.Object
prefuse.util.collections.AbstractTreeMap
- All Implemented Interfaces:
- IntSortedMap
- Direct Known Subclasses:
- DoubleIntTreeMap, FloatIntTreeMap, IntIntTreeMap, LongIntTreeMap, ObjectIntTreeMap
public abstract class AbstractTreeMap
- extends java.lang.Object
- implements IntSortedMap
Abstract base class for red-black trees that map a key value to
an int value.
- Author:
- jeffrey heer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RED
protected static final boolean RED
- See Also:
- Constant Field Values
BLACK
protected static final boolean BLACK
- See Also:
- Constant Field Values
NIL
protected static final AbstractTreeMap.Entry NIL
cmp
protected LiteralComparator cmp
root
protected AbstractTreeMap.Entry root
allowDuplicates
protected boolean allowDuplicates
size
protected int size
unique
protected int unique
modCount
protected int modCount
lastOrder
protected int lastOrder
AbstractTreeMap
public AbstractTreeMap(LiteralComparator comparator,
boolean allowDuplicates)
isAllowDuplicates
public boolean isAllowDuplicates()
- Specified by:
isAllowDuplicates
in interface IntSortedMap
size
public int size()
- Specified by:
size
in interface IntSortedMap
- See Also:
Map.size()
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface IntSortedMap
comparator
public java.util.Comparator comparator()
- Specified by:
comparator
in interface IntSortedMap
- See Also:
SortedMap.comparator()
clear
public void clear()
- Specified by:
clear
in interface IntSortedMap
- See Also:
Map.clear()
getMinimum
public int getMinimum()
- Specified by:
getMinimum
in interface IntSortedMap
getMaximum
public int getMaximum()
- Specified by:
getMaximum
in interface IntSortedMap
getMedian
public int getMedian()
- Specified by:
getMedian
in interface IntSortedMap
getUniqueCount
public int getUniqueCount()
- Specified by:
getUniqueCount
in interface IntSortedMap
containsValue
public boolean containsValue(int value)
- Specified by:
containsValue
in interface IntSortedMap
- See Also:
Map.containsValue(java.lang.Object)
valueIterator
public IntIterator valueIterator(boolean ascend)
- Specified by:
valueIterator
in interface IntSortedMap
incrementSize
protected void incrementSize(boolean isUnique)
decrementSize
protected void decrementSize(boolean isUnique)
compare
protected abstract int compare(AbstractTreeMap.Entry e1,
AbstractTreeMap.Entry e2)
find
protected AbstractTreeMap.Entry find(AbstractTreeMap.Entry x)
findPredecessor
protected AbstractTreeMap.Entry findPredecessor(AbstractTreeMap.Entry x)
findCeiling
protected AbstractTreeMap.Entry findCeiling(AbstractTreeMap.Entry x)
minimum
protected AbstractTreeMap.Entry minimum(AbstractTreeMap.Entry x)
maximum
protected AbstractTreeMap.Entry maximum(AbstractTreeMap.Entry x)
successor
protected AbstractTreeMap.Entry successor(AbstractTreeMap.Entry x)
predecessor
protected AbstractTreeMap.Entry predecessor(AbstractTreeMap.Entry x)
rotateLeft
protected void rotateLeft(AbstractTreeMap.Entry x)
rotateRight
protected void rotateRight(AbstractTreeMap.Entry x)
fixUpInsert
protected void fixUpInsert(AbstractTreeMap.Entry x)
fixUpRemove
protected void fixUpRemove(AbstractTreeMap.Entry x)
remove
protected void remove(AbstractTreeMap.Entry z)
Copyright © 2007 Regents of the University of California