public class ListComparator extends Object implements Comparator<List<Object>>, Serializable
Constructor and Description |
---|
ListComparator(int[] sortcols)
Construct a list comparator with an array of sort columns.
|
ListComparator(int column,
boolean ascending)
Construct a list comparator with a sort column and a boolean for sort direction.
|
ListComparator(int column,
boolean ascending,
int column2,
boolean ascending2)
Construct a list comparator with two sort columns and booleans for sort direction.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(List<Object> o1,
List<Object> o2)
Compare two lists.
|
static int |
compareNumbers(Number n1,
Number n2)
Compares 2 Objects implementing Interface Number, even if they are different types
|
static int |
compareObjects(Object first,
Object second) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public ListComparator(int column, boolean ascending)
column
- sort columnascending
- true if sort ascendingpublic ListComparator(int column, boolean ascending, int column2, boolean ascending2)
column
- sort columnascending
- true if sort ascendingcolumn2
- sort column2ascending2
- true if sort column2 ascendingpublic ListComparator(int[] sortcols)
sortcols
- array of sort columns@enterprise 10.0.39123 Copyright © FREQUENTIS AG. All Rights Reserved.