|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||
| 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 |
|---|
| Fields in com.google.common.collect declared as Ordering | |
|---|---|
static Ordering<java.lang.Object> |
Comparators.STRING_FORM_ORDER
A comparator that compares objects by the natural ordering of their string representations as returned by toString. |
| Methods in com.google.common.collect that return Ordering | ||
|---|---|---|
static
|
Comparators.compound(java.util.Comparator<? super T> first,
java.util.Comparator<? super T> second)
Returns a comparator which tries two comparators in order until a non-zero result is found, returning that result, and returning zero only if both comparators return zero. |
|
static
|
Comparators.compound(java.util.Comparator<? super T> first,
java.util.Comparator<? super T> second,
java.util.Comparator<? super T> third)
Returns a comparator which tries three comparators in order until a non-zero result is found, returning that result, and returning zero only if all comparators return zero. |
|
static
|
Comparators.compound(java.util.Comparator<? super T> first,
java.util.Comparator<? super T> second,
java.util.Comparator<? super T> third,
java.util.Comparator<? super T> forth)
Returns a comparator which tries four comparators in order until a non-zero result is found, returning that result, and returning zero only if all comparators return zero. |
|
static
|
Comparators.compound(java.util.Comparator<? super T> first,
java.util.Comparator<? super T> second,
java.util.Comparator<? super T> third,
java.util.Comparator<? super T> forth,
java.util.Comparator<? super T>... rest)
Returns a comparator 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
|
Comparators.compound(java.lang.Iterable<? extends java.util.Comparator<? super T>> comparators)
Returns a comparator 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
|
Ordering.forComparator(java.util.Comparator<T> comparator)
Returns an ordering for comparator. |
|
static
|
Comparators.fromFunction(Function<F,T> function)
Creates a comparator that compares any two items by applying a function to each of them and using the natural ordering of the results. |
|
static
|
Comparators.fromFunction(Function<F,T> function,
java.util.Comparator<? super T> comparator)
Creates a comparator that compares any two items by applying a function to each of them and using the supplied comparator to compare the results. |
|
static
|
Comparators.givenOrder(java.util.List<T> valuesInOrder)
Returns a comparator that compares objects according to the order in which they appear in the given list. |
|
static
|
Comparators.givenOrder(T leastValue,
T... remainingValuesInOrder)
Returns the comparator that compares objects according to the order in which they are given to this method. |
|
static
|
Ordering.natural()
Returns an ordering that uses the natural order of the values. |
|
static
|
Comparators.naturalOrder()
Returns a comparator that uses the natural ordering of the values. |
|
static
|
Comparators.nullGreatestOrder()
Returns a comparator that uses the natural ordering of the values, but also handles null values, treating them as greater than all other values. |
|
static
|
Comparators.nullGreatestOrder(java.util.Comparator<T> comparator)
Returns a comparator that treats null as greater than all other
values and uses the given comparator to compare non-null values. |
|
static
|
Comparators.nullLeastOrder()
Returns a comparator that uses the natural ordering of the values, but also handles null values, treating them as less than all other values. |
|
static
|
Comparators.nullLeastOrder(java.util.Comparator<T> comparator)
Returns a comparator that treats null as less than all other
values and uses comparator to compare non-null values. |
|
Ordering<T> |
Ordering.nullsFirst()
Returns an ordering that treats null as less than all other values
and uses this ordering to compare non-null values. |
|
Ordering<T> |
Ordering.nullsLast()
Returns an ordering that treats null as greater than all other
values and uses this ordering to compare non-null values. |
|
Ordering<T> |
Ordering.reverseOrder()
Returns the ordering that is the reverse of this ordering. |
|
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES | |||||||||