|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Dictionary is a random access collection in which search keys are an integral part of a data entry.
Method Summary | |
void |
add(java.lang.Object dat)
dict.add(dat) adds dat to dict. |
void |
clear()
dict.clear() removes all entries from dict. |
java.lang.Object |
dataFor(java.lang.Object k)
dict.dataFor(k) returns the data for key k in dict. |
java.lang.Object |
getKey(java.lang.Object dat)
dict.getKey(dat) returns the key that dict uses for dat. |
boolean |
isKey(java.lang.Object k)
dict.isKey(k) returns true if there is an entry with key k in dict. |
java.util.Iterator |
iterator()
dict.iterator() returns an iterator for all of the entries in dict. |
java.util.Iterator |
iterator(java.lang.Object kLo)
dict.iterator(Object kLo) returns an iterator for the entries in dict whose key is at least kLo. |
java.util.Iterator |
iterator(java.lang.Object kLo,
java.lang.Object kHi)
dict.iterator(Object kLo, Object kHi) returns an iterator for the entries in dict whose key is at least kLo and less than kHi. |
void |
remove(java.lang.Object k)
dict.remove(k) removes the entry for key k from dict. |
int |
size()
dict.size() returns the number of entries in dict. |
Method Detail |
public boolean isKey(java.lang.Object k)
public java.lang.Object getKey(java.lang.Object dat)
public void add(java.lang.Object dat)
Precondition: dict.isKey(dict.getKey(dat)) is false.
public java.lang.Object dataFor(java.lang.Object k)
Precondition: dict.isKey(k) is true.
public void remove(java.lang.Object k)
Precondition: dict.isKey(k) is true.
public int size()
public void clear()
public java.util.Iterator iterator()
public java.util.Iterator iterator(java.lang.Object kLo)
public java.util.Iterator iterator(java.lang.Object kLo, java.lang.Object kHi)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |