Package one.microstream.functional
Class ComparatorSequence<T>
- java.lang.Object
-
- one.microstream.functional.ComparatorSequence<T>
-
- All Implemented Interfaces:
Comparator<T>
public class ComparatorSequence<T> extends Object implements Comparator<T>
Helper class to chain multipleComparator
functions together as a superComparator
.
Useful for implementing SQL-like "ORDER BY" for querying / processing collections.
-
-
Constructor Summary
Constructors Constructor Description ComparatorSequence(Comparator<? super T>... comparators)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Constructor Detail
-
ComparatorSequence
@SafeVarargs public ComparatorSequence(Comparator<? super T>... comparators)
-
-
Method Detail
-
compare
public int compare(T o1, T o2)
- Specified by:
compare
in interfaceComparator<T>
-
-