Class IntTable
java.lang.Object
org.apache.batik.dom.util.IntTable
- All Implemented Interfaces:
Serializable
A simple hashtable, not synchronized, with fixed load factor,
that maps objects to ints.
This implementation is not Thread-safe.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe number of entriesprotected static final intThe initial capacityprotected IntTable.Entry[]The underlying array -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the table.intDecrements the value associated with the given key.protected IntTable.EntryFinds the Entry with the given key.intReturns the value associated with the given key.intIncrements the value associated with the given key.intSets the value associated with the given key.protected voidrehash()Rehashes the table.intRemoves an entry from the table.intsize()Returns the size of this table.
-
Field Details
-
INITIAL_CAPACITY
protected static final int INITIAL_CAPACITYThe initial capacity- See Also:
-
table
The underlying array -
count
protected int countThe number of entries
-
-
Constructor Details
-
IntTable
public IntTable()Creates a new table. -
IntTable
public IntTable(int c) Creates a new table.- Parameters:
c- The initial capacity.
-
IntTable
Creates a copy of the given HashTable object.- Parameters:
t- The table to copy.
-
-
Method Details
-
size
public int size()Returns the size of this table. -
find
Finds the Entry with the given key. -
get
Returns the value associated with the given key. -
put
Sets the value associated with the given key. -
inc
Increments the value associated with the given key. -
dec
Decrements the value associated with the given key. -
remove
Removes an entry from the table. -
clear
public void clear()Clears the table. -
rehash
protected void rehash()Rehashes the table.
-