compare method.
This class is Serializable from Commons Collections 4.0.
org.apache.commons.collections4.Transformer , org.apache.commons.collections4.comparators.ComparableComparator
| Modifier and Type | Field and Description |
|---|---|
| private final Comparator | decorated
The decorated comparator. |
| private static final long | serialVersionUID
Serialization version from Collections 4.0. |
| private final Transformer | transformer
The transformer being used. |
| Access | Constructor and Description |
|---|---|
| public | TransformingComparator(final Transformer<? super I, ? extends O>
what will transform the arguments to transformer)compareConstructs an instance with the given Transformer and a
|
| public | TransformingComparator(final Transformer<? super I, ? extends O>
what will transform the arguments to transformer, final Comparator<O> comparethe decorated Comparator decorated)Constructs an instance with the given Transformer and Comparator. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: negative if obj1 is less, positive if greater, zero if equalthe first object to transform then compare obj1, final I the second object to transform then compare obj2)Implements java. |
| public boolean | Returns: true if equalthe object to compare to object)Overrides java. Implements java. true iff that Object is
is a Comparator whose ordering is known to be
equivalent to mine.
|
| public int | Returns: a hash code for this comparator.Overrides java. equals.
|
| decorated | back to summary |
|---|---|
| private final Comparator<O> decorated The decorated comparator. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serialization version from Collections 4.0. | |
| transformer | back to summary |
|---|---|
| private final Transformer<? super I, ? extends O> transformer The transformer being used. | |
| TransformingComparator | back to summary |
|---|---|
| public TransformingComparator(final Transformer<? super I, ? extends O> transformer) Constructs an instance with the given Transformer and a
| |
| TransformingComparator | back to summary |
|---|---|
| public TransformingComparator(final Transformer<? super I, ? extends O> transformer, final Comparator<O> decorated) Constructs an instance with the given Transformer and Comparator.
| |
| compare | back to summary |
|---|---|
| public int compare(final I obj1, final I obj2) Implements java. Returns the result of comparing the values from the transform operation.
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object object) Overrides java. Implements java. Returns
This implementation returns | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implement a hash code for this comparator that is consistent with
| |