|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.objects.AbstractObject2ObjectMap
it.unimi.dsi.fastutil.objects.AbstractObject2ObjectSortedMap
it.unimi.dsi.fastutil.objects.Object2ObjectRBTreeMap
A type-specific red-black 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.AbstractObject2ObjectMap |
AbstractObject2ObjectMap.BasicEntry |
Field Summary | |
static long |
serialVersionUID
|
Constructor Summary | |
Object2ObjectRBTreeMap()
Creates a new empty tree map. |
|
Object2ObjectRBTreeMap(Comparator c)
Creates a new empty tree map with the given comparator. |
|
Object2ObjectRBTreeMap(Map m)
Creates a new tree map copying a given map. |
|
Object2ObjectRBTreeMap(Object2ObjectMap m)
Creates a new tree map copying a given map. |
|
Object2ObjectRBTreeMap(Object2ObjectSortedMap m)
Creates a new tree map copying a given sorted map (and its Comparator ). |
|
Object2ObjectRBTreeMap(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.AbstractObject2ObjectMap |
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.Object2ObjectMap |
defaultReturnValue, defaultReturnValue, getDefRetValue, setDefRetValue |
Methods inherited from interface java.util.Map |
equals, hashCode, putAll |
Field Detail |
public static final long serialVersionUID
Constructor Detail |
public Object2ObjectRBTreeMap()
public Object2ObjectRBTreeMap(Comparator c)
c
- a Comparator
.public Object2ObjectRBTreeMap(Map m)
m
- a Map
to be copied into the new tree map.public Object2ObjectRBTreeMap(SortedMap m)
Comparator
).
m
- a SortedMap
to be copied into the new tree map.public Object2ObjectRBTreeMap(Object2ObjectMap m)
m
- a type-specific map to be copied into the new tree map.public Object2ObjectRBTreeMap(Object2ObjectSortedMap m)
Comparator
).
m
- a type-specific sorted map to be copied into the new tree map.Method Detail |
public final Object put(Object k, Object v)
put
in interface Map
put
in class AbstractObject2ObjectMap
public final Object remove(Object k)
remove
in interface Map
remove
in class AbstractObject2ObjectMap
public boolean containsValue(Object v)
AbstractObject2ObjectMap
AbstractObject2ObjectMap.values()
.
containsValue
in interface Map
containsValue
in class AbstractObject2ObjectMap
public void clear()
clear
in interface Map
clear
in class AbstractObject2ObjectMap
public boolean containsKey(Object k)
AbstractObject2ObjectMap
AbstractObject2ObjectMap.keySet()
.
containsKey
in interface Map
containsKey
in class AbstractObject2ObjectMap
public int size()
size
in interface Map
public boolean isEmpty()
isEmpty
in interface Map
isEmpty
in class AbstractObject2ObjectMap
public Object get(Object k)
get
in interface Map
public Object firstKey()
AbstractObject2ObjectSortedMap
firstKey
in interface SortedMap
firstKey
in class AbstractObject2ObjectSortedMap
public Object lastKey()
AbstractObject2ObjectSortedMap
lastKey
in interface SortedMap
lastKey
in class AbstractObject2ObjectSortedMap
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 AbstractObject2ObjectSortedMap
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 AbstractObject2ObjectMap
public Comparator comparator()
comparator
in interface SortedMap
public SortedMap headMap(Object to)
AbstractObject2ObjectSortedMap
headMap
in interface SortedMap
headMap
in class AbstractObject2ObjectSortedMap
public SortedMap tailMap(Object from)
AbstractObject2ObjectSortedMap
tailMap
in interface SortedMap
tailMap
in class AbstractObject2ObjectSortedMap
public SortedMap subMap(Object from, Object to)
AbstractObject2ObjectSortedMap
subMap
in interface SortedMap
subMap
in class AbstractObject2ObjectSortedMap
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 |