Uses of Class
com.google.common.collect.Ordering
Packages that use Ordering
Package
Description
Collection interfaces and implementations, and other utilities for collections.
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 class
An ordering that treats all references as equals, even nulls.(package private) final class
ByFunctionOrdering<F,
T> An ordering that orders elements by applying an order to the result of a function on those elements.(package private) final class
An ordering for a pre-existing comparator.(package private) final class
An ordering that tries several comparators in order.(package private) final class
An ordering that compares objects according to a given order.(package private) final class
An ordering which sorts iterables by comparing corresponding elements pairwise.(package private) final class
An ordering that uses the natural order of the values.(package private) final class
An ordering that treatsnull
as less than all other values.(package private) final class
An ordering that treatsnull
as greater than all other values.(package private) static class
private static class
Needed to serialize sorted collections of Ranges.(package private) final class
An ordering that uses the reverse of the natural order of the values.(package private) final class
An ordering that uses the reverse of a given order.(package private) final class
An 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_ORDERING
ReverseOrdering.forwardOrder
(package private) static final Ordering
<?> Range.RangeLexOrdering.INSTANCE
private Ordering
<Comparable<?>> NaturalOrdering.nullsFirst
private Ordering
<Comparable<?>> NaturalOrdering.nullsLast
ByFunctionOrdering.ordering
MinMaxPriorityQueue.Heap.ordering
NullsFirstOrdering.ordering
NullsLastOrdering.ordering
Methods 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) == 0
impliesa == 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 treatsnull
as less than all other values and usesthis
to compare non-null values.<S extends Comparable<?>>
Ordering<S> NaturalOrdering.nullsLast()
NullsFirstOrdering.nullsLast()
NullsLastOrdering.nullsLast()
Ordering.nullsLast()
Returns an ordering that treatsnull
as 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 onF
which 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; theOrdering
equivalent 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_NAME
ClassSanityTester.BY_METHOD_NAME
ClassSanityTester.BY_NUMBER_OF_PARAMETERS
ClassSanityTester.BY_PARAMETERS
Methods 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 TypeFieldDescriptionFuturesGetChecked.ORDERING_BY_CONSTRUCTOR_PARAMETER_LIST
private static final Ordering
<Constructor<?>> FuturesGetChecked.WITH_STRING_PARAM_THEN_WITH_THROWABLE_PARAM