org.apache.commons.collections.comparators
Class TransformingComparator
java.lang.Object
org.apache.commons.collections.comparators.TransformingComparator
- Comparator
public class TransformingComparator
extends java.lang.Object
implements Comparator
Decorates another Comparator with transformation behavior. That is, the
return value from the transform operation will be passed to the decorated
Comparator#compare
method.
int | compare(Object o1, Object o2) - Returns the result of comparing the values from the transform operation.
|
decorated
protected Comparator decorated
TransformingComparator
public TransformingComparator(Transformer transformer)
Constructs an instance with the given Transformer and a ComparableComparator.
transformer
- what will transform the instance.
TransformingComparator
public TransformingComparator(Transformer transformer,
Comparator decorated)
Constructs an instance with the given Transformer and Comparator
decorated
- the decorated Comparator
compare
public int compare(Object o1,
Object o2)
Returns the result of comparing the values from the transform operation.
- the result of comparing the values from the transform operation
Copyright © 2001-2004 Apache Software Foundation. Documenation generated ${TODAY}.