|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mhhe.clrs2e.DynamicSetElement.Helper
Inner class to define static helper methods.
Constructor Summary | |
DynamicSetElement.Helper()
|
Method Summary | |
static com.mhhe.clrs2e.DynamicSetElement |
cast(java.lang.Object o)
Casts an object to DynamicSetElement , throwing
a ClassCastException if the object fails to
implement the DynamicSetElement interface. |
static int |
compareTo(com.mhhe.clrs2e.DynamicSetElement e,
java.lang.Object o)
Compares a DynamicSetElement to another
object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DynamicSetElement.Helper()
Method Detail |
public static int compareTo(com.mhhe.clrs2e.DynamicSetElement e, java.lang.Object o)
DynamicSetElement
to another
object. If the other object is also a
DynamicSetElement
, the keys of both are
compared. If the other object is not a
DynamicSetElement
object but does implement
Comparable
, then the key of of the
DynamicSetElement
is compared to the other
object. Otherwise, the other object does not implement
Comparable
, and a
ClassCastException
is thrown.
e
- The DynamicSetElement
.o
- The other object.
e
is less; 0 if
the objects are equal; a positive integer if e
is greater.
java.lang.ClassCastException
- if o
does not
implement Comparable
.public static com.mhhe.clrs2e.DynamicSetElement cast(java.lang.Object o)
DynamicSetElement
, throwing
a ClassCastException
if the object fails to
implement the DynamicSetElement
interface.
o
- The object.
o
, but cast as a
DynamicSetElement
.
java.lang.ClassCastException
- if o
does not
implement the DynamicSetElement
interface.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |