public class DoublyIndexedTable
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DoublyIndexedTable.Entry
An entry in the
DoublyIndexedTable . |
protected class |
DoublyIndexedTable.TableIterator
An Iterator class for a
DoublyIndexedTable . |
Modifier and Type | Field and Description |
---|---|
protected int |
count
The number of entries
|
protected int |
initialCapacity
The initial capacity
|
protected DoublyIndexedTable.Entry[] |
table
The underlying array
|
Constructor and Description |
---|
DoublyIndexedTable()
Creates a new DoublyIndexedTable.
|
DoublyIndexedTable(DoublyIndexedTable other)
Creates a new DoublyIndexedTable initialized to contain all of
the entries of the specified other DoublyIndexedTable.
|
DoublyIndexedTable(int c)
Creates a new DoublyIndexedTable.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the table.
|
java.lang.Object |
get(java.lang.Object o1,
java.lang.Object o2)
Gets the value of an entry
|
java.lang.Object[] |
getValuesArray()
Returns an array of all of the values in the table.
|
protected int |
hashCode(java.lang.Object o1,
java.lang.Object o2)
Computes a hash code corresponding to the given objects.
|
java.util.Iterator |
iterator()
Returns an iterator on the entries of the table.
|
java.lang.Object |
put(java.lang.Object o1,
java.lang.Object o2,
java.lang.Object value)
Puts a value in the table.
|
protected void |
rehash()
Rehash the table
|
java.lang.Object |
remove(java.lang.Object o1,
java.lang.Object o2)
Removes an entry from the table.
|
int |
size()
Returns the size of this table.
|
protected int initialCapacity
protected DoublyIndexedTable.Entry[] table
protected int count
public DoublyIndexedTable()
public DoublyIndexedTable(int c)
c
- The inital capacity.public DoublyIndexedTable(DoublyIndexedTable other)
public int size()
public java.lang.Object put(java.lang.Object o1, java.lang.Object o2, java.lang.Object value)
public java.lang.Object get(java.lang.Object o1, java.lang.Object o2)
public java.lang.Object remove(java.lang.Object o1, java.lang.Object o2)
public java.lang.Object[] getValuesArray()
public void clear()
public java.util.Iterator iterator()
protected void rehash()
protected int hashCode(java.lang.Object o1, java.lang.Object o2)
Copyright © 2022 Apache Software Foundation. All Rights Reserved.