Package org.apache.batik.dom.util
Class TriplyIndexedTable
- java.lang.Object
-
- org.apache.batik.dom.util.TriplyIndexedTable
-
public class TriplyIndexedTable extends java.lang.Object
This class represents a triply indexed hash table.
Note: This implementation is not Thread-safe.- Version:
- $Id: TriplyIndexedTable.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
TriplyIndexedTable.Entry
To manage collisions
-
Field Summary
Fields Modifier and Type Field Description protected int
count
The number of entriesprotected static int
INITIAL_CAPACITY
The initial capacityprotected TriplyIndexedTable.Entry[]
table
The underlying array
-
Constructor Summary
Constructors Constructor Description TriplyIndexedTable()
Creates a new TriplyIndexedTable.TriplyIndexedTable(int c)
Creates a new TriplyIndexedTable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
get(java.lang.Object o1, java.lang.Object o2, java.lang.Object o3)
Gets the value of an entryprotected int
hashCode(java.lang.Object o1, java.lang.Object o2, java.lang.Object o3)
Computes a hash code corresponding to the given objects.java.lang.Object
put(java.lang.Object o1, java.lang.Object o2, java.lang.Object o3, java.lang.Object value)
Puts a value in the table.protected void
rehash()
Rehash the tableint
size()
Returns the size of this table.
-
-
-
Field Detail
-
INITIAL_CAPACITY
protected static final int INITIAL_CAPACITY
The initial capacity- See Also:
- Constant Field Values
-
table
protected TriplyIndexedTable.Entry[] table
The underlying array
-
count
protected int count
The number of entries
-
-
Method Detail
-
size
public int size()
Returns the size of this table.
-
put
public java.lang.Object put(java.lang.Object o1, java.lang.Object o2, java.lang.Object o3, java.lang.Object value)
Puts a value in the table.- Returns:
- the old value or null
-
get
public java.lang.Object get(java.lang.Object o1, java.lang.Object o2, java.lang.Object o3)
Gets the value of an entry- Returns:
- the value or null
-
rehash
protected void rehash()
Rehash the table
-
hashCode
protected int hashCode(java.lang.Object o1, java.lang.Object o2, java.lang.Object o3)
Computes a hash code corresponding to the given objects.
-
-