|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--jds.collection.Hashtable
Hashtable - collection based on a vector of buckets; for use with book Classic Data Structures in Java by Timothy A Budd, published by Addison-Wesley, 2001.
Collection, Serialized Form| Constructor Summary | |
Hashtable(int n)
initialize a newly created Hash table |
|
Hashtable(int n,
java.util.Comparator test)
initialize a newly created hash table |
|
| Method Summary | |
void |
addElement(java.lang.Object val)
add a new value to the collection |
boolean |
containsElement(java.lang.Object val)
see if collection contains value |
java.util.Enumeration |
elements()
Yields enumerator for collection |
java.lang.Object |
findElement(java.lang.Object val)
find element that will test equal to value |
boolean |
isEmpty()
Determines whether the collection is empty |
void |
removeElement(java.lang.Object val)
remove a new value from the collection |
int |
size()
Determines number of elements in collection |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public Hashtable(int n)
n - the number of buckets in the hash table
public Hashtable(int n,
java.util.Comparator test)
n - the number of buckets in the hash tabletest - a comparator used to order values| Method Detail |
public boolean isEmpty()
public int size()
public java.util.Enumeration elements()
Enumeration that will yield the elements of the collectionEnumerationpublic void addElement(java.lang.Object val)
value - element to be inserted into collectionpublic boolean containsElement(java.lang.Object val)
value - element to be testedpublic java.lang.Object findElement(java.lang.Object val)
value - element to be testedequals to argumentpublic void removeElement(java.lang.Object val)
value - element to be removed from collection
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||