Package org.apache.batik.dom.util
Class TriplyIndexedTable
java.lang.Object
org.apache.batik.dom.util.TriplyIndexedTable
This class represents a triply indexed hash table.
Note: This implementation is not Thread-safe.
Note: This implementation is not Thread-safe.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
To manage collisions -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
The number of entriesprotected static final int
The initial capacityprotected TriplyIndexedTable.Entry[]
The underlying array -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TriplyIndexedTable.TriplyIndexedTable
(int c) Creates a new TriplyIndexedTable. -
Method Summary
-
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
-
TriplyIndexedTable
public TriplyIndexedTable()Creates a new TriplyIndexedTable. -
TriplyIndexedTable
public TriplyIndexedTable(int c) Creates a new TriplyIndexedTable.- Parameters:
c
- The inital capacity.
-
-
Method Details
-
size
public int size()Returns the size of this table. -
put
Puts a value in the table.- Returns:
- the old value or null
-
get
Gets the value of an entry- Returns:
- the value or null
-
rehash
protected void rehash()Rehash the table -
hashCode
Computes a hash code corresponding to the given objects.
-