|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.shorts.AbstractShort2CharMap
it.unimi.dsi.fastutil.shorts.Short2CharRBTreeMap
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.
Field Summary | |
static long |
serialVersionUID
|
Constructor Summary | |
Short2CharRBTreeMap()
Creates a new empty tree map. |
|
Short2CharRBTreeMap(Comparator c)
Creates a new empty tree map with the given comparator. |
|
Short2CharRBTreeMap(Map m)
Creates a new tree map copying a given map. |
|
Short2CharRBTreeMap(Short2CharMap m)
Creates a new tree map copying a given map. |
|
Short2CharRBTreeMap(Short2CharSortedMap m)
Creates a new tree map copying a given sorted map (and its Comparator ). |
|
Short2CharRBTreeMap(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(short k)
|
boolean |
containsValue(char v)
|
Set |
entrySet()
|
Object |
firstKey()
|
short |
firstShortKey()
|
Object |
get(Object ok)
|
char |
get(short k)
Returns the value to which the given key is mapped. |
SortedMap |
headMap(Object to)
|
Short2CharSortedMap |
headMap(short to)
|
boolean |
isEmpty()
|
Set |
keySet()
Returns a type-specific sorted set view of the keys contained in this map. |
Object |
lastKey()
|
short |
lastShortKey()
|
Object |
put(Object ok,
Object ov)
|
char |
put(short k,
char v)
Adds a pair to the map. |
Object |
remove(Object ok)
|
char |
remove(short k)
Removes the mapping with the given key. |
int |
size()
|
SortedMap |
subMap(Object from,
Object to)
|
Short2CharSortedMap |
subMap(short from,
short to)
|
SortedMap |
tailMap(Object from)
|
Short2CharSortedMap |
tailMap(short from)
|
Collection |
values()
Returns a type-specific collection view of the values contained in this map. |
Methods inherited from class it.unimi.dsi.fastutil.shorts.AbstractShort2CharMap |
containsKey, containsValue, 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.shorts.Short2CharMap |
defaultReturnValue, defaultReturnValue, getDefRetValue, setDefRetValue |
Methods inherited from interface java.util.Map |
containsKey, containsValue, equals, hashCode, putAll |
Field Detail |
public static final long serialVersionUID
Constructor Detail |
public Short2CharRBTreeMap()
public Short2CharRBTreeMap(Comparator c)
public Short2CharRBTreeMap(Map m)
m
- a Map
to be copied into the new tree map.public Short2CharRBTreeMap(SortedMap m)
Comparator
).
m
- a SortedMap
to be copied into the new tree map.public Short2CharRBTreeMap(Short2CharMap m)
m
- a type-specific map to be copied into the new tree map.public Short2CharRBTreeMap(Short2CharSortedMap m)
Comparator
).
m
- a type-specific sorted map to be copied into the new tree map.Method Detail |
public final char put(short k, char v)
Short2CharMap
put
in interface Short2CharMap
k
- the key.v
- the value.
Map.put(Object,Object)
public final char remove(short k)
Short2CharMap
remove
in interface Short2CharMap
k
-
Map.remove(Object)
public Object put(Object ok, Object ov)
put
in interface Map
public Object remove(Object ok)
remove
in interface Map
public boolean containsValue(char v)
containsValue
in interface Short2CharMap
Map.containsValue(Object)
public void clear()
clear
in interface Map
public boolean containsKey(short k)
containsKey
in interface Short2CharMap
Map.containsKey(Object)
public int size()
size
in interface Map
public boolean isEmpty()
isEmpty
in interface Map
public Object get(Object ok)
get
in interface Map
public char get(short k)
Short2CharMap
get
in interface Short2CharMap
k
- the key.
Map.get(Object)
public short firstShortKey()
firstShortKey
in interface Short2CharSortedMap
SortedMap.firstKey()
public short lastShortKey()
lastShortKey
in interface Short2CharSortedMap
SortedMap.lastKey()
public Object firstKey()
firstKey
in interface SortedMap
public Object lastKey()
lastKey
in interface SortedMap
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
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
public Comparator comparator()
comparator
in interface SortedMap
public SortedMap headMap(Object to)
headMap
in interface SortedMap
public SortedMap tailMap(Object from)
tailMap
in interface SortedMap
public SortedMap subMap(Object from, Object to)
subMap
in interface SortedMap
public Short2CharSortedMap headMap(short to)
headMap
in interface Short2CharSortedMap
SortedMap.headMap(Object)
public Short2CharSortedMap tailMap(short from)
tailMap
in interface Short2CharSortedMap
SortedMap.tailMap(Object)
public Short2CharSortedMap subMap(short from, short to)
subMap
in interface Short2CharSortedMap
SortedMap.subMap(Object,Object)
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 |