|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--Opus5.AbstractObject
|
+--Opus5.AbstractContainer
|
+--Opus5.AbstractSearchableContainer
|
+--Opus5.AbstractHashTable
|
+--Opus5.OpenScatterTable
Open scatter table implemented using an array.
HashTable| Inner Class Summary | |
protected static class |
OpenScatterTable.Entry
Entry data structure. |
| Field Summary | |
protected OpenScatterTable.Entry[] |
array
An array of entries. |
| Fields inherited from class Opus5.AbstractContainer |
count |
| Fields inherited from interface Opus5.HashTable |
copyright |
| Constructor Summary | |
OpenScatterTable(int length)
Constructs an OpenScatterTable with the specified length. |
|
| Method Summary | |
void |
accept(Visitor visitor)
Accepts the specified visitor and makes it visit all the objects in this open scatter table. |
protected static int |
c(int i)
Implements the linear-probing collision resolution strategy. |
protected int |
compareTo(Comparable arg)
Compares this open scatter table with the specified comparable object. |
Comparable |
find(Comparable object)
Finds an object in this open scatter table that matches the specified object. |
protected int |
findInstance(Comparable object)
Finds the position of the specified object in this open scatter table. |
protected int |
findMatch(Comparable object)
Finds the position of an object in this open scatter table that matches the given object. |
protected int |
findUnoccupied(java.lang.Object object)
Finds the position of an unoccupied entry into which the specified object can be stored. |
Enumeration |
getEnumeration()
Returns an enumeration that enumerates the objects in this open scatter table. |
int |
getLength()
Returns the length of this open scatter table. |
void |
insert(Comparable object)
Inserts the specified comparable object into this open scatter table. |
boolean |
isFull()
Tests if this open scatter table is full. |
boolean |
isMember(Comparable object)
Tests whether the specified object is contained in this open scatter table. |
void |
purge()
Purges this open scatter table, making it empty. |
void |
withdraw(Comparable object)
Withdraws the specified object from this open scatter table. |
| Methods inherited from class Opus5.AbstractHashTable |
f, g, getLoadFactor, h |
| Methods inherited from class Opus5.AbstractContainer |
getCount, hashCode, isEmpty, toString |
| Methods inherited from class Opus5.AbstractObject |
compare, equals, isEQ, isGE, isGT, isLE, isLT, isNE |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface Opus5.Container |
getCount, isEmpty |
| Methods inherited from interface Opus5.Comparable |
compare, isEQ, isGE, isGT, isLE, isLT, isNE |
| Field Detail |
protected OpenScatterTable.Entry[] array
| Constructor Detail |
public OpenScatterTable(int length)
OpenScatterTable with the specified length.length - The desired length.| Method Detail |
public int getLength()
getLength in class AbstractHashTablepublic void purge()
public boolean isFull()
isFull in class AbstractContainerpublic void accept(Visitor visitor)
accept in class AbstractContainervisitor - The visitor to accept.protected static int c(int i)
i - The probe number.iprotected int findUnoccupied(java.lang.Object object)
object - The object to be stored.ContainerFullException - If the open scatter table is full.public void insert(Comparable object)
object - The object to insert.ContainerFullException - If this open scatter table is full.protected int findMatch(Comparable object)
object - The object to match.-1 if no match.public Comparable find(Comparable object)
object - The object to match.null if no match.protected int findInstance(Comparable object)
object - The object for which to look.-1 if it is not in the table.public void withdraw(Comparable object)
object - The object to be withdrawn.ContainerEmptyException - If this open scatter table is empty.java.lang.IllegalArgumentException - If the specified object is not in this open scatter table.public boolean isMember(Comparable object)
object - The object for which to look.public Enumeration getEnumeration()
protected int compareTo(Comparable arg)
compareTo in class AbstractObjectarg - The object with which this open scatter table is compared.MethodNotImplemented - Always.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||