Class FunctionComparator<T,V>
java.lang.Object
org.eclipse.collections.impl.block.comparator.FunctionComparator<T,V>
- All Implemented Interfaces:
Serializable
,Comparator<T>
,SerializableComparator<T>
public class FunctionComparator<T,V> extends Object implements SerializableComparator<T>
Simple
Comparator
that uses a Function
to select a value from the underlying object and compare it against a known value to determine ordering.- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description FunctionComparator(Function<? super T,? extends V> function, Comparator<V> comparator)
-
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<T>
-