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

1 2 3 4 5 6 7 8 91011>>

  /toolchain/binutils/binutils-2.25/gold/testsuite/
odr_violation2.cc 4 class Ordering {
9 // This comment makes the line numbers in Ordering::operator() all have
12 bool Ordering::operator()(int a, int b) {
19 std::sort(array, array + size, Ordering());
odr_violation1.cc 4 class Ordering {
12 std::sort(array, array + size, Ordering());
  /external/guava/guava-tests/test/com/google/common/collect/
SortedIterablesTest.java 31 assertTrue(SortedIterables.hasSameComparator(Ordering.natural(), Sets.newTreeSet()));
35 SortedIterables.hasSameComparator(Ordering.natural(), Maps.newTreeMap().keySet()));
37 assertTrue(SortedIterables.hasSameComparator(Ordering.natural().reverse(),
38 Sets.newTreeSet(Ordering.natural().reverse())));
42 assertEquals(Ordering.natural(), SortedIterables.comparator(Sets.newTreeSet()));
OrderingTest.java 30 import com.google.common.collect.Ordering.ArbitraryOrdering;
31 import com.google.common.collect.Ordering.IncomparableValueException;
50 * Unit tests for {@code Ordering}.
58 private final Ordering<Number> numberOrdering = new NumberOrdering();
61 Ordering<Object> comparator = Ordering.allEqual();
68 assertEquals("Ordering.allEqual()", comparator.toString());
76 Ordering<Integer> comparator = Ordering.natural();
92 assertEquals("Ordering.natural()", comparator.toString())
    [all...]
  /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...]
AllEqualOrdering.java 27 * An ordering that treats all references as equals, even nulls.
32 final class AllEqualOrdering extends Ordering<Object> implements Serializable {
52 public <S> Ordering<S> reverse() {
53 return (Ordering<S>) this;
62 return "Ordering.allEqual()";
NaturalOrdering.java 25 /** An ordering that uses the natural order of the values. */
29 extends Ordering<Comparable> implements Serializable {
38 @Override public <S extends Comparable> Ordering<S> reverse() {
39 return (Ordering<S>) ReverseNaturalOrdering.INSTANCE;
48 return "Ordering.natural()";
Ordering.java 48 * <p>The common ways to get an instance of {@code Ordering} are:
55 * <li>Use the natural ordering, {@link Ordering#natural}
59 * that {@code Ordering}, including:
68 * <p>Finally, use the resulting {@code Ordering} anywhere a {@link Comparator}
79 * are. For example, if {@code ordering} and {@code function} can themselves be
80 * serialized, then {@code ordering.onResultOf(function)} can as well.
84 * {@code Ordering}</a>.
91 public abstract class Ordering<T> implements Comparator<T> {
95 * Returns a serializable ordering that uses the natural order of the values
    [all...]
UsingToStringOrdering.java 24 * An ordering that uses the natural order of the string representation of the
29 extends Ordering<Object> implements Serializable {
42 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) {
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 42 * natural sort ordering of their elements. Either way, null elements are not
68 * <p>With natural ordering of elements, the following relation determines whether
98 Ordering.natural();
130 ImmutableList.of(element), Ordering.natural());
135 * their natural ordering. When multiple elements are equivalent according to
143 return construct(Ordering.natural(), 2, e1, e2);
148 * their natural ordering. When multiple elements are equivalent according to
156 return construct(Ordering.natural(), 3, e1, e2, e3);
161 * their natural ordering. When multiple elements are equivalent according to
169 return construct(Ordering.natural(), 4, e1, e2, e3, e4)
    [all...]
  /external/guava/guava-gwt/test-super/com/google/common/collect/super/com/google/common/collect/
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<Object> comparator = Ordering.allEqual();
66 assertEquals("Ordering.allEqual()", comparator.toString());
74 Ordering<Integer> comparator = Ordering.natural();
90 assertEquals("Ordering.natural()", comparator.toString())
    [all...]
TreeMultimapNaturalTest.java 34 * Unit tests for {@code TreeMultimap} with natural ordering.
46 * Create and populate a {@code TreeMultimap} with the natural ordering of
123 Ordering.natural();
126 Ordering.natural().reverse().nullsFirst();
141 assertSame(Ordering.natural(), copyFromTree.keyComparator());
142 assertSame(Ordering.natural(), copyFromTree.valueComparator());
143 assertSame(Ordering.natural(), copyFromTree.get(1.0).comparator());
148 * results in natural ordering.
159 assertEquals(Ordering.natural(), copyFromHash.keyComparator());
160 assertEquals(Ordering.natural(), copyFromHash.valueComparator())
    [all...]
  /external/llvm/include/llvm/Transforms/Utils/
GlobalStatus.h 70 /// Set to the strongest atomic ordering requirement.
71 AtomicOrdering Ordering;
  /external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
TreeMultimap.java 33 * their natural ordering or by supplied comparators. In all cases, this
44 * through the keys according to the key comparator ordering or the natural
45 * ordering of the keys. Similarly, {@code get}, {@code removeAll}, and {@code
47 * to the value comparator ordering or the natural ordering of the values. The
49 * iterate across the keys according to the above key ordering, and for each
50 * key they iterate across the values according to the value ordering.
78 * Creates an empty {@code TreeMultimap} ordered by the natural ordering of
83 return new TreeMultimap<K, V>(Ordering.natural(), Ordering.natural())
    [all...]
ImmutableSortedSet.java 54 private static final Comparator NATURAL_ORDER = Ordering.natural();
81 return ofInternal(Ordering.natural(), element);
87 return ofInternal(Ordering.natural(), e1, e2);
93 return ofInternal(Ordering.natural(), e1, e2, e3);
99 return ofInternal(Ordering.natural(), e1, e2, e3, e4);
105 return ofInternal(Ordering.natural(), e1, e2, e3, e4, e5);
116 return ofInternal(Ordering.natural(), (E[]) all.toArray(new Comparable[0]));
136 return copyOfInternal((Ordering<E>) Ordering.natural(), (Collection) elements, false);
140 return copyOfInternal((Ordering<E>) Ordering.natural(), (Iterable) elements, false)
    [all...]
  /external/smali/util/src/test/java/org/jf/util/
LinearSearchTest.java 35 import com.google.common.collect.Ordering;
97 int expectedIndex = Ordering.natural().binarySearch(list, key);
99 Assert.assertEquals(expectedIndex, LinearSearch.linearSearch(list, Ordering.<Integer>natural(), key, guess));
  /external/vogar/src/vogar/
AnnotatedOutcome.java 20 import com.google.common.collect.Ordering;
33 public static Ordering<AnnotatedOutcome> ORDER_BY_NAME = new Ordering<AnnotatedOutcome>() {
  /external/guava/guava-gwt/src/com/google/common/collect/
LexicographicalOrdering_CustomFieldSerializer.java 39 (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());

Completed in 716 milliseconds

1 2 3 4 5 6 7 8 91011>>