## org.apache.batik.dom.util
Class IntTable

    java.lang.Object
      org.apache.batik.dom.util.IntTable

All Implemented Interfaces:
  java.io.Serializable

    public class IntTable

extends java.lang.Object
implements java.io.Serializable

A simple hashtable, not synchronized, with fixed load factor, that maps objects to ints. This implementation is not Thread-safe.

See Also:
  Serialized Form

Nested Class Summary
`protected static class` `IntTable.Entry` To manage collisions.

Field Summary
`protected int` `count` The number of entries
`protected static int` `INITIAL_CAPACITY` The initial capacity
`protected IntTable.Entry[]` `table` The underlying array

Constructor Summary
`IntTable()` Creates a new table.
`IntTable(int c)` Creates a new table.
`IntTable(IntTable t)` Creates a copy of the given HashTable object.

Method Summary
`void` `clear()` Clears the table.
`int` `dec(java.lang.Object key)` Decrements the value associated with the given key.
`protected IntTable.Entry` `find(java.lang.Object key)` Finds the Entry with the given key.
`int` `get(java.lang.Object key)` Returns the value associated with the given key.
`int` `inc(java.lang.Object key)` Increments the value associated with the given key.
`int` `put(java.lang.Object key, int value)` Sets the value associated with the given key.
`protected void` `rehash()` Rehashes the table.
`int` `remove(java.lang.Object key)` Removes an entry from the table.
`int` `size()` Returns the size of this table.

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

Field Detail

### INITIAL_CAPACITY

    protected static final int INITIAL_CAPACITY

  The initial capacity

  See Also:
    Constant Field Values

### table

    protected IntTable.Entry[] table

  The underlying array

### count

    protected int count

  The number of entries

Constructor Detail

### IntTable

    public IntTable()

  Creates a new table.

### IntTable

    public IntTable(int c)

  Creates a new table.

  Parameters:
    `c` - The initial capacity.

### IntTable

    public IntTable(IntTable t)

  Creates a copy of the given HashTable object.

  Parameters:
    `t` - The table to copy.

Method Detail

### size

    public int size()

  Returns the size of this table.

### find

    protected IntTable.Entry find(java.lang.Object key)

  Finds the Entry with the given key.

### get

    public int get(java.lang.Object key)

  Returns the value associated with the given key.

### put

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

  Sets the value associated with the given key.

### inc

    public int inc(java.lang.Object key)

  Increments the value associated with the given key.

### dec

    public int dec(java.lang.Object key)

  Decrements the value associated with the given key.

### remove

    public int remove(java.lang.Object key)

  Removes an entry from the table.

### clear

    public void clear()

  Clears the table.

### rehash

    protected void rehash()

  Rehashes the table.

Copyright © 2008 Apache Software Foundation. All Rights Reserved.