|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A type-specific Map
; provides some additional methods that use polymorphism to reduce type juggling.
Map
Nested Class Summary | |
static interface |
Short2LongMap.Entry
A type-specific Map.Entry ; provides some additional methods
to access its content reducing type juggling. |
Method Summary | |
boolean |
containsKey(short key)
|
boolean |
containsValue(long value)
|
long |
defaultReturnValue()
Gets the default return value. |
void |
defaultReturnValue(long rv)
Sets the default return value. |
long |
get(short key)
Returns the value to which the given key is mapped. |
long |
getDefRetValue()
Deprecated. As of fastutil 2.0, replaced by defaultReturnValue() . |
long |
put(short key,
long value)
Adds a pair to the map. |
long |
remove(short key)
Removes the mapping with the given key. |
void |
setDefRetValue(long rv)
Deprecated. As of fastutil 2.0, replaced by defaultReturnValue() . |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Method Detail |
public long put(short key, long value)
key
- the key.value
- the value.
Map.put(Object,Object)
public long get(short key)
key
- the key.
Map.get(Object)
public long remove(short key)
key
-
Map.remove(Object)
public boolean containsKey(short key)
Map.containsKey(Object)
public boolean containsValue(long value)
Map.containsValue(Object)
public void setDefRetValue(long rv)
fastutil
2.0, replaced by defaultReturnValue()
.
get()
, put()
and remove()
to denote
that the map does not contain the specified key. It is 0/false
/null
by default.
rv
- the new default return value.getDefRetValue()
,
defaultReturnValue()
public long getDefRetValue()
fastutil
2.0, replaced by defaultReturnValue()
.
defaultReturnValue()
public void defaultReturnValue(long rv)
get()
, put()
and
remove()
to denote that the map does not contain the
specified key. It is 0/false
/null
by default.
rv
- the new default return value.defaultReturnValue()
public long defaultReturnValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |