|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ComparableElement<E>
Defines an interface to that an object can provide a comparison of itself to others of its type, with the comparison returned as an object.
Nested Class Summary | |
---|---|
static interface |
ComparableElement.Comparison<E>
A comparison of the typed element. |
Method Summary | |
---|---|
int |
compareTo(E element)
The recommended implementation of this method is: public int compareTo(E element)
{
return comparison(element).value();
}
|
ComparableElement.Comparison<E> |
compareWith(E element)
Returns a result that provides a ComparableElement.Comparison of this element
with that of the element parameter. |
Method Detail |
---|
ComparableElement.Comparison<E> compareWith(E element)
ComparableElement.Comparison
of this element
with that of the element parameter.
element
- to be compared with.
int compareTo(E element)
public int compareTo(E element)
{
return comparison(element).value();
}
compareTo
in interface java.lang.Comparable<E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |