public final class CompositeComparator<T> extends java.lang.Object implements java.util.Comparator<T>
| Constructor and Description |
|---|
CompositeComparator(java.util.Comparator<? super T>... comparators)
Constructs a comparator based on the specified underlying comparators.
|
CompositeComparator(java.util.Comparator<? super T> comparator1,
java.util.Comparator<? super T> comparator2)
Constructs a comparator based on the specified underlying comparators.
|
CompositeComparator(java.util.Comparator<? super T> comparator1,
java.util.Comparator<? super T> comparator2,
java.util.Comparator<? super T> comparator3)
Constructs a comparator based on the specified underlying comparators.
|
CompositeComparator(java.util.List<java.util.Comparator<? super T>> comparators)
Constructs a comparator based on the specified underlying comparators.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(T o1,
T o2) |
public CompositeComparator(java.util.Comparator<? super T>... comparators)
comparators - the underlying comparatorspublic CompositeComparator(java.util.Comparator<? super T> comparator1, java.util.Comparator<? super T> comparator2)
comparator1 - the first underlying comparatorscomparator2 - the second underlying comparatorspublic CompositeComparator(java.util.Comparator<? super T> comparator1, java.util.Comparator<? super T> comparator2, java.util.Comparator<? super T> comparator3)
comparator1 - the first underlying comparatorscomparator2 - the second underlying comparatorscomparator3 - the third underlying comparatorspublic CompositeComparator(java.util.List<java.util.Comparator<? super T>> comparators)
comparators - the underlying comparatorsCopyright © 2021. All Rights Reserved.