public class TLcyGroupDescriptorComparator extends Object implements Comparator<TLcyGroupDescriptor>
TLcyGroupDescriptor
s that takes an ordered list of groups as its
constructor argument to define the sort order. Groups that are not provided in the list, are
assumed to be at the end.Constructor and Description |
---|
TLcyGroupDescriptorComparator(String[] aGroupDescriptorIDOrdering)
Constructs a new
TLcyGroupDescriptorComparator . |
TLcyGroupDescriptorComparator(TLcyGroupDescriptor[] aGroupDescriptorOrdering)
Constructs a new
TLcyGroupDescriptorComparator . |
Modifier and Type | Method and Description |
---|---|
int |
compare(TLcyGroupDescriptor aGroup1,
TLcyGroupDescriptor aGroup2) |
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 TLcyGroupDescriptorComparator(String[] aGroupDescriptorIDOrdering)
TLcyGroupDescriptorComparator
.aGroupDescriptorIDOrdering
- An array containing the ID's of the
TLcyGroupDescriptor
s, in their sorted order.IllegalArgumentException
- When aGroupDescriptorIDOrdering
contains duplicates.public TLcyGroupDescriptorComparator(TLcyGroupDescriptor[] aGroupDescriptorOrdering)
TLcyGroupDescriptorComparator
.aGroupDescriptorOrdering
- An array containing the
TLcyGroupDescriptor
s, in their sorted order.IllegalArgumentException
- When aGroupDescriptorOrdering
contains duplicates.public int compare(TLcyGroupDescriptor aGroup1, TLcyGroupDescriptor aGroup2)
compare
in interface Comparator<TLcyGroupDescriptor>