|
||||||||||
| 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 Mapput in class AbstractObject2ObjectMappublic final Object remove(Object k)
remove in interface Mapremove in class AbstractObject2ObjectMappublic boolean containsValue(Object v)
AbstractObject2ObjectMapAbstractObject2ObjectMap.values().
containsValue in interface MapcontainsValue in class AbstractObject2ObjectMappublic void clear()
clear in interface Mapclear in class AbstractObject2ObjectMappublic boolean containsKey(Object k)
AbstractObject2ObjectMapAbstractObject2ObjectMap.keySet().
containsKey in interface MapcontainsKey in class AbstractObject2ObjectMappublic int size()
size in interface Mappublic boolean isEmpty()
isEmpty in interface MapisEmpty in class AbstractObject2ObjectMappublic Object get(Object k)
get in interface Mappublic Object firstKey()
AbstractObject2ObjectSortedMap
firstKey in interface SortedMapfirstKey in class AbstractObject2ObjectSortedMappublic Object lastKey()
AbstractObject2ObjectSortedMap
lastKey in interface SortedMaplastKey in class AbstractObject2ObjectSortedMappublic Set entrySet()
entrySet in interface Mappublic 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 MapkeySet in class AbstractObject2ObjectSortedMappublic 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 Mapvalues in class AbstractObject2ObjectMappublic Comparator comparator()
comparator in interface SortedMappublic SortedMap headMap(Object to)
AbstractObject2ObjectSortedMap
headMap in interface SortedMapheadMap in class AbstractObject2ObjectSortedMappublic SortedMap tailMap(Object from)
AbstractObject2ObjectSortedMap
tailMap in interface SortedMaptailMap in class AbstractObject2ObjectSortedMap
public SortedMap subMap(Object from,
Object to)
AbstractObject2ObjectSortedMap
subMap in interface SortedMapsubMap in class AbstractObject2ObjectSortedMappublic 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 | |||||||||