Home
last modified time | relevance | path

Searched refs:Ordering (Results 1 – 25 of 130) sorted by relevance

123456

/external/guava/guava-tests/test/com/google/common/collect/
DOrderingTest.java29 import com.google.common.collect.Ordering.ArbitraryOrdering;
30 import com.google.common.collect.Ordering.IncomparableValueException;
56 private final Ordering<Number> numberOrdering = new NumberOrdering();
59 Ordering<Integer> comparator = Ordering.natural(); in testNatural()
79 Ordering<String> caseInsensitiveOrdering in testFrom()
80 = Ordering.from(String.CASE_INSENSITIVE_ORDER); in testFrom()
86 Ordering<String> orderingFromOrdering = in testFrom()
87 Ordering.from(Ordering.<String>natural()); in testFrom()
89 .addEqualityGroup(caseInsensitiveOrdering, Ordering.from(String.CASE_INSENSITIVE_ORDER)) in testFrom()
90 .addEqualityGroup(orderingFromOrdering, Ordering.natural()) in testFrom()
[all …]
DBstRangeOpsTest.java64 countAggregate, GeneralRange.downTo(Ordering.natural(), c, type), ROOT); in testCountInRangeLowerBound()
78 countAggregate, GeneralRange.upTo(Ordering.natural(), c, type), ROOT); in testCountInRangeUpperBound()
98 Ordering.natural(), chars.charAt(i), lb, chars.charAt(j), ub), ROOT); in testCountInRangeBothBounds()
119 countAggregate, GeneralRange.<Character>all(Ordering.natural()), ROOT)); in testCountInRangeAll()
124 GeneralRange<Character> range = GeneralRange.all(Ordering.natural()); in testCountInRangeEmpty()
142 GeneralRange<Character> range1 = GeneralRange.downTo(Ordering.natural(), 'f', CLOSED); in testClearRangeLowerBound()
145 GeneralRange<Character> range2 = GeneralRange.downTo(Ordering.natural(), 'f', OPEN); in testClearRangeLowerBound()
148 GeneralRange<Character> range3 = GeneralRange.downTo(Ordering.natural(), 'a', CLOSED); in testClearRangeLowerBound()
151 GeneralRange<Character> range4 = GeneralRange.downTo(Ordering.natural(), 'a', OPEN); in testClearRangeLowerBound()
154 GeneralRange<Character> range5 = GeneralRange.downTo(Ordering.natural(), 'c', OPEN); in testClearRangeLowerBound()
[all …]
DSortedIterablesTest.java37 ASSERT.that(SortedIterables.sortedCounts(Ordering.natural(), list)) in testSortedCounts()
47 ASSERT.that(SortedIterables.sortedCounts(Ordering.natural(), list.iterator())) in testSortedCountsIterator()
55 assertTrue(SortedIterables.hasSameComparator(Ordering.natural(), Sets.newTreeSet())); in testSameComparator()
59 SortedIterables.hasSameComparator(Ordering.natural(), Maps.newTreeMap().keySet())); in testSameComparator()
61 assertTrue(SortedIterables.hasSameComparator(Ordering.natural().reverse(), in testSameComparator()
62 Sets.newTreeSet(Ordering.natural().reverse()))); in testSameComparator()
DTreeMultimapNaturalTest.java149 assertSame(Ordering.natural(), multimap.get("foo").comparator()); in testComparatorFromGet()
150 assertSame(Ordering.natural(), multimap.get("missing").comparator()); in testComparatorFromGet()
200 Ordering.natural();
203 Ordering.natural().reverse().nullsFirst();
218 assertSame(Ordering.natural(), copyFromTree.keyComparator()); in testCreateFromTreeMultimap()
219 assertSame(Ordering.natural(), copyFromTree.valueComparator()); in testCreateFromTreeMultimap()
220 assertSame(Ordering.natural(), copyFromTree.get(1.0).comparator()); in testCreateFromTreeMultimap()
236 assertEquals(Ordering.natural(), copyFromHash.keyComparator()); in testCreateFromHashMultimap()
237 assertEquals(Ordering.natural(), copyFromHash.valueComparator()); in testCreateFromHashMultimap()
254 assertSame(Ordering.natural(), copyFromSorted.keyComparator()); in testCreateFromSortedSetMultimap()
[all …]
DBstOperationsTest.java60 assertEquals(a, BstOperations.seek(Ordering.natural(), d, 'a')); in testSeek1()
61 assertEquals(b, BstOperations.seek(Ordering.natural(), d, 'b')); in testSeek1()
62 assertNull(BstOperations.seek(Ordering.natural(), d, 'c')); in testSeek1()
63 assertEquals(d, BstOperations.seek(Ordering.natural(), d, 'd')); in testSeek1()
64 assertNull(BstOperations.seek(Ordering.natural(), d, 'e')); in testSeek1()
65 assertEquals(f, BstOperations.seek(Ordering.natural(), d, 'f')); in testSeek1()
66 assertEquals(g, BstOperations.seek(Ordering.natural(), d, 'g')); in testSeek1()
80 assertNull(BstOperations.seek(Ordering.natural(), d, 'a')); in testSeek2()
81 assertEquals(b, BstOperations.seek(Ordering.natural(), d, 'b')); in testSeek2()
82 assertEquals(c, BstOperations.seek(Ordering.natural(), d, 'c')); in testSeek2()
[all …]
DTreeBasedTableTest.java147 Collections.reverseOrder(), Ordering.usingToString()); in testCreateExplicitComparators()
158 Collections.reverseOrder(), Ordering.usingToString()); in testCreateCopy()
199 assertSame(Ordering.natural(), sortedTable.rowComparator()); in testRowComparator()
202 Collections.reverseOrder(), Ordering.usingToString()); in testRowComparator()
208 assertSame(Ordering.natural(), sortedTable.columnComparator()); in testColumnComparator()
211 Collections.reverseOrder(), Ordering.usingToString()); in testColumnComparator()
212 assertSame(Ordering.usingToString(), sortedTable.columnComparator()); in testColumnComparator()
217 assertSame(Ordering.natural(), in testRowKeySetComparator()
221 Collections.reverseOrder(), Ordering.usingToString()); in testRowKeySetComparator()
266 assertSame(Ordering.natural(), sortedTable.rowMap().comparator()); in testRowMapComparator()
[all …]
DImmutableTableTest.java224 = builder.orderRowsBy(Ordering.natural()) in testBuilder_orderRowsAndColumnsBy_putAll()
225 .orderColumnsBy(Ordering.natural()) in testBuilder_orderRowsAndColumnsBy_putAll()
236 builder.orderRowsBy(Ordering.natural()); in testBuilder_orderRowsAndColumnsBy_sparse()
237 builder.orderColumnsBy(Ordering.natural()); in testBuilder_orderRowsAndColumnsBy_sparse()
259 builder.orderRowsBy(Ordering.natural()); in testBuilder_orderRowsAndColumnsBy_dense()
260 builder.orderColumnsBy(Ordering.natural()); in testBuilder_orderRowsAndColumnsBy_dense()
281 builder.orderRowsBy(Ordering.natural()); in testBuilder_orderRowsBy_sparse()
299 builder.orderRowsBy(Ordering.natural()); in testBuilder_orderRowsBy_dense()
316 builder.orderColumnsBy(Ordering.natural()); in testBuilder_orderColumnsBy_sparse()
334 builder.orderColumnsBy(Ordering.natural()); in testBuilder_orderColumnsBy_dense()
DGeneralRangeTest.java38 private static final Ordering<Integer> ORDERING = Ordering.natural().nullsFirst();
174 assertEquals(GeneralRange.all(Ordering.natural()), GeneralRange.from(Ranges.all()));
179 assertEquals(GeneralRange.upTo(Ordering.natural(), 3, endpointType),
182 assertEquals(GeneralRange.downTo(Ordering.natural(), 3, endpointType),
190 assertEquals(GeneralRange.range(Ordering.natural(), 3, lowerType, 4, upperType),
209 tester.setDefault(Comparator.class, Ordering.arbitrary());
/external/guava/guava/src/com/google/common/collect/
DOrdering.java67 public abstract class Ordering<T> implements Comparator<T> { class
81 public static <C extends Comparable> Ordering<C> natural() { in natural()
82 return (Ordering<C>) NaturalOrdering.INSTANCE; in natural()
94 public static <T> Ordering<T> from(Comparator<T> comparator) { in from()
95 return (comparator instanceof Ordering) in from()
96 ? (Ordering<T>) comparator in from()
106 @Deprecated public static <T> Ordering<T> from(Ordering<T> ordering) { in from()
132 public static <T> Ordering<T> explicit(List<T> valuesInOrder) { in explicit()
160 public static <T> Ordering<T> explicit( in explicit()
200 public static Ordering<Object> arbitrary() { in arbitrary()
[all …]
DNullsLastOrdering.java27 final class NullsLastOrdering<T> extends Ordering<T> implements Serializable {
28 final Ordering<? super T> ordering;
30 NullsLastOrdering(Ordering<? super T> ordering) { in NullsLastOrdering()
47 @Override public <S extends T> Ordering<S> reverse() { in reverse()
52 @Override public <S extends T> Ordering<S> nullsFirst() { in nullsFirst()
57 @Override public <S extends T> Ordering<S> nullsLast() { in nullsLast()
58 return (Ordering<S>) this; in nullsLast()
DNullsFirstOrdering.java27 final class NullsFirstOrdering<T> extends Ordering<T> implements Serializable {
28 final Ordering<? super T> ordering;
30 NullsFirstOrdering(Ordering<? super T> ordering) { in NullsFirstOrdering()
47 @Override public <S extends T> Ordering<S> reverse() { in reverse()
53 @Override public <S extends T> Ordering<S> nullsFirst() { in nullsFirst()
54 return (Ordering<S>) this; in nullsFirst()
57 @Override public <S extends T> Ordering<S> nullsLast() { in nullsLast()
DImmutableSortedSet.java93 Ordering.natural();
125 ImmutableList.of(element), Ordering.natural()); in of()
138 return copyOf(Ordering.natural(), Arrays.asList(e1, e2)); in of()
151 return copyOf(Ordering.natural(), Arrays.asList(e1, e2, e3)); in of()
164 return copyOf(Ordering.natural(), Arrays.asList(e1, e2, e3, e4)); in of()
177 return copyOf(Ordering.natural(), Arrays.asList(e1, e2, e3, e4, e5)); in of()
195 return copyOf(Ordering.natural(), all); in of()
210 return copyOf(Ordering.natural(), Arrays.asList(elements)); in copyOf()
244 Ordering<E> naturalOrder = (Ordering<E>) Ordering.<Comparable>natural(); in copyOf()
282 Ordering<E> naturalOrder = (Ordering<E>) Ordering.<Comparable>natural(); in copyOf()
[all …]
DImmutableSortedMultiset.java79 private static final Comparator<Comparable> NATURAL_ORDER = Ordering.natural();
108 return copyOf(Ordering.natural(), Arrays.asList(e1, e2)); in of()
119 return copyOf(Ordering.natural(), Arrays.asList(e1, e2, e3)); in of()
131 return copyOf(Ordering.natural(), Arrays.asList(e1, e2, e3, e4)); in of()
143 return copyOf(Ordering.natural(), Arrays.asList(e1, e2, e3, e4, e5)); in of()
165 return copyOf(Ordering.natural(), all); in of()
175 return copyOf(Ordering.natural(), Arrays.asList(elements)); in copyOf()
204 Ordering<E> naturalOrder = (Ordering<E>) Ordering.<Comparable>natural(); in copyOf()
222 Ordering<E> naturalOrder = (Ordering<E>) Ordering.<Comparable>natural(); in copyOf()
346 return reverseComparator = Ordering.from(comparator).<E>reverse(); in reverseComparator()
[all …]
DReverseOrdering.java30 final class ReverseOrdering<T> extends Ordering<T> implements Serializable {
31 final Ordering<? super T> forwardOrder;
33 ReverseOrdering(Ordering<? super T> forwardOrder) { in ReverseOrdering()
42 @Override public <S extends T> Ordering<S> reverse() { in reverse()
43 return (Ordering<S>) forwardOrder; in reverse()
DLexicographicalOrdering.java32 extends Ordering<Iterable<T>> implements Serializable {
33 final Ordering<? super T> elementOrder;
35 LexicographicalOrdering(Ordering<? super T> elementOrder) { in LexicographicalOrdering()
DNaturalOrdering.java31 extends Ordering<Comparable> implements Serializable {
44 @Override public <S extends Comparable> Ordering<S> reverse() { in reverse()
45 return (Ordering<S>) ReverseNaturalOrdering.INSTANCE; in reverse()
DByFunctionOrdering.java35 extends Ordering<F> implements Serializable {
37 final Ordering<T> ordering;
40 Function<F, ? extends T> function, Ordering<T> ordering) { in ByFunctionOrdering()
DTreeMultimap.java81 return new TreeMultimap<K, V>(Ordering.natural(), Ordering.natural()); in create()
107 return new TreeMultimap<K, V>(Ordering.natural(), Ordering.natural(), in create()
DRange.java230 if (Ordering.natural().equals(comparator) || comparator == null) { in containsAll()
314 Cut<C> newLower = Ordering.natural().max(lowerBound, other.lowerBound); in intersection()
315 Cut<C> newUpper = Ordering.natural().min(upperBound, other.upperBound); in intersection()
370 Cut<C> newLower = Ordering.natural().min(lowerBound, other.lowerBound); in span()
371 Cut<C> newUpper = Ordering.natural().max(upperBound, other.upperBound); in span()
DImmutableSortedMap.java72 Ordering.natural();
106 ImmutableList.of(entryOf(k1, v1)), Ordering.natural()); in of()
118 return new Builder<K, V>(Ordering.natural()) in of()
131 return new Builder<K, V>(Ordering.natural()) in of()
144 return new Builder<K, V>(Ordering.natural()) in of()
157 return new Builder<K, V>(Ordering.natural()) in of()
183 Ordering<K> naturalOrder = (Ordering<K>) Ordering.<Comparable>natural(); in copyOf()
303 return new Builder<K, V>(Ordering.natural()); in naturalOrder()
328 return new Builder<K, V>(Ordering.natural().reverse()); in reverseOrder()
/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
DImmutableSortedSet.java51 private static final Comparator NATURAL_ORDER = Ordering.natural();
78 return ofInternal(Ordering.natural(), element); in of()
84 return ofInternal(Ordering.natural(), e1, e2); in of()
90 return ofInternal(Ordering.natural(), e1, e2, e3); in of()
96 return ofInternal(Ordering.natural(), e1, e2, e3, e4); in of()
102 return ofInternal(Ordering.natural(), e1, e2, e3, e4, e5); in of()
113 return ofInternal(Ordering.natural(), (E[]) all.toArray(new Comparable[0])); in of()
141 return copyOfInternal(Ordering.natural(), elements, false); in copyOf()
146 return copyOfInternal(Ordering.natural(), elements, false); in copyOf()
151 return copyOfInternal(Ordering.natural(), elements); in copyOf()
[all …]
DTreeMultimap.java77 return new TreeMultimap<K, V>(Ordering.natural(), Ordering.natural()); in create()
103 return new TreeMultimap<K, V>(Ordering.natural(), Ordering.natural(), in create()
DImmutableSortedMap.java46 private static final Comparator NATURAL_ORDER = Ordering.natural();
94 return create(Ordering.natural(), entryOf(k1, v1)); in of()
99 return new Builder<K, V>(Ordering.natural()) in of()
105 return new Builder<K, V>(Ordering.natural()) in of()
111 return new Builder<K, V>(Ordering.natural()) in of()
117 return new Builder<K, V>(Ordering.natural()) in of()
123 return copyOfInternal(map, Ordering.natural()); in copyOf()
183 return new Builder<K, V>(Ordering.natural()); in naturalOrder()
191 return new Builder<K, V>(Ordering.natural().reverse()); in reverseOrder()
/external/llvm/lib/Transforms/Utils/
DGlobalStatus.cpp74 GS.Ordering = strongerOrdering(GS.Ordering, LI->getOrdering()); in analyzeGlobalAux()
84 GS.Ordering = strongerOrdering(GS.Ordering, SI->getOrdering()); in analyzeGlobalAux()
181 Ordering(NotAtomic) {} in GlobalStatus()
/external/smali/util/src/test/java/org/jf/util/
DLinearSearchTest.java35 import com.google.common.collect.Ordering;
97 int expectedIndex = Ordering.natural().binarySearch(list, key); in doTest()
99 …Assert.assertEquals(expectedIndex, LinearSearch.linearSearch(list, Ordering.<Integer>natural(), ke… in doTest()

123456