ModSQL
Class Select.OrderByComparator
java.lang.Object
|
+--ModSQL.Select.OrderByComparator
- All Implemented Interfaces:
- Comparator
- Enclosing class:
- Select
- class Select.OrderByComparator
- extends Object
- implements Comparator
Comparator for sorting rows when evaluating ORDER BY. Objects passed
to these methods are expected to be of the type Object[][]. The first
index (ie. obj[0]) should be an array of order_by.length values that
are to be compared. Additional indicies (ie. obj[1], etc.) are just
long for the ride.
|
Method Summary |
int |
compare(Object o1,
Object o2)
Compare two arrays of the type Object[][]. |
boolean |
equals(Object obj)
Test if the two comparators are from the same Select object. |
private Select |
query()
Used in equals() above. |
| Methods inherited from class java.lang.Object |
, clone, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
Select.OrderByComparator
Select.OrderByComparator()
compare
public int compare(Object o1,
Object o2)
- Compare two arrays of the type Object[][].
- Specified by:
compare in interface Comparator
- Parameters:
o1 - the first object to be comparedo2 - the second object to be compared
equals
public boolean equals(Object obj)
- Test if the two comparators are from the same Select object.
- Specified by:
equals in interface Comparator- Overrides:
equals in class Object
- Parameters:
obj - the reference object with which to compare
query
private Select query()
- Used in equals() above. I can't figure out how to do this without a
method like this one.
- Returns:
- reference to outer object