HomeSort by relevance Sort by last modified time
    Searched refs:Ordering (Results 1 - 25 of 117) sorted by null

1 2 3 4 5

  /external/guava/guava/src/com/google/common/collect/
NullsFirstOrdering.java 25 /** An ordering that treats {@code null} as less than all other values. */
27 final class NullsFirstOrdering<T> extends Ordering<T> implements Serializable {
28 final Ordering<? super T> ordering; field in class:NullsFirstOrdering
30 NullsFirstOrdering(Ordering<? super T> ordering) {
31 this.ordering = ordering;
44 return ordering.compare(left, right);
47 @Override public <S extends T> Ordering<S> reverse()
    [all...]
NullsLastOrdering.java 25 /** An ordering that treats {@code null} as greater than all other values. */
27 final class NullsLastOrdering<T> extends Ordering<T> implements Serializable {
28 final Ordering<? super T> ordering; field in class:NullsLastOrdering
30 NullsLastOrdering(Ordering<? super T> ordering) {
31 this.ordering = ordering;
44 return ordering.compare(left, right);
47 @Override public <S extends T> Ordering<S> reverse()
    [all...]
Ordering.java 45 * if (Ordering.from(comparator).reverse().isOrdered(list)) { ... }}</pre>
47 * The {@link #from(Comparator)} method returns the equivalent {@code Ordering}
49 * and extend {@code Ordering} directly: <pre> {@code
51 * Ordering<String> byLengthOrdering = new Ordering<String>() {
59 * are. For example, if {@code ordering} and {@code function} can themselves be
60 * serialized, then {@code ordering.onResultOf(function)} can as well.
67 public abstract class Ordering<T> implements Comparator<T> {
71 * Returns a serializable ordering that uses the natural order of the values.
72 * The ordering throws a {@link NullPointerException} when passed a nul
    [all...]
UsingToStringOrdering.java 23 /** An ordering that uses the reverse of the natural order of the values. */
26 extends Ordering<Object> implements Serializable {
39 return "Ordering.usingToString()";
ByFunctionOrdering.java 30 * An ordering that orders elements by applying an order to the result of a
35 extends Ordering<F> implements Serializable {
37 final Ordering<T> ordering; field in class:ByFunctionOrdering
40 Function<F, ? extends T> function, Ordering<T> ordering) {
42 this.ordering = checkNotNull(ordering);
46 return ordering.compare(function.apply(left), function.apply(right));
56 && this.ordering.equals(that.ordering)
    [all...]
LexicographicalOrdering.java 27 * An ordering which sorts iterables by comparing corresponding elements
32 extends Ordering<Iterable<T>> implements Serializable {
33 final Ordering<? super T> elementOrder;
35 LexicographicalOrdering(Ordering<? super T> elementOrder) {
NaturalOrdering.java 27 /** An ordering that uses the natural order of the values. */
31 extends Ordering<Comparable> implements Serializable {
44 @Override public <S extends Comparable> Ordering<S> reverse() {
45 return (Ordering<S>) ReverseNaturalOrdering.INSTANCE;
68 return "Ordering.natural()";
ReverseOrdering.java 28 /** An ordering that uses the reverse of a given order. */
30 final class ReverseOrdering<T> extends Ordering<T> implements Serializable {
31 final Ordering<? super T> forwardOrder;
33 ReverseOrdering(Ordering<? super T> forwardOrder) {
42 @Override public <S extends T> Ordering<S> reverse() {
43 return (Ordering<S>) forwardOrder;
ImmutableSortedSet.java 41 * natural sort ordering of their elements. Either way, null elements are not
67 * With natural ordering of elements, the following relation determines whether
93 Ordering.natural();
125 ImmutableList.of(element), Ordering.natural());
130 * their natural ordering. When multiple elements are equivalent according to
138 return copyOf(Ordering.natural(), Arrays.asList(e1, e2));
143 * their natural ordering. When multiple elements are equivalent according to
151 return copyOf(Ordering.natural(), Arrays.asList(e1, e2, e3));
156 * their natural ordering. When multiple elements are equivalent according to
164 return copyOf(Ordering.natural(), Arrays.asList(e1, e2, e3, e4))
    [all...]
ImmutableSortedMultiset.java 32 * are ordered by an explicit comparator, while others follow the natural sort ordering of their
57 * With natural ordering of elements, the following relation determines whether two elements are
79 private static final Comparator<Comparable> NATURAL_ORDER = Ordering.natural();
102 * ordering.
108 return copyOf(Ordering.natural(), Arrays.asList(e1, e2));
113 * ordering.
119 return copyOf(Ordering.natural(), Arrays.asList(e1, e2, e3));
124 * ordering.
131 return copyOf(Ordering.natural(), Arrays.asList(e1, e2, e3, e4));
136 * ordering
    [all...]
ReverseNaturalOrdering.java 26 /** An ordering that uses the reverse of the natural order of the values. */
30 extends Ordering<Comparable> implements Serializable {
42 @Override public <S extends Comparable> Ordering<S> reverse() {
43 return Ordering.natural();
86 return "Ordering.natural().reverse()";
TreeMultimap.java 36 * their natural ordering or by supplied comparators. In all cases, this
47 * through the keys according to the key comparator ordering or the natural
48 * ordering of the keys. Similarly, {@code get}, {@code removeAll}, and {@code
50 * to the value comparator ordering or the natural ordering of the values. The
52 * iterate across the keys according to the above key ordering, and for each
53 * key they iterate across the values according to the value ordering.
76 * Creates an empty {@code TreeMultimap} ordered by the natural ordering of
81 return new TreeMultimap<K, V>(Ordering.natural(), Ordering.natural())
    [all...]
  /external/guava/guava-tests/test/com/google/common/collect/
SortedIterablesTest.java 37 ASSERT.that(SortedIterables.sortedCounts(Ordering.natural(), list))
47 ASSERT.that(SortedIterables.sortedCounts(Ordering.natural(), list.iterator()))
55 assertTrue(SortedIterables.hasSameComparator(Ordering.natural(), Sets.newTreeSet()));
59 SortedIterables.hasSameComparator(Ordering.natural(), Maps.newTreeMap().keySet()));
61 assertTrue(SortedIterables.hasSameComparator(Ordering.natural().reverse(),
62 Sets.newTreeSet(Ordering.natural().reverse())));
OrderingTest.java 29 import com.google.common.collect.Ordering.ArbitraryOrdering;
30 import com.google.common.collect.Ordering.IncomparableValueException;
48 * Unit tests for {@code Ordering}.
56 private final Ordering<Number> numberOrdering = new NumberOrdering();
59 Ordering<Integer> comparator = Ordering.natural();
75 assertEquals("Ordering.natural()", comparator.toString());
79 Ordering<String> caseInsensitiveOrdering
80 = Ordering.from(String.CASE_INSENSITIVE_ORDER);
86 Ordering<String> orderingFromOrdering
    [all...]
BstRangeOpsTest.java 64 countAggregate, GeneralRange.downTo(Ordering.natural(), c, type), ROOT);
78 countAggregate, GeneralRange.upTo(Ordering.natural(), c, type), ROOT);
98 Ordering.natural(), chars.charAt(i), lb, chars.charAt(j), ub), ROOT);
119 countAggregate, GeneralRange.<Character>all(Ordering.natural()), ROOT));
124 GeneralRange<Character> range = GeneralRange.all(Ordering.natural());
142 GeneralRange<Character> range1 = GeneralRange.downTo(Ordering.natural(), 'f', CLOSED);
145 GeneralRange<Character> range2 = GeneralRange.downTo(Ordering.natural(), 'f', OPEN);
148 GeneralRange<Character> range3 = GeneralRange.downTo(Ordering.natural(), 'a', CLOSED);
151 GeneralRange<Character> range4 = GeneralRange.downTo(Ordering.natural(), 'a', OPEN);
154 GeneralRange<Character> range5 = GeneralRange.downTo(Ordering.natural(), 'c', OPEN)
    [all...]
SubMapMultimapAsMapImplementsMapTest.java 41 = TreeMultimap.create(Ordering.<String>natural().nullsFirst(),
42 Ordering.<Integer>natural().nullsFirst());
ImmutableTableTest.java 183 // iteration ordering, row has an inconsistent ordering.
224 = builder.orderRowsBy(Ordering.natural())
225 .orderColumnsBy(Ordering.natural())
236 builder.orderRowsBy(Ordering.natural());
237 builder.orderColumnsBy(Ordering.natural());
259 builder.orderRowsBy(Ordering.natural());
260 builder.orderColumnsBy(Ordering.natural());
281 builder.orderRowsBy(Ordering.natural());
299 builder.orderRowsBy(Ordering.natural())
    [all...]
  /external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
TreeMultimap.java 32 * their natural ordering or by supplied comparators. In all cases, this
43 * through the keys according to the key comparator ordering or the natural
44 * ordering of the keys. Similarly, {@code get}, {@code removeAll}, and {@code
46 * to the value comparator ordering or the natural ordering of the values. The
48 * iterate across the keys according to the above key ordering, and for each
49 * key they iterate across the values according to the value ordering.
72 * Creates an empty {@code TreeMultimap} ordered by the natural ordering of
77 return new TreeMultimap<K, V>(Ordering.natural(), Ordering.natural())
    [all...]
ImmutableSortedSet.java 51 private static final Comparator NATURAL_ORDER = Ordering.natural();
78 return ofInternal(Ordering.natural(), element);
84 return ofInternal(Ordering.natural(), e1, e2);
90 return ofInternal(Ordering.natural(), e1, e2, e3);
96 return ofInternal(Ordering.natural(), e1, e2, e3, e4);
102 return ofInternal(Ordering.natural(), e1, e2, e3, e4, e5);
113 return ofInternal(Ordering.natural(), (E[]) all.toArray(new Comparable[0]));
141 return copyOfInternal(Ordering.natural(), elements, false);
146 return copyOfInternal(Ordering.natural(), elements, false);
151 return copyOfInternal(Ordering.natural(), elements)
    [all...]
  /external/guava/guava-gwt/src/com/google/common/collect/
LexicographicalOrdering_CustomFieldSerializer.java 38 (Ordering<Object>) reader.readObject());
NullsFirstOrdering_CustomFieldSerializer.java 38 (Ordering<Object>) reader.readObject());
43 writer.writeObject(instance.ordering);
NullsLastOrdering_CustomFieldSerializer.java 38 (Ordering<Object>) reader.readObject());
43 writer.writeObject(instance.ordering);
ReverseOrdering_CustomFieldSerializer.java 38 (Ordering<Object>) reader.readObject());
ByFunctionOrdering_CustomFieldSerializer.java 40 (Ordering<Object>) reader.readObject());
46 writer.writeObject(instance.ordering);
  /cts/libs/vogar-expect/src/vogar/
AnnotatedOutcome.java 20 import com.google.common.collect.Ordering;
32 public static Ordering<AnnotatedOutcome> ORDER_BY_NAME = new Ordering<AnnotatedOutcome>() {

Completed in 994 milliseconds

1 2 3 4 5