|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.collections.comparators.TransformingComparator
Decorates another Comparator with transformation behavior. That is, the
return value from the transform operation will be passed to the decorated
compare method.
Transformer,
ComparableComparator| Field Summary | |
protected Comparator |
decorated
The decorated comparator. |
protected Transformer |
transformer
The transformer being used. |
| Constructor Summary | |
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. |
|
| Method Summary | |
int |
compare(Object obj1,
Object obj2)
Returns the result of comparing the values from the transform operation. |
| 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 |
| Field Detail |
protected Comparator decorated
protected Transformer transformer
| Constructor Detail |
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 comparedecorated - the decorated Comparator| Method Detail |
public int compare(Object obj1,
Object obj2)
compare in interface Comparatorobj1 - the first object to transform then compareobj2 - the second object to transform then compare
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||