Package com.caucho.hessian.util
Class IntMap
java.lang.Object
com.caucho.hessian.util.IntMap
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 TypeMethodDescriptionvoid
clear()
Clear the hashmap.final int
Puts a new value in the property table with the appropriate flagsstatic int
getBiggestPrime
(int value) protected int
final int
Puts a new value in the property table with the appropriate flagsfinal int
size()
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
-
IntMap
public IntMap()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 -
hashCode
-
toString
-
getBiggestPrime
public static int getBiggestPrime(int value)
-