|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--jds.collection.MapAdapter
MapAdapter - collection of key/value pairs; for use with book Classic Data Structures in Java by Timothy A Budd, published by Addison-Wesley, 2001.
Collection, Serialized Form| Constructor Summary | |
MapAdapter(Bag aBag)
initialize newly created Map |
|
MapAdapter(Bag aBag,
java.util.Comparator t)
initialize newly created Map |
|
| Method Summary | |
boolean |
containsKey(java.lang.Object key)
see if collection contains element with given key |
java.util.Enumeration |
elements()
Yields enumerator for collection |
java.lang.Object |
get(java.lang.Object key)
return object stored under given key |
boolean |
isEmpty()
Determines whether the collection is empty |
void |
removeKey(java.lang.Object key)
remove element with given key |
void |
set(java.lang.Object key,
java.lang.Object newValue)
establish new key/value connection, or replace value associated with key |
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 MapAdapter(Bag aBag)
aBag - the set to hold the underlying data values
public MapAdapter(Bag aBag,
java.util.Comparator t)
aBag - the set to hold the underlying data valuest - the comparator object used to order map keys| Method Detail |
public boolean isEmpty()
public int size()
public java.util.Enumeration elements()
Enumeration that will yield the elements of the collectionEnumerationpublic boolean containsKey(java.lang.Object key)
key - index for element to be testedpublic java.lang.Object get(java.lang.Object key)
key - index for element to be accessedpublic void removeKey(java.lang.Object key)
key - index for element to be removed
public void set(java.lang.Object key,
java.lang.Object newValue)
key - index for element to be testedvalue - element to be associated with key
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||