org.mov.ui
Interface TwoWayComparable
- All Known Implementing Classes:
- AccountNameFormat
public interface TwoWayComparable
A version of the Comparable interface which allow objects to be sorted
differently in forward and backwards order.
This means that the ordering is not simply the reverse ordering
when the reverse flag is set. This is useful for orderings where
certain elements should always remain at the top or the bottom of the sort,
e.g. summation values. E.g. A, B, C, Total and C, B, A, Total.
This comparable is supported in the SortedTable
.
- Author:
- Andrew Leppard
Method Summary |
int |
compareTo(java.lang.Object object,
boolean reverse)
Compare this object with the specified object. |
compareTo
int compareTo(java.lang.Object object,
boolean reverse)
- Compare this object with the specified object.
- Parameters:
object
- object to compare withreverse
- order of sort, if set reverse the order.
- Returns:
- the value
0
if the objects are equal;
1
if this object is after the specified object or
-1
if this object is before the specified object