public class ListOrderComparator<T> extends Object implements Comparator<T>
| Constructor and Description |
|---|
ListOrderComparator(List<T> list)
Construct a
Comparator from the argument List. |
ListOrderComparator(T... array)
Construct a
Comparator from the argument array. |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(T left,
T right) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic ListOrderComparator(List<T> list)
Comparator from the argument List.list - The List with the elements in ranked
order.@SafeVarargs public ListOrderComparator(T... array)
Comparator from the argument array.array - The array with the elements in ranked
order.Copyright © 2015–2021 Allen D. Ball. All rights reserved.