Class DoublyIndexedTable
java.lang.Object
org.apache.batik.util.DoublyIndexedTable
This class represents a doubly indexed hash table.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn entry in theDoublyIndexedTable.protected classAn Iterator class for aDoublyIndexedTable. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe number of entriesprotected intThe initial capacityprotected DoublyIndexedTable.Entry[]The underlying array -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new DoublyIndexedTable.DoublyIndexedTable(int c) Creates a new DoublyIndexedTable.Creates a new DoublyIndexedTable initialized to contain all of the entries of the specified other DoublyIndexedTable. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the table.Gets the value of an entryObject[]Returns an array of all of the values in the table.protected intComputes a hash code corresponding to the given objects.iterator()Returns an iterator on the entries of the table.Puts a value in the table.protected voidrehash()Rehash the tableRemoves an entry from the table.intsize()Returns the size of this table.
-
Field Details
-
initialCapacity
protected int initialCapacityThe initial capacity -
table
The underlying array -
count
protected int countThe number of entries
-
-
Constructor Details
-
DoublyIndexedTable
public DoublyIndexedTable()Creates a new DoublyIndexedTable. -
DoublyIndexedTable
public DoublyIndexedTable(int c) Creates a new DoublyIndexedTable.- Parameters:
c- The inital capacity.
-
DoublyIndexedTable
Creates a new DoublyIndexedTable initialized to contain all of the entries of the specified other DoublyIndexedTable.
-
-
Method Details
-
size
public int size()Returns the size of this table. -
put
-
get
-
remove
-
getValuesArray
Returns an array of all of the values in the table. -
clear
public void clear()Clears the table. -
iterator
Returns an iterator on the entries of the table. -
rehash
protected void rehash()Rehash the table -
hashCode
-