Class TransformComparator<T,W>
java.lang.Object
com.aoapps.collections.transformers.TransformComparator<T,W>
- All Implemented Interfaces:
Comparator<T>
Wraps a
Comparator
, with optional type conversion.- Author:
- AO Industries, Inc.
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
TransformComparator
(Comparator<? super W> wrapped, Transformer<T, W> transformer) -
Method Summary
Modifier and TypeMethodDescriptionint
protected Comparator
<? super W> static <T> TransformComparator
<T, T> of
(Comparator<? super T> comparator) static <T,
W> TransformComparator <T, W> of
(Comparator<? super W> comparator, Transformer<T, W> transformer) Wraps a comparator.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
-
Field Details
-
transformer
-
-
Constructor Details
-
TransformComparator
-
-
Method Details
-
of
public static <T,W> TransformComparator<T,W> of(Comparator<? super W> comparator, Transformer<T, W> transformer) Wraps a comparator. -
of
- See Also:
-
getWrapped
-
compare
- Specified by:
compare
in interfaceComparator<T>
-