I have been looking into the documentation of Trove4j library. Particularly the TObjectIntMap
interface. According to the documentation of the library the get method returns null
if the key is not present in the map. The documentation I am referring to can be seen here:
http://trove4j.sourceforge.net/javadocs/gnu/trove/map/TObjectIntMap.html#get%28java.lang.Object%29
At the time of reading (27/02/2014) the documentation states
int get(java.lang.Object key)
"Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key."
My question is:
How is it possible for the method to return null
when the return type is the primitive int
. As far as I know it is only possible for Integer
references to be null
. Is it a documentation error?