|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infovis.utils.IntSortedMap
public class IntSortedMap
Association Map using ints as keys.
Constructor Summary | |
---|---|
IntSortedMap()
|
|
IntSortedMap(IntComparator comparator)
|
|
IntSortedMap(IntSortedMap other)
|
|
IntSortedMap(IntSortedMap other,
IntComparator comp)
Constructor for IntSortedMap. |
Method Summary | |
---|---|
void |
clear()
Removes all mappings from this TreeMap. |
int |
compare(int key1,
int key2)
|
boolean |
containsKey(int key)
Returns true if this map contains a mapping for the specified key. |
int |
firstKey()
Returns the first (lowest) key currently in this sorted map. |
Object |
get(int key)
Returns the value to which this map maps the specified key. |
IntComparator |
getComparator()
|
boolean |
isEmpty()
|
RowIterator |
keyIterator()
|
int |
lastKey()
Returns the last (highest) key currently in this sorted map. |
Object |
put(int key,
Object value)
Associates the specified value with the specified key in this map. |
Object |
remove(int key)
Removes the mapping for this key from this TreeMap if present. |
int |
size()
Returns the number of key-value mappings in this map. |
Iterator |
valueIterator()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntSortedMap(IntSortedMap other, IntComparator comp)
public IntSortedMap()
public IntSortedMap(IntComparator comparator)
public IntSortedMap(IntSortedMap other)
Method Detail |
---|
public int compare(int key1, int key2)
public int size()
public boolean isEmpty()
public boolean containsKey(int key)
key
- key whose presence in this map is to be tested.
ClassCastException
- if the key cannot be compared with the keys
currently in the map.
NullPointerException
- key is null and this map uses
natural ordering, or its comparator does not tolerate
null keys.public Object get(int key)
key
- key whose associated value is to be returned.
ClassCastException
- key cannot be compared with the keys
currently in the map.
NullPointerException
- key is null and this map uses
natural ordering, or its comparator does not tolerate
null keys.containsKey(int)
public int firstKey()
NoSuchElementException
- Map is empty.public int lastKey()
NoSuchElementException
- Map is empty.public Object put(int key, Object value)
key
- key with which the specified value is to be associated.value
- value to be associated with the specified key.
ClassCastException
- key cannot be compared with the keys
currently in the map.
NullPointerException
- key is null and this map uses
natural order, or its comparator does not tolerate
null keys.public Object remove(int key)
key
- key for which mapping should be removed
ClassCastException
- key cannot be compared with the keys
currently in the map.
NullPointerException
- key is null and this map uses
natural order, or its comparator does not tolerate
null keys.public void clear()
public RowIterator keyIterator()
public Iterator valueIterator()
public IntComparator getComparator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |