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

1 2 3 4 5 6 7 8 91011>>

  /external/jacoco/org.jacoco.report/src/org/jacoco/report/internal/html/table/
TableItemComparator.java 14 import java.util.Comparator;
21 class TableItemComparator implements Comparator<ITableItem> {
23 private final Comparator<ICoverageNode> comparator; field in class:TableItemComparator
25 TableItemComparator(final Comparator<ICoverageNode> comparator) {
26 this.comparator = comparator;
30 return comparator.compare(i1.getNode(), i2.getNode());
  /external/guava/guava/src/com/google/common/collect/
ComparatorOrdering.java 24 import java.util.Comparator;
28 /** An ordering for a pre-existing comparator. */
31 final Comparator<T> comparator; field in class:ComparatorOrdering
33 ComparatorOrdering(Comparator<T> comparator) {
34 this.comparator = checkNotNull(comparator);
38 return comparator.compare(a, b);
47 return this.comparator.equals(that.comparator)
    [all...]
SortedIterables.java 21 import java.util.Comparator;
35 * to {@code comparator}.
37 public static boolean hasSameComparator(Comparator<?> comparator, Iterable<?> elements) {
38 checkNotNull(comparator);
40 Comparator<?> comparator2;
42 comparator2 = comparator((SortedSet<?>) elements);
44 comparator2 = ((SortedIterable<?>) elements).comparator();
48 return comparator.equals(comparator2);
52 // if sortedSet.comparator() is null, the set must be naturally ordere
53 public static <E> Comparator<? super E> comparator(SortedSet<E> sortedSet) { method in class:SortedIterables
    [all...]
ImmutableSortedSet.java 32 import java.util.Comparator;
41 * Some instances are ordered by an explicit comparator, while others follow the
62 * two elements are equivalent. Instead, with an explicit comparator, the
66 * {(x, y) | comparator.compare(x, y) == 0}}</pre>
97 private static final Comparator<Comparable> NATURAL_ORDER =
109 Comparator<? super E> comparator) {
110 if (NATURAL_ORDER.equals(comparator)) {
113 return new EmptyImmutableSortedSet<E>(comparator);
226 * copy of a {@code SortedSet} that preserves the comparator, call {@lin
401 Comparator<? super E> comparator = SortedIterables.comparator(sortedSet); local
491 private final Comparator<? super E> comparator; field in class:ImmutableSortedSet.Builder
582 final transient Comparator<? super E> comparator; field in class:ImmutableSortedSet
596 public Comparator<? super E> comparator() { method in class:ImmutableSortedSet
811 final Comparator<? super E> comparator; field in class:ImmutableSortedSet.SerializedForm
    [all...]
GeneralRange.java 26 import java.util.Comparator;
32 * {@link Range}, this allows the use of an arbitrary comparator. This is designed for use in the
57 * Returns the whole range relative to the specified comparator.
59 static <T> GeneralRange<T> all(Comparator<? super T> comparator) {
60 return new GeneralRange<T>(comparator, false, null, OPEN, false, null, OPEN);
64 * Returns everything above the endpoint relative to the specified comparator, with the specified
67 static <T> GeneralRange<T> downTo(Comparator<? super T> comparator, @Nullable T endpoint,
69 return new GeneralRange<T>(comparator, true, endpoint, boundType, false, null, OPEN)
90 private final Comparator<? super T> comparator; field in class:GeneralRange
128 Comparator<? super T> comparator() { method in class:GeneralRange
    [all...]
  /external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
EmptyImmutableSortedMap.java 19 import java.util.Comparator;
28 private EmptyImmutableSortedMap(Comparator<? super K> comparator) {
29 super(new TreeMap<K, V>(comparator), comparator);
36 static <K, V> ImmutableSortedMap<K, V> forComparator(Comparator<? super K> comparator) {
37 if (comparator == NATURAL_ORDER) {
40 return new EmptyImmutableSortedMap<K, V>(comparator);
EmptyImmutableSortedSet.java 19 import java.util.Comparator;
27 EmptyImmutableSortedSet(Comparator<? super E> comparator) {
28 super(Sets.newTreeSet(comparator));
RegularImmutableSortedMap.java 19 import java.util.Comparator;
28 RegularImmutableSortedMap(SortedMap<K, V> delegate, Comparator<? super K> comparator) {
29 super(delegate, comparator);
ImmutableSortedSet.java 25 import java.util.Comparator;
54 private static final Comparator NATURAL_ORDER = Ordering.natural();
66 Comparator<? super E> comparator) {
67 checkNotNull(comparator);
68 if (NATURAL_ORDER.equals(comparator)) {
71 return new EmptyImmutableSortedSet<E>(comparator);
120 Comparator<? super E> comparator, E... elements) {
124 return emptySet(comparator);
172 Comparator<? super E> comparator = sortedSet.comparator(); local
264 public Comparator<? super E> comparator() { method in class:ImmutableSortedSet
399 private final Comparator<? super E> comparator; field in class:ImmutableSortedSet.Builder
    [all...]
ImmutableSortedMap.java 26 import java.util.Comparator;
41 static final Comparator NATURAL_ORDER = Ordering.natural();
45 private Comparator<? super K> unusedComparatorForSerialization;
51 // The comparator used by this map. It's the same as that of sortedDelegate,
52 // except that when sortedDelegate's comparator is null, it points to a
54 // (cpovirk: Is sortedDelegate's comparator really ever null?)
55 // The comparator will likely also differ because of our nullAccepting hack.
57 private final transient Comparator<? super K> comparator; field in class:ImmutableSortedMap
59 ImmutableSortedMap(SortedMap<K, V> delegate, Comparator<? super K> comparator)
126 Comparator<? super K> comparator = local
185 private final Comparator<? super K> comparator; field in class:ImmutableSortedMap.Builder
234 public Comparator<? super K> comparator() { method in class:ImmutableSortedMap
    [all...]
  /libcore/ojluni/src/main/java/java/util/function/
BinaryOperator.java 28 import java.util.Comparator;
49 * according to the specified {@code Comparator}.
51 * @param <T> the type of the input arguments of the comparator
52 * @param comparator a {@code Comparator} for comparing the two values
54 * according to the supplied {@code Comparator}
57 public static <T> BinaryOperator<T> minBy(Comparator<? super T> comparator) {
58 Objects.requireNonNull(comparator);
59 return (a, b) -> comparator.compare(a, b) <= 0 ? a : b
    [all...]
  /external/chromium-trace/catapult/third_party/gsutil/third_party/boto/boto/mturk/
qualification.py 47 def __init__(self, qualification_type_id, comparator, integer_value=None, required_to_preview=False):
49 self.comparator = comparator
56 "Comparator": self.comparator,
58 if self.comparator != 'Exists' and self.integer_value is not None:
69 def __init__(self, comparator, integer_value, required_to_preview=False):
70 super(PercentAssignmentsSubmittedRequirement, self).__init__(qualification_type_id="00000000000000000000", comparator=comparator, integer_value=integer_value, required_to_preview=required_to_preview)
77 def __init__(self, comparator, integer_value, required_to_preview=False)
    [all...]
  /external/easymock/src/org/easymock/internal/matchers/
Compare.java 19 import java.util.Comparator;
30 private Comparator<? super T> comparator; field in class:Compare
34 public Compare(T expected, Comparator<? super T> comparator, LogicalOperator result) {
36 this.comparator = comparator;
41 buffer.append(comparator + "(" + expected + ") " + operator.getSymbol()
50 return operator.matchResult(comparator.compare((T) actual, expected));
  /libcore/luni/src/test/java/libcore/java/util/
ComparatorTest.java 21 import java.util.Comparator;
43 private <T> void checkComparison(Comparator<T> comparator, T[] items) {
45 assertEquals(0, comparator.compare(items[i], items[i]));
47 assertTrue(comparator.compare(items[i], items[j]) < 0);
48 assertTrue(comparator.compare(items[j], items[i]) > 0);
54 Comparator<Item> comparator = Comparator.comparingDouble(Item::getOrderAsDouble); local
55 checkComparison(comparator, orderedItems)
59 Comparator<Item> comparator = Comparator.comparingInt(Item::getOrderAsInt); local
64 Comparator<Item> comparator = Comparator.comparingLong(Item::getOrderAsLong); local
69 Comparator<Item> comparator = Comparator.comparing(Item::getOrderAsString); local
74 Comparator<Item> comparator = Comparator.comparing(Item::getOrderAsString, local
80 Comparator<Item> comparator = Comparator.naturalOrder(); local
88 Comparator<Item> comparator = Comparator.reverseOrder(); local
100 Comparator<Item> comparator = Comparator.naturalOrder(); local
105 Comparator<Item> comparator = Comparator.comparing(Item::getOrderAsString); local
110 Comparator<Item> comparator = Comparator.nullsFirst(Comparator.naturalOrder()); local
115 Comparator<Item> comparator = Comparator.nullsLast(Comparator.naturalOrder()); local
120 Comparator<Item> comparator = Comparator.comparingDouble(Item::getOrderAsDouble) local
126 Comparator<Item> comparator = Comparator.comparingInt(Item::getOrderAsInt) local
132 Comparator<Item> comparator = Comparator.comparingLong(Item::getOrderAsLong) local
138 Comparator<Item> comparator = Comparator.comparing(Item::getOrderAsString) local
    [all...]
  /packages/apps/UnifiedEmail/tests/src/com/android/mail/utils/
RankedComparatorTest.java 35 private RankedComparator<DummyObject, String> comparator; field in class:RankedComparatorTest
40 comparator =
50 comparator.compare(rank1_1, rank1_1) == 0);
52 comparator.compare(rank1_1, rank1_2) == 0);
55 assertTrue(comparator.compare(rank1_1, rank2) < 0);
56 assertTrue(comparator.compare(rank2, rank1_1) > 0);
65 comparator.compare(knownRank, unknownRank1) < 0);
67 comparator.compare(unknownRank1, knownRank) > 0);
69 comparator.compare(unknownRank1, unknownRank2) == 0);
78 comparator.compare(knownRank, nullRank) < 0)
    [all...]
  /external/replicaisland/src/com/replica/replicaisland/
QuickSorter.java 19 import java.util.Comparator;
22 public void sort(Type[] array, int count, Comparator<Type> comparator) {
23 quicksort(array, 0, count - 1, comparator);
45 public void quicksort(Type[] a, int left, int right, Comparator<Type> comparator) {
47 int i = partition(a, left, right, comparator);
48 quicksort(a, left, i - 1, comparator);
49 quicksort(a, i + 1, right, comparator);
53 private int partition(Type[] a, int left, int right, Comparator<Type> comparator)
    [all...]
StandardSorter.java 20 import java.util.Comparator;
25 public void sort(Object[] array, int count, Comparator comparator) {
26 Arrays.sort(array, 0, count, comparator);
Sorter.java 19 import java.util.Comparator;
22 public abstract void sort(Type[] array, int count, Comparator<Type> comparator);
ShellSorter.java 19 import java.util.Comparator;
30 public void sort(Type[] array, int count, Comparator<Type> comparator) {
36 insertionSort(array, count, start, increment, comparator);
44 insertionSort(array, count, 0, 1, comparator );
59 Comparator<Type> comparator) {
67 int delta = comparator.compare(array[j], array[k]);
77 } while ( j != start && comparator.compare(array[k], temp) > 0 );
  /external/icu/android_icu4j/src/main/java/android/icu/impl/
IterableComparator.java 10 import java.util.Comparator;
18 public class IterableComparator<T> implements Comparator<Iterable<T>> {
19 private final Comparator<T> comparator; field in class:IterableComparator
26 public IterableComparator(Comparator<T> comparator) {
27 this(comparator, true);
30 public IterableComparator(Comparator<T> comparator, boolean shorterFirst) {
31 this.comparator = comparator
    [all...]
  /external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/
IterableComparator.java 9 import java.util.Comparator;
16 public class IterableComparator<T> implements Comparator<Iterable<T>> {
17 private final Comparator<T> comparator; field in class:IterableComparator
24 public IterableComparator(Comparator<T> comparator) {
25 this(comparator, true);
28 public IterableComparator(Comparator<T> comparator, boolean shorterFirst) {
29 this.comparator = comparator
    [all...]
  /external/smali/util/src/main/java/org/jf/util/
LinearSearch.java 34 import java.util.Comparator;
42 * @param comparator The comparator to use
48 public static <T> int linearSearch(List<? extends T> list, Comparator<T> comparator, T key, int initialGuess) {
53 int comparison = comparator.compare(list.get(guess), key);
60 comparison = comparator.compare(list.get(guess), key);
73 comparison = comparator.compare(list.get(guess), key);
  /external/emma/core/java12/com/vladium/emma/report/
ItemComparator.java 11 import java.util.Comparator;
18 interface ItemComparator extends Comparator
40 final Comparator [] comparators = new Comparator [attributeIDsWithDir.length >> 1];
45 final Comparator comparator = IItemAttribute.Factory.getAttribute (attributeID, unitsID).comparator (); local
46 comparators [a >> 1] = attributeIDsWithDir [a + 1] < 0 ? new ReverseComparator (comparator) : comparator;
70 ReverseComparator (final Comparator comparator
    [all...]
  /external/apache-commons-math/src/main/java/org/apache/commons/math/optimization/direct/
NelderMead.java 20 import java.util.Comparator;
74 protected void iterateSimplex(final Comparator<RealPointValuePair> comparator)
109 if ((comparator.compare(best, reflected) <= 0) &&
110 (comparator.compare(reflected, secondBest) < 0)) {
113 replaceWorstPoint(reflected, comparator);
115 } else if (comparator.compare(reflected, best) < 0) {
124 if (comparator.compare(expanded, reflected) < 0) {
126 replaceWorstPoint(expanded, comparator);
129 replaceWorstPoint(reflected, comparator);
    [all...]
MultiDirectional.java 20 import java.util.Comparator;
61 protected void iterateSimplex(final Comparator<RealPointValuePair> comparator)
74 final RealPointValuePair reflected = evaluateNewSimplex(original, 1.0, comparator);
75 if (comparator.compare(reflected, best) < 0) {
79 final RealPointValuePair expanded = evaluateNewSimplex(original, khi, comparator);
80 if (comparator.compare(reflected, expanded) <= 0) {
90 final RealPointValuePair contracted = evaluateNewSimplex(original, gamma, comparator);
91 if (comparator.compare(contracted, best) < 0) {
113 * @param comparator comparator to use to sort simplex vertices from best to poores
    [all...]

Completed in 3466 milliseconds

1 2 3 4 5 6 7 8 91011>>