Package com.caucho.hessian.util
Class IdentityIntMap
- java.lang.Object
-
- com.caucho.hessian.util.IdentityIntMap
-
public class IdentityIntMap extends Object
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.
-
-
Constructor Summary
Constructors Constructor Description IdentityIntMap(int capacity)Create a new IntMap.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear the hashmap.intget(Object key)Puts a new value in the property table with the appropriate flagsstatic intgetBiggestPrime(int value)protected inthashCode(Object value)intput(Object key, int value, boolean isReplace)Puts a new value in the property table with the appropriate flagsvoidremove(Object key)Removes a value in the property table.intsize()Returns the current number of entries in the map.StringtoString()
-
-
-
Field Detail
-
NULL
public static final int NULL
Encoding of a null entry. Since NULL is equal to Integer.MIN_VALUE, it's impossible to distinguish between the two.- See Also:
- Constant Field Values
-
PRIMES
public static final int[] PRIMES
-
-
Method Detail
-
clear
public void clear()
Clear the hashmap.
-
size
public final int size()
Returns the current number of entries in the map.
-
get
public final int get(Object key)
Puts a new value in the property table with the appropriate flags
-
put
public final int put(Object key, int value, boolean isReplace)
Puts a new value in the property table with the appropriate flags
-
remove
public final void remove(Object key)
Removes a value in the property table.
-
hashCode
protected int hashCode(Object value)
-
getBiggestPrime
public static int getBiggestPrime(int value)
-
-