public class SoftDoublyIndexedTable extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
SoftDoublyIndexedTable.Entry
To manage collisions
|
Modifier and Type | Field and Description |
---|---|
protected int |
count
The number of entries
|
protected static int |
INITIAL_CAPACITY
The initial capacity
|
protected ReferenceQueue |
referenceQueue
The reference queue.
|
protected SoftDoublyIndexedTable.Entry[] |
table
The underlying array
|
Constructor and Description |
---|
SoftDoublyIndexedTable()
Creates a new SoftDoublyIndexedTable.
|
SoftDoublyIndexedTable(int c)
Creates a new DoublyIndexedTable.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the table.
|
Object |
get(Object o1,
Object o2)
Gets the value of a variable
|
protected int |
hashCode(Object o1,
Object o2)
Computes a hash code corresponding to the given objects.
|
Object |
put(Object o1,
Object o2,
Object value)
Sets a new value for the given variable
|
protected void |
rehash()
Rehash the table
|
protected void |
removeClearedEntries()
Removes the cleared entries.
|
int |
size()
Returns the size of this table.
|
protected static final int INITIAL_CAPACITY
protected SoftDoublyIndexedTable.Entry[] table
protected int count
protected ReferenceQueue referenceQueue
public SoftDoublyIndexedTable()
public SoftDoublyIndexedTable(int c)
c
- The inital capacity.public int size()
public Object put(Object o1, Object o2, Object value)
public void clear()
protected void rehash()
protected int hashCode(Object o1, Object o2)
protected void removeClearedEntries()
Copyright © 2000–2023 Apache Software Foundation. All rights reserved.