Uses of Class
com.google.common.collect.Ordering
Packages that use Ordering
Package
Description
This package contains generic collection interfaces and implementations, and other utilities for
working with collections.
This package contains testing utilities.
Concurrency utilities.
-
Uses of Ordering in com.google.common.collect
Subclasses of Ordering in com.google.common.collectModifier and TypeClassDescription(package private) final classAn ordering that treats all references as equals, even nulls.(package private) final classByFunctionOrdering<F,T> An ordering that orders elements by applying an order to the result of a function on those elements.(package private) final classAn ordering for a pre-existing comparator.(package private) final classAn ordering that tries several comparators in order.(package private) final classAn ordering that compares objects according to a given order.(package private) final classAn ordering which sorts iterables by comparing corresponding elements pairwise.(package private) final classAn ordering that uses the natural order of the values.(package private) final classAn ordering that treatsnullas less than all other values.(package private) final classAn ordering that treatsnullas greater than all other values.(package private) static classprivate static classNeeded to serialize sorted collections of Ranges.(package private) final classAn ordering that uses the reverse of the natural order of the values.(package private) final classAn ordering that uses the reverse of a given order.(package private) final classAn ordering that uses the natural order of the string representation of the values.Fields in com.google.common.collect declared as OrderingModifier and TypeFieldDescriptionOrdering.ArbitraryOrderingHolder.ARBITRARY_ORDERINGReverseOrdering.forwardOrderRange.RangeLexOrdering.INSTANCEprivate Ordering<Comparable<?>>NaturalOrdering.nullsFirstprivate Ordering<Comparable<?>>NaturalOrdering.nullsLastByFunctionOrdering.orderingMinMaxPriorityQueue.Heap.orderingNullsFirstOrdering.orderingNullsLastOrdering.orderingMethods in com.google.common.collect that return OrderingModifier and TypeMethodDescriptionOrdering.allEqual()Returns an ordering which treats all values as equal, indicating "no ordering." Passing this ordering to any stable sort algorithm results in no change to the order of elements.Ordering.arbitrary()Returns an arbitrary ordering over all objects, for whichcompare(a, b) == 0impliesa == b(identity equality).static <T> Ordering<T>Ordering.compound(Iterable<? extends Comparator<? super T>> comparators) Returns an ordering which tries each given comparator in order until a non-zero result is found, returning that result, and returning zero only if all comparators return zero.Ordering.compound(Comparator<? super U> secondaryComparator) Returns an ordering which first uses the orderingthis, but which in the event of a "tie", then delegates tosecondaryComparator.static <T> Ordering<T>Returns an ordering that compares objects according to the order in which they appear in the given list.static <T> Ordering<T>Ordering.explicit(T leastValue, T... remainingValuesInOrder) Returns an ordering that compares objects according to the order in which they are given to this method.static <T> Ordering<T>Deprecated.no need to use thisstatic <T> Ordering<T>Ordering.from(Comparator<T> comparator) Returns an ordering based on an existing comparator instance.Ordering.lexicographical()Returns a new ordering which sorts iterables by comparing corresponding elements pairwise until a nonzero result is found; imposes "dictionary order".static <C extends Comparable>
Ordering<C>Ordering.natural()Returns a serializable ordering that uses the natural order of the values.<S extends Comparable<?>>
Ordering<S>NaturalOrdering.nullsFirst()NullsFirstOrdering.nullsFirst()NullsLastOrdering.nullsFirst()Ordering.nullsFirst()Returns an ordering that treatsnullas less than all other values and usesthisto compare non-null values.<S extends Comparable<?>>
Ordering<S>NaturalOrdering.nullsLast()NullsFirstOrdering.nullsLast()NullsLastOrdering.nullsLast()Ordering.nullsLast()Returns an ordering that treatsnullas greater than all other values and uses this ordering to compare non-null values.Ordering.onKeys()<F> Ordering<F>Ordering.onResultOf(Function<F, ? extends T> function) Returns a new ordering onFwhich orders elements by first applying a function to them, then comparing those results usingthis.MinMaxPriorityQueue.Builder.ordering()(package private) static <C extends Comparable<?>>
Ordering<Range<C>>Range.rangeLexOrdering()<S> Ordering<S>AllEqualOrdering.reverse()private static <T> Ordering<T>Maps.DescendingMap.reverse(Comparator<T> forward) <S extends Comparable<?>>
Ordering<S>NaturalOrdering.reverse()NullsFirstOrdering.reverse()NullsLastOrdering.reverse()Ordering.reverse()Returns the reverse of this ordering; theOrderingequivalent toCollections.reverseOrder(Comparator).<S extends Comparable<?>>
Ordering<S>ReverseNaturalOrdering.reverse()ReverseOrdering.reverse()private static <T> Ordering<T>Sets.DescendingSet.reverse(Comparator<T> forward) Ordering.usingToString()Returns an ordering that compares objects by the natural ordering of their string representations as returned bytoString().Methods in com.google.common.collect with parameters of type OrderingConstructors in com.google.common.collect with parameters of type OrderingModifierConstructorDescription(package private)(package private)(package private)NullsFirstOrdering(Ordering<? super T> ordering) (package private)NullsLastOrdering(Ordering<? super T> ordering) (package private)ReverseOrdering(Ordering<? super T> forwardOrder) -
Uses of Ordering in com.google.common.collect.testing.google
Methods in com.google.common.collect.testing.google that return Ordering -
Uses of Ordering in com.google.common.testing
Subclasses of Ordering in com.google.common.testingFields in com.google.common.testing declared as OrderingModifier and TypeFieldDescriptionArbitraryInstances.BY_FIELD_NAMEClassSanityTester.BY_METHOD_NAMEClassSanityTester.BY_NUMBER_OF_PARAMETERSClassSanityTester.BY_PARAMETERSMethods in com.google.common.testing that return OrderingModifier and TypeMethodDescription(package private) <T> Ordering<T>FreshValueGenerator.generateOrdering() -
Uses of Ordering in com.google.common.util.concurrent
Fields in com.google.common.util.concurrent declared as OrderingModifier and TypeFieldDescriptionprivate static final Ordering<Constructor<?>>FuturesGetChecked.WITH_STRING_PARAM_FIRST