javadoc.com.google.common.collect.class-use.Ordering.html Maven / Gradle / Ivy
The newest version!
Uses of Class com.google.common.collect.Ordering (Guava: Google Core Libraries for Java 11.0.1 API)
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV
NEXT
FRAMES
NO FRAMES
Uses of Class
com.google.common.collect.Ordering
Packages that use Ordering
com.google.common.collect
This package contains generic collection interfaces and implementations, and
other utilities for working with collections.
Uses of Ordering in com.google.common.collect
Methods in com.google.common.collect that return Ordering
static Ordering<Object>
Ordering.arbitrary()
Returns an arbitrary ordering over all objects, for which compare(a,
b) == 0
implies a == b
(identity equality).
<U extends T>
Ordering<U>
Ordering.compound(Comparator<? super U> secondaryComparator)
Returns an ordering which first uses the ordering this
, but which
in the event of a "tie", then delegates to secondaryComparator
.
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.
static
<T> Ordering<T>
Ordering.explicit(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(Comparator<T> comparator)
Returns an ordering for a pre-existing comparator
.
static
<T> Ordering<T>
Ordering.from(Ordering<T> ordering)
Deprecated. no need to use this
<S extends T>
Ordering<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 Comparable>
Ordering<C>
Ordering.natural()
Returns a serializable ordering that uses the natural order of the values.
<S extends T>
Ordering<S>
Ordering.nullsFirst()
Returns an ordering that treats null
as less than all other values
and uses this
to compare non-null values.
<S extends T>
Ordering<S>
Ordering.nullsLast()
Returns an ordering that treats null
as greater than all other
values and uses this ordering to compare non-null values.
<F> Ordering<F>
Ordering.onResultOf(Function<F,? extends T> function)
Returns a new ordering on F
which orders elements by first applying
a function to them, then comparing those results using this
.
<S extends T>
Ordering<S>
Ordering.reverse()
Returns the reverse of this ordering; the Ordering
equivalent to
Collections.reverseOrder(Comparator)
.
static Ordering<Object>
Ordering.usingToString()
Returns an ordering that compares objects by the natural ordering of their
string representations as returned by toString()
.
Methods in com.google.common.collect with parameters of type Ordering
static
<T> Ordering<T>
Ordering.from(Ordering<T> ordering)
Deprecated. no need to use this
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV
NEXT
FRAMES
NO FRAMES
Copyright © 2010-2012. All Rights Reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy