|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--csc241.samples.Set.hashTable
Constructor Summary | |
hashTable(int arraySize)
Construct an empty hashTable with an array with the array size given |
Method Summary | |
void |
add(java.lang.Comparable e)
add an element to the hashTable. |
void |
dump()
The the content of the hash table is displayed in the form of a table with chains starting from each cell. |
java.lang.Comparable |
find(java.lang.Comparable e)
find and return the element in the hashTable or return null e - the element to be searched for |
void |
remove(java.lang.Comparable e)
remove an element from the hashTable; do nothing if element is not there. e - the element to be removed |
int |
size()
return the size of the hashTable (i.e. |
java.lang.Comparable[] |
toArray()
The toArray method creates and returns an array containing all elements in the hashTable. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public hashTable(int arraySize)
Method Detail |
public void add(java.lang.Comparable e)
add
in interface Set
public void remove(java.lang.Comparable e)
remove
in interface Set
public java.lang.Comparable find(java.lang.Comparable e)
find
in interface Set
public int size()
size
in interface Set
public void dump()
dump
in interface Set
public java.lang.Comparable[] toArray()
toArray
in interface Set
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |