|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.Maps
A class providing static methods and objects that do useful things with maps.
Collections
Field Summary | |
static Object |
MISSING
A standard default return value to be used in maps contaning null values.
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Object MISSING
null
values.
Maps with object values containing null
values are usually
problematic because there is no way to tell whether get()
,
put()
and remove()
did not find a key or the
key was found but the associated value is null
. This object can be used
as a default return value to solve this problem:
m = new Object2ObjectAVLTreeMap(); m.defaultReturnValue(MISSING); [...] v = m.get(k); if (MISSING == v) ... // not found else ... // found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |