|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.batik.dom.util.IntTable
public class IntTable
A simple hashtable, not synchronized, with fixed load factor, that maps objects to ints. This implementation is not Thread-safe.
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(Object key)
Decrements the value associated with the given key. |
protected IntTable.Entry |
find(Object key)
Finds the Entry with the given key. |
int |
get(Object key)
Returns the value associated with the given key. |
int |
inc(Object key)
Increments the value associated with the given key. |
int |
put(Object key,
int value)
Sets the value associated with the given key. |
protected void |
rehash()
Rehashes the table. |
int |
remove(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 |
---|
protected static final int INITIAL_CAPACITY
protected IntTable.Entry[] table
protected int count
Constructor Detail |
---|
public IntTable()
public IntTable(int c)
c
- The initial capacity.public IntTable(IntTable t)
t
- The table to copy.Method Detail |
---|
public int size()
protected IntTable.Entry find(Object key)
public int get(Object key)
public int put(Object key, int value)
public int inc(Object key)
public int dec(Object key)
public int remove(Object key)
public void clear()
protected void rehash()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |