|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.molae.pipe.sorted.TransformedComparator<S,T>
public final class TransformedComparator<S,T>
Transforms both arguments with the underlying transformer and compares them.
| Constructor Summary | |
|---|---|
TransformedComparator(Comparator<S> base,
TwoWayTransformer<? super T,? extends S> transformer)
Constructs a new TransformedComparator object. |
|
| Method Summary | |
|---|---|
int |
compare(T o1,
T o2)
Transforms both arguments with the underlying transformer and compares them. |
boolean |
equals(Object obj)
Compares the specified object with this comparator for equality. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransformedComparator(Comparator<S> base,
TwoWayTransformer<? super T,? extends S> transformer)
base - the underlying iterator.
If null, the natural ordering of the elements will be used.transformer - the underlying transformer
NullPointerException - if the specified transformer is
null.| Method Detail |
|---|
public int compare(T o1,
T o2)
compare in interface Comparator<T>ClassCastException - if o1 and o2
cannot be compared to one another using the comparator.
NullPointerException - if o1 or o2
is null and the comparator does not tolerate null
elements.public boolean equals(Object obj)
true, iff the parameter is a
TransformedComparator and all properties are equal.
equals in interface Comparator<T>equals in class Objectobj - the reference object with which to compare.
true if the specified Object is equal to this
comparator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||