|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.sort.v0_6.StackableComparator<T>
T
- The type of data to be compared.public class StackableComparator<T>
A comparator implementation that allows multiple comparators to be combined together. It invokes each comparator in order, and returns the first non-zero result. If all comparators return 0, the result is 0.
Constructor Summary | |
---|---|
StackableComparator(java.util.List<java.util.Comparator<T>> comparators)
Creates a new instance. |
Method Summary | |
---|---|
int |
compare(T o1,
T o2)
|
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 |
Constructor Detail |
---|
public StackableComparator(java.util.List<java.util.Comparator<T>> comparators)
comparators
- The comparators to use for comparisons.Method Detail |
---|
public int compare(T o1, T o2)
compare
in interface java.util.Comparator<T>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |