|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Method Summary | |
boolean |
changeValue(java.lang.Object oldKey,
java.lang.Object newValue)
Associates a new value with an existing key in the Dictionary. |
java.lang.Object |
find(java.lang.Object key)
Finds the value associated with the given key in the Dictionary. |
java.util.Comparator |
getComparator()
Returns the comparator used to order this Dictionary. |
java.util.List |
getEntryList()
Gets a List view of the data in the Dictionary. |
int |
getSize()
Retrieves the number of elements in the Dictionary. |
boolean |
insert(java.lang.Object key,
java.lang.Object value)
Inserts a new key/value pair into the Dictionary. |
void |
print(java.io.PrintWriter writer)
Pretty-print the tree for debugging purposes (optional). |
Method Detail |
public int getSize()
public java.util.Comparator getComparator()
public java.lang.Object find(java.lang.Object key)
key
- The key to search for.
null
if key is not in the BST.public java.util.List getEntryList()
Map.Entry
interface
(specified in the java.util
package).
public void print(java.io.PrintWriter writer)
writer
- The print writer to output the tree onto.
java.lang.UnsupportedOperationException
- if the underlying Dictionary
does not want to define a pretty-print function, this exception is
thrown.public boolean insert(java.lang.Object key, java.lang.Object value)
key
- key with which newValue
will be associated.value
- the value to be associated with newKeyh
public boolean changeValue(java.lang.Object oldKey, java.lang.Object newValue)
oldKey
- The key whose value will be changed.newValue
- The new value to associated with oldKey
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |