T - the typepublic interface Comparing<T>
extends java.lang.Comparable<T>
lt, lte, gt, gte, which
parallel the equals method. This is similar to Ruby, where defining the
<=> method (the "spaceship" method) results in the equivalent generation of
<, <=, etc.| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(T other)
Compares the two objects, including testing for null.
|
boolean |
gt(T other)
Returns whether x is greater than y.
|
boolean |
gte(T other)
Returns whether x is greater than or equal to y.
|
boolean |
lt(T other)
Returns whether x is less than y.
|
boolean |
lte(T other)
Returns whether x is less than or equal to y.
|
int compareTo(T other)
compareTo in interface java.lang.Comparable<T>other - the other valueboolean lt(T other)
other - the other valueboolean lte(T other)
other - the other valueboolean gt(T other)
other - the other valueboolean gte(T other)
other - the other value