|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for dictionary data structures, defined on page 197 of
Introduction to Algorithms, Second edition. Any object
inserted into a dictionary must implement the
Comparable
interface. In addition, for specific
implementations of the Dictionary
interface, there may
be stronger restrictions on inserted objects, such as having to
implement the DynamicSetElement
interface.
Method Summary | |
void |
delete(java.lang.Object handle)
Removes an element. |
java.lang.Object |
insert(java.lang.Comparable o)
Inserts an element that implements Comparable . |
java.lang.Object |
search(java.lang.Comparable k)
Searches for an element with a given key. |
Method Detail |
public java.lang.Object insert(java.lang.Comparable o)
Comparable
.
o
- The element to insert.
public void delete(java.lang.Object handle)
handle
- A handle to the element to remove.public java.lang.Object search(java.lang.Comparable k)
DynamicSetElement.Helper.compareTo(com.mhhe.clrs2e.DynamicSetElement, java.lang.Object)
.
k
- The key being searched for.
null
if
there is no match.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |