|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.objects.AbstractObject2ReferenceMap
it.unimi.dsi.fastutil.objects.AbstractObject2ReferenceSortedMap
it.unimi.dsi.fastutil.objects.Object2ReferenceAVLTreeMap
A type-specific AVL tree map with a fast, small-footprint implementation.
The iterators provided by the views of this class are type-specific bidirectional iterators.
Moreover, the iterator returned by iterator()
can be safely cast
to a type-specific list iterator.
Nested Class Summary |
Nested classes inherited from class it.unimi.dsi.fastutil.objects.AbstractObject2ReferenceMap |
AbstractObject2ReferenceMap.BasicEntry |
Field Summary | |
static long |
serialVersionUID
|
Constructor Summary | |
Object2ReferenceAVLTreeMap()
Creates a new empty tree map. |
|
Object2ReferenceAVLTreeMap(Comparator c)
Creates a new empty tree map with the given comparator. |
|
Object2ReferenceAVLTreeMap(Map m)
Creates a new tree map copying a given map. |
|
Object2ReferenceAVLTreeMap(Object[] k,
Object[] v)
Creates a new tree map using the elements of two parallel arrays. |
|
Object2ReferenceAVLTreeMap(Object[] k,
Object[] v,
Comparator c)
Creates a new tree map using the elements of two parallel arrays and the given comparator. |
|
Object2ReferenceAVLTreeMap(Object2ReferenceMap m)
Creates a new tree map copying a given map. |
|
Object2ReferenceAVLTreeMap(Object2ReferenceSortedMap m)
Creates a new tree map copying a given sorted map (and its Comparator ). |
|
Object2ReferenceAVLTreeMap(SortedMap m)
Creates a new tree map copying a given sorted map (and its Comparator ). |
Method Summary | |
void |
clear()
|
Object |
clone()
Returns a deep copy of this tree map. |
Comparator |
comparator()
|
boolean |
containsKey(Object k)
Checks whether the given value is contained in keySet() . |
boolean |
containsValue(Object v)
Checks whether the given value is contained in values() . |
Set |
entrySet()
|
Object |
firstKey()
Delegates to the corresponding type-specific method. |
Object |
get(Object k)
|
SortedMap |
headMap(Object to)
Delegates to the corresponding type-specific method. |
boolean |
isEmpty()
|
Set |
keySet()
Returns a type-specific sorted set view of the keys contained in this map. |
Object |
lastKey()
Delegates to the corresponding type-specific method. |
Object |
put(Object k,
Object v)
|
Object |
remove(Object k)
|
int |
size()
|
SortedMap |
subMap(Object from,
Object to)
Delegates to the corresponding type-specific method. |
SortedMap |
tailMap(Object from)
Delegates to the corresponding type-specific method. |
Collection |
values()
Returns a type-specific collection view of the values contained in this map. |
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObject2ReferenceMap |
defaultReturnValue, defaultReturnValue, equals, getDefRetValue, hashCode, putAll, setDefRetValue, toString |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface it.unimi.dsi.fastutil.objects.Object2ReferenceMap |
defaultReturnValue, defaultReturnValue, getDefRetValue, setDefRetValue |
Methods inherited from interface java.util.Map |
equals, hashCode, putAll |
Field Detail |
public static final long serialVersionUID
Constructor Detail |
public Object2ReferenceAVLTreeMap()
public Object2ReferenceAVLTreeMap(Comparator c)
c
- a (possibly type-specific) comparator.public Object2ReferenceAVLTreeMap(Map m)
m
- a Map
to be copied into the new tree map.public Object2ReferenceAVLTreeMap(SortedMap m)
Comparator
).
m
- a SortedMap
to be copied into the new tree map.public Object2ReferenceAVLTreeMap(Object2ReferenceMap m)
m
- a type-specific map to be copied into the new tree map.public Object2ReferenceAVLTreeMap(Object2ReferenceSortedMap m)
Comparator
).
m
- a type-specific sorted map to be copied into the new tree map.public Object2ReferenceAVLTreeMap(Object[] k, Object[] v, Comparator c)
k
- the array of keys of the new tree map.v
- the array of corresponding values in the new tree map.c
- a (possibly type-specific) comparator.
IllegalArgumentException
- if k
and v
have different lengths.public Object2ReferenceAVLTreeMap(Object[] k, Object[] v)
k
- the array of keys of the new tree map.v
- the array of corresponding values in the new tree map.
IllegalArgumentException
- if k
and v
have different lengths.Method Detail |
public Object put(Object k, Object v)
put
in interface Map
put
in class AbstractObject2ReferenceMap
public Object remove(Object k)
remove
in interface Map
remove
in class AbstractObject2ReferenceMap
public boolean containsValue(Object v)
AbstractObject2ReferenceMap
AbstractObject2ReferenceMap.values()
.
containsValue
in interface Map
containsValue
in class AbstractObject2ReferenceMap
public void clear()
clear
in interface Map
clear
in class AbstractObject2ReferenceMap
public boolean containsKey(Object k)
AbstractObject2ReferenceMap
AbstractObject2ReferenceMap.keySet()
.
containsKey
in interface Map
containsKey
in class AbstractObject2ReferenceMap
public int size()
size
in interface Map
public boolean isEmpty()
isEmpty
in interface Map
isEmpty
in class AbstractObject2ReferenceMap
public Object get(Object k)
get
in interface Map
public Object firstKey()
AbstractObject2ReferenceSortedMap
firstKey
in interface SortedMap
firstKey
in class AbstractObject2ReferenceSortedMap
public Object lastKey()
AbstractObject2ReferenceSortedMap
lastKey
in interface SortedMap
lastKey
in class AbstractObject2ReferenceSortedMap
public Set entrySet()
entrySet
in interface Map
public Set keySet()
In addition to the semantics of Map.keySet()
, you can
safely cast the set returned by this call to a type-specific sorted
set interface.
keySet
in interface Map
keySet
in class AbstractObject2ReferenceSortedMap
public Collection values()
In addition to the semantics of Map.values()
, you can
safely cast the collection returned by this call to a type-specific collection
interface.
values
in interface Map
values
in class AbstractObject2ReferenceMap
public Comparator comparator()
comparator
in interface SortedMap
public SortedMap headMap(Object to)
AbstractObject2ReferenceSortedMap
headMap
in interface SortedMap
headMap
in class AbstractObject2ReferenceSortedMap
public SortedMap tailMap(Object from)
AbstractObject2ReferenceSortedMap
tailMap
in interface SortedMap
tailMap
in class AbstractObject2ReferenceSortedMap
public SortedMap subMap(Object from, Object to)
AbstractObject2ReferenceSortedMap
subMap
in interface SortedMap
subMap
in class AbstractObject2ReferenceSortedMap
public Object clone()
This method performs a deep copy of this tree map; the data stored in the set, however, is not cloned. Note that this makes a difference only for object keys.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |