public class TransformingComparator extends Object implements Comparator
compare
method.Transformer
,
ComparableComparator
Modifier and Type | Field and Description |
---|---|
protected Comparator |
decorated
The decorated comparator.
|
protected Transformer |
transformer
The transformer being used.
|
Constructor and Description |
---|
TransformingComparator(Transformer transformer)
Constructs an instance with the given Transformer and a
ComparableComparator . |
TransformingComparator(Transformer transformer,
Comparator decorated)
Constructs an instance with the given Transformer and Comparator.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(Object obj1,
Object obj2)
Returns the result of comparing the values from the transform operation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals
protected Comparator decorated
protected Transformer transformer
public TransformingComparator(Transformer transformer)
ComparableComparator
.transformer
- what will transform the arguments to compare
public TransformingComparator(Transformer transformer, Comparator decorated)
transformer
- what will transform the arguments to compare
decorated
- the decorated Comparatorpublic int compare(Object obj1, Object obj2)
compare
in interface Comparator
obj1
- the first object to transform then compareobj2
- the second object to transform then compareCopyright © 2001–2015 The Apache Software Foundation. All rights reserved.