Package com.google.common.collect
Class CompoundOrdering<T>
java.lang.Object
com.google.common.collect.Ordering<T>
com.google.common.collect.CompoundOrdering<T>
- All Implemented Interfaces:
Serializable
,Comparator<T>
An ordering that tries several comparators in order.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.collect.Ordering
Ordering.ArbitraryOrdering, Ordering.IncomparableValueException
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final Comparator<? super T>[]
private static final long
Fields inherited from class com.google.common.collect.Ordering
LEFT_IS_GREATER, RIGHT_IS_GREATER
-
Constructor Summary
ConstructorsConstructorDescriptionCompoundOrdering
(Iterable<? extends Comparator<? super T>> comparators) CompoundOrdering
(Comparator<? super T> primary, Comparator<? super T> secondary) -
Method Summary
Methods inherited from class com.google.common.collect.Ordering
allEqual, arbitrary, binarySearch, compound, compound, explicit, explicit, from, from, greatestOf, greatestOf, immutableSortedCopy, isOrdered, isStrictlyOrdered, leastOf, leastOf, lexicographical, max, max, max, max, min, min, min, min, natural, nullsFirst, nullsLast, onKeys, onResultOf, reverse, sortedCopy, usingToString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
comparators
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
CompoundOrdering
CompoundOrdering(Comparator<? super T> primary, Comparator<? super T> secondary) -
CompoundOrdering
CompoundOrdering(Iterable<? extends Comparator<? super T>> comparators)
-
-
Method Details
-
compare
-
equals
- Specified by:
equals
in interfaceComparator<T>
- Overrides:
equals
in classObject
-
hashCode
public int hashCode() -
toString
-