Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.caucho.util
Class IntMap

    java.lang.Object
      |
      +--com.caucho.util.IntMap

Direct Known Subclasses:
  ConstIntMap

public class IntMap
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.

Field Summary
`static int` | `NULL` Encoding of a null entry.

Constructor Summary
`IntMap()` Create a new IntMap.

Method Summary
`void` | `clear()` Clear the hashmap.
`int` | `get(java.lang.Object key)` Puts a new value in the property table with the appropriate flags
`java.util.Iterator` | `iterator()` Returns an iterator of the keys.
`int` | `put(java.lang.Object key, int value)` Puts a new value in the property table with the appropriate flags
`int` | `remove(java.lang.Object key)` Deletes the entry.
`int` | `size()` Returns the current number of entries in the map.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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.

Constructor Detail

### IntMap

    public IntMap()

  Create a new IntMap. Default size is 16.

Method Detail

### clear

    public void clear()

  Clear the hashmap.

### size

    public int size()

  Returns the current number of entries in the map.

### get

    public int get(java.lang.Object key)

  Puts a new value in the property table with the appropriate flags

### put

    public int put(java.lang.Object key,
                   int value)

  Puts a new value in the property table with the appropriate flags

### remove

    public int remove(java.lang.Object key)

  Deletes the entry. Returns true if successful.

### iterator

    public java.util.Iterator iterator()

  Returns an iterator of the keys.

### toString

    public java.lang.String toString()

  Overrides:
    toString in class java.lang.Object

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD