prefuse.util.collections
Class IntIntTreeMap
java.lang.Object
prefuse.util.collections.AbstractTreeMap
prefuse.util.collections.IntIntTreeMap
- All Implemented Interfaces:
- IntIntSortedMap, IntSortedMap
public class IntIntTreeMap
- extends AbstractTreeMap
- implements IntIntSortedMap
Sorted map implementation using a red-black tree to map from int keys to
int values.
- Author:
- jeffrey heer
Method Summary |
void |
clear()
|
protected int |
compare(AbstractTreeMap.Entry e1,
AbstractTreeMap.Entry e2)
|
boolean |
containsKey(int key)
|
int |
firstKey()
|
int |
get(int key)
|
int |
getLast(int key)
|
int |
getNextValue(int key,
int value)
|
int |
getPreviousValue(int key,
int value)
|
LiteralIterator |
keyIterator()
|
LiteralIterator |
keyRangeIterator(int fromKey,
boolean fromInc,
int toKey,
boolean toInc)
|
int |
lastKey()
|
int |
put(int key,
int value)
|
int |
remove(int key)
|
int |
remove(int key,
int val)
|
IntIterator |
valueRangeIterator(int fromKey,
boolean fromInc,
int toKey,
boolean toInc)
|
Methods inherited from class prefuse.util.collections.AbstractTreeMap |
comparator, containsValue, decrementSize, find, findCeiling, findPredecessor, fixUpInsert, fixUpRemove, getMaximum, getMedian, getMinimum, getUniqueCount, incrementSize, isAllowDuplicates, isEmpty, maximum, minimum, predecessor, remove, rotateLeft, rotateRight, size, successor, valueIterator |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntIntTreeMap
public IntIntTreeMap()
IntIntTreeMap
public IntIntTreeMap(boolean allowDuplicates)
IntIntTreeMap
public IntIntTreeMap(LiteralComparator comparator)
IntIntTreeMap
public IntIntTreeMap(LiteralComparator comparator,
boolean allowDuplicates)
clear
public void clear()
- Specified by:
clear
in interface IntSortedMap
- Overrides:
clear
in class AbstractTreeMap
- See Also:
Map.clear()
containsKey
public boolean containsKey(int key)
- Specified by:
containsKey
in interface IntIntSortedMap
- See Also:
Map.containsKey(java.lang.Object)
get
public int get(int key)
- Specified by:
get
in interface IntIntSortedMap
- See Also:
Map.get(java.lang.Object)
put
public int put(int key,
int value)
- Specified by:
put
in interface IntIntSortedMap
- See Also:
Map.put(java.lang.Object, java.lang.Object)
remove
public int remove(int key)
- Specified by:
remove
in interface IntIntSortedMap
- See Also:
Map.remove(java.lang.Object)
remove
public int remove(int key,
int val)
- Specified by:
remove
in interface IntIntSortedMap
getLast
public int getLast(int key)
- Specified by:
getLast
in interface IntIntSortedMap
getPreviousValue
public int getPreviousValue(int key,
int value)
- Specified by:
getPreviousValue
in interface IntIntSortedMap
getNextValue
public int getNextValue(int key,
int value)
- Specified by:
getNextValue
in interface IntIntSortedMap
firstKey
public int firstKey()
- Specified by:
firstKey
in interface IntIntSortedMap
- See Also:
SortedMap.firstKey()
lastKey
public int lastKey()
- Specified by:
lastKey
in interface IntIntSortedMap
- See Also:
SortedMap.lastKey()
keyIterator
public LiteralIterator keyIterator()
- Specified by:
keyIterator
in interface IntIntSortedMap
keyRangeIterator
public LiteralIterator keyRangeIterator(int fromKey,
boolean fromInc,
int toKey,
boolean toInc)
- Specified by:
keyRangeIterator
in interface IntIntSortedMap
valueRangeIterator
public IntIterator valueRangeIterator(int fromKey,
boolean fromInc,
int toKey,
boolean toInc)
- Specified by:
valueRangeIterator
in interface IntIntSortedMap
compare
protected int compare(AbstractTreeMap.Entry e1,
AbstractTreeMap.Entry e2)
- Specified by:
compare
in class AbstractTreeMap
Copyright © 2007 Regents of the University of California