Uses of Class
com.google.common.collect.Ordering
-
Packages that use Ordering Package Description com.google.common.collect This package contains generic collection interfaces and implementations, and other utilities for working with collections.com.google.common.collect.testing.google com.google.common.testing This package contains testing utilities.com.google.common.util.concurrent Concurrency utilities. -
-
Uses of Ordering in com.google.common.collect
Subclasses of Ordering in com.google.common.collect Modifier and Type Class Description (package private) class
AllEqualOrdering
An ordering that treats all references as equals, even nulls.(package private) class
ByFunctionOrdering<F,T>
An ordering that orders elements by applying an order to the result of a function on those elements.(package private) class
ComparatorOrdering<T>
An ordering for a pre-existing comparator.(package private) class
CompoundOrdering<T>
An ordering that tries several comparators in order.(package private) class
ExplicitOrdering<T>
An ordering that compares objects according to a given order.(package private) class
LexicographicalOrdering<T>
An ordering which sorts iterables by comparing corresponding elements pairwise.(package private) class
NaturalOrdering
An ordering that uses the natural order of the values.(package private) class
NullsFirstOrdering<T>
An ordering that treatsnull
as less than all other values.(package private) class
NullsLastOrdering<T>
An ordering that treatsnull
as greater than all other values.(package private) static class
Ordering.ArbitraryOrdering
private static class
Range.RangeLexOrdering
Needed to serialize sorted collections of Ranges.(package private) class
ReverseNaturalOrdering
An ordering that uses the reverse of the natural order of the values.(package private) class
ReverseOrdering<T>
An ordering that uses the reverse of a given order.(package private) class
UsingToStringOrdering
An ordering that uses the natural order of the string representation of the values.Fields in com.google.common.collect declared as Ordering Modifier and Type Field Description (package private) static Ordering<java.lang.Object>
Ordering.ArbitraryOrderingHolder. ARBITRARY_ORDERING
(package private) Ordering<? super T>
ReverseOrdering. forwardOrder
(package private) static Ordering<Range<?>>
Range.RangeLexOrdering. INSTANCE
private Ordering<java.lang.Comparable<?>>
NaturalOrdering. nullsFirst
private Ordering<java.lang.Comparable<?>>
NaturalOrdering. nullsLast
(package private) Ordering<T>
ByFunctionOrdering. ordering
(package private) Ordering<E>
MinMaxPriorityQueue.Heap. ordering
(package private) Ordering<? super T>
NullsFirstOrdering. ordering
(package private) Ordering<? super T>
NullsLastOrdering. ordering
Methods in com.google.common.collect that return Ordering Modifier and Type Method Description static Ordering<java.lang.Object>
Ordering. 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.static Ordering<java.lang.Object>
Ordering. arbitrary()
Returns an arbitrary ordering over all objects, for whichcompare(a, b) == 0
impliesa == b
(identity equality).static <T> Ordering<T>
Ordering. compound(java.lang.Iterable<? extends java.util.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.<U extends T>
Ordering<U>Ordering. compound(java.util.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>
Ordering. explicit(java.util.List<T> valuesInOrder)
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>
Ordering. from(Ordering<T> ordering)
Deprecated.no need to use thisstatic <T> Ordering<T>
Ordering. from(java.util.Comparator<T> comparator)
Returns an ordering based on an existing comparator instance.<S extends T>
Ordering<java.lang.Iterable<S>>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 java.lang.Comparable>
Ordering<C>Ordering. natural()
Returns a serializable ordering that uses the natural order of the values.<S extends java.lang.Comparable<?>>
Ordering<S>NaturalOrdering. nullsFirst()
<S extends T>
Ordering<S>NullsFirstOrdering. nullsFirst()
<S extends T>
Ordering<S>NullsLastOrdering. nullsFirst()
<S extends T>
Ordering<S>Ordering. nullsFirst()
Returns an ordering that treatsnull
as less than all other values and usesthis
to compare non-null values.<S extends java.lang.Comparable<?>>
Ordering<S>NaturalOrdering. nullsLast()
<S extends T>
Ordering<S>NullsFirstOrdering. nullsLast()
<S extends T>
Ordering<S>NullsLastOrdering. nullsLast()
<S extends T>
Ordering<S>Ordering. nullsLast()
Returns an ordering that treatsnull
as greater than all other values and uses this ordering to compare non-null values.(package private) <T2 extends T>
Ordering<java.util.Map.Entry<T2,?>>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
.private <T extends B>
Ordering<T>MinMaxPriorityQueue.Builder. ordering()
(package private) static <C extends java.lang.Comparable<?>>
Ordering<Range<C>>Range. rangeLexOrdering()
<S> Ordering<S>
AllEqualOrdering. reverse()
private static <T> Ordering<T>
Maps.DescendingMap. reverse(java.util.Comparator<T> forward)
<S extends java.lang.Comparable<?>>
Ordering<S>NaturalOrdering. reverse()
<S extends T>
Ordering<S>NullsFirstOrdering. reverse()
<S extends T>
Ordering<S>NullsLastOrdering. reverse()
<S extends T>
Ordering<S>Ordering. reverse()
Returns the reverse of this ordering; theOrdering
equivalent toCollections.reverseOrder(Comparator)
.<S extends java.lang.Comparable<?>>
Ordering<S>ReverseNaturalOrdering. reverse()
<S extends T>
Ordering<S>ReverseOrdering. reverse()
private static <T> Ordering<T>
Sets.DescendingSet. reverse(java.util.Comparator<T> forward)
static Ordering<java.lang.Object>
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 Ordering Modifier and Type Method Description static <T> Ordering<T>
Ordering. from(Ordering<T> ordering)
Deprecated.no need to use thisConstructors in com.google.common.collect with parameters of type Ordering Constructor Description ByFunctionOrdering(Function<F,? extends T> function, Ordering<T> ordering)
Heap(Ordering<E> ordering)
NullsFirstOrdering(Ordering<? super T> ordering)
NullsLastOrdering(Ordering<? super T> ordering)
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 Modifier and Type Method Description private static Ordering<java.lang.String>
SetGenerators. createExplicitComparator(java.lang.String[] elements)
-
Uses of Ordering in com.google.common.testing
Subclasses of Ordering in com.google.common.testing Modifier and Type Class Description private static class
ArbitraryInstances.AlwaysEqual
Fields in com.google.common.testing declared as Ordering Modifier and Type Field Description private static Ordering<java.lang.reflect.Field>
ArbitraryInstances. BY_FIELD_NAME
private static Ordering<Invokable<?,?>>
ClassSanityTester. BY_METHOD_NAME
private static Ordering<Invokable<?,?>>
ClassSanityTester. BY_NUMBER_OF_PARAMETERS
private static Ordering<Invokable<?,?>>
ClassSanityTester. BY_PARAMETERS
Methods in com.google.common.testing that return Ordering Modifier and Type Method Description (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 Ordering Modifier and Type Field Description private static Ordering<java.lang.reflect.Constructor<?>>
FuturesGetChecked. WITH_STRING_PARAM_FIRST
-