T - the type of the object to comparepublic interface SpeakingComparable<T> extends Comparable<T>
Comparable#compareTo(Object).
As mentioned in Comparable the compareTo and equals
does not have strictly to be consistent (
(x.compareTo(y)==0) == (x.equals(y))), even it's recommend and should
be noted. For this reason the equals method here is called equalsTo.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equalsTo(T other)
Returns true if
this is equals other. |
boolean |
greaterOrEqualsThan(T other)
Returns true if
this is greater or equals than other. |
boolean |
greaterThan(T other)
Returns true if
this is greater than other. |
boolean |
lessOrEqualsThan(T other)
Returns true if
this is less or equals than other. |
boolean |
lessThan(T other)
Returns true if
this is less than other. |
boolean |
notEqualsTo(T other)
Returns true if
this is not equals other. |
compareToboolean equalsTo(T other)
this is equals other.other - to compareboolean notEqualsTo(T other)
this is not equals other.other - to compareboolean greaterThan(T other)
this is greater than other.other - to compareboolean greaterOrEqualsThan(T other)
this is greater or equals than other.other - to compareboolean lessThan(T other)
this is less than other.other - to compareboolean lessOrEqualsThan(T other)
this is less or equals than other.other - to compareCopyright © 2014–2015. All rights reserved.