|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--arlut.csd.ganymede.DBBaseFieldTable
A customized variant of the java.util.Hashtable class that is
tuned for use in managing
DBObjectBaseFields
in a Ganymede DBObjectBase.
| Field Summary | |
private int |
count
The total number of entries in the hash table. |
private float |
loadFactor
The load factor for the hashtable. |
private arlut.csd.ganymede.DBObjectBaseField[] |
table
The hash table data. |
private int |
threshold
Rehashes the table when count exceeds this threshold. |
| Constructor Summary | |
DBBaseFieldTable()
Constructs a new, empty DBBaseFieldTable with a default capacity and load factor. |
|
DBBaseFieldTable(int initialCapacity)
Constructs a new, empty DBBaseFieldTable with the specified initial capacity and default load factor. |
|
DBBaseFieldTable(int initialCapacity,
float loadFactor)
Constructs a new, empty DBBaseFieldTable with the specified initial capacity and the specified load factor. |
|
| Method Summary | |
void |
clear()
Clears this DBBaseFieldTable. |
boolean |
contains(arlut.csd.ganymede.DBObjectBaseField value)
Tests if the DBObjectBaseField value is contained in this DBBaseFieldTable. |
boolean |
containsKey(short key)
Tests if a DBObjectBaseField with the specified object id is in this DBBaseFieldTable. |
boolean |
containsKey(java.lang.Short key)
Tests if a DBObjectBaseField with the specified object id is in this DBBaseFieldTable. |
java.util.Enumeration |
elements()
Returns an enumeration of the objects in this DBBaseFieldTable. |
arlut.csd.ganymede.DBObjectBaseField |
get(short key)
Returns the DBObjectBaseField with the specified key from this DBBaseFieldTable, or null if no object with that id is in this table. |
arlut.csd.ganymede.DBObjectBaseField |
getNoSync(short key)
Returns the DBObjectBaseField with the specified key from this DBBaseFieldTable, or null if no object with that id is in this table. |
boolean |
isEmpty()
Tests if this DBBaseFieldTable contains no objects. |
void |
put(arlut.csd.ganymede.DBObjectBaseField value)
Inserts a DBObjectBaseField into this DBBaseFieldTable |
void |
putNoSync(arlut.csd.ganymede.DBObjectBaseField value)
Inserts a DBObjectBaseField into this DBBaseFieldTable. |
void |
putNoSyncNoRemove(arlut.csd.ganymede.DBObjectBaseField value)
Inserts a DBObjectBaseField into this DBBaseFieldTable. |
protected void |
rehash()
Rehashes the contents of the DBBaseFieldTable into a DBBaseFieldTable with a larger capacity. |
void |
remove(short key)
Removes the DBObjectBaseField with the given id from this DBBaseFieldTable. |
void |
removeNoSync(short key)
Removes the DBObjectBaseField with the given id from this DBBaseFieldTable. |
int |
size()
Returns the number of objects in this DBBaseFieldTable. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private transient arlut.csd.ganymede.DBObjectBaseField[] table
private transient int count
private int threshold
private float loadFactor
| Constructor Detail |
public DBBaseFieldTable(int initialCapacity,
float loadFactor)
initialCapacity - the initial capacity of the hashtable.loadFactor - a number between 0.0 and 1.0.
java.lang.IllegalArgumentException - if the initial capacity is less
than or equal to zero, or if the load factor is less than
or equal to zero.public DBBaseFieldTable(int initialCapacity)
initialCapacity - the initial capacity of the hashtable.public DBBaseFieldTable()
| Method Detail |
public int size()
public boolean isEmpty()
true if this DBBaseFieldTable contains no values;
false otherwise.public java.util.Enumeration elements()
Enumerationpublic boolean contains(arlut.csd.ganymede.DBObjectBaseField value)
value - a DBObjectBaseField to search for.
java.lang.NullPointerException - if the value is null.public boolean containsKey(java.lang.Short key)
key - possible object id.public boolean containsKey(short key)
key - possible object id.public arlut.csd.ganymede.DBObjectBaseField getNoSync(short key)
public arlut.csd.ganymede.DBObjectBaseField get(short key)
protected void rehash()
public void putNoSync(arlut.csd.ganymede.DBObjectBaseField value)
public void put(arlut.csd.ganymede.DBObjectBaseField value)
public void putNoSyncNoRemove(arlut.csd.ganymede.DBObjectBaseField value)
public void removeNoSync(short key)
public void remove(short key)
public void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||