com.caucho.hessian.util
类 IdentityIntMap

java.lang.Object
  继承者 com.caucho.hessian.util.IdentityIntMap

public class IdentityIntMap
extends java.lang.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.


字段摘要
static int NULL
          Encoding of a null entry.
static int[] PRIMES
           
 
构造方法摘要
IdentityIntMap(int capacity)
          Create a new IntMap.
 
方法摘要
 void clear()
          Clear the hashmap.
 int get(java.lang.Object key)
          Puts a new value in the property table with the appropriate flags
static int getBiggestPrime(int value)
           
 int put(java.lang.Object key, int value, boolean isReplace)
          Puts a new value in the property table with the appropriate flags
 void remove(java.lang.Object key)
          Removes a value in the property table.
 int size()
          Returns the current number of entries in the map.
 java.lang.String toString()
           
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

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.

另请参见:
常量字段值

PRIMES

public static final int[] PRIMES
构造方法详细信息

IdentityIntMap

public IdentityIntMap(int capacity)
Create a new IntMap. Default size is 16.

方法详细信息

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(java.lang.Object key)
Puts a new value in the property table with the appropriate flags


put

public final int put(java.lang.Object key,
                     int value,
                     boolean isReplace)
Puts a new value in the property table with the appropriate flags


remove

public final void remove(java.lang.Object key)
Removes a value in the property table.


toString

public java.lang.String toString()
覆盖:
java.lang.Object 中的 toString

getBiggestPrime

public static int getBiggestPrime(int value)