Package com.caucho.hessian.util
Class IdentityIntMap
java.lang.Object
com.caucho.hessian.util.IdentityIntMap
The IntMap provides a simple hashmap from keys to integers. The API is
an abbreviation of the HashMap collection API.
The convenience of IntMap is avoiding all the silly wrapping of integers.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear the hashmap.final intPuts a new value in the property table with the appropriate flagsstatic intgetBiggestPrime(int value) protected intfinal intPuts a new value in the property table with the appropriate flagsfinal voidRemoves a value in the property table.final intsize()Returns the current number of entries in the map.toString()
-
Field Details
-
NULL
public static final int NULLEncoding of a null entry. Since NULL is equal to Integer.MIN_VALUE, it's impossible to distinguish between the two.- See Also:
-
PRIMES
public static final int[] PRIMES
-
-
Constructor Details
-
IdentityIntMap
public IdentityIntMap(int capacity) Create a new IntMap. Default size is 16.
-
-
Method Details
-
clear
public void clear()Clear the hashmap. -
size
public final int size()Returns the current number of entries in the map. -
get
Puts a new value in the property table with the appropriate flags -
put
Puts a new value in the property table with the appropriate flags -
remove
Removes a value in the property table. -
hashCode
-
toString
-
getBiggestPrime
public static int getBiggestPrime(int value)
-