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

1 2 3 4 5 6 7 8 91011>>

  /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...]
  /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());
SortIndex.java 16 import java.util.Comparator;
20 * A index on a list of items sorted with a given {@link Comparator}. The index
28 private final Comparator<? super T> comparator; field in class:SortIndex
42 return comparator.compare(item, o.item);
52 * Creates a new index based in the given comparator.
54 * @param comparator
55 * comparator to sort items
57 public SortIndex(final Comparator<? super T> comparator) {
    [all...]
  /external/junit/src/org/junit/runner/manipulation/
Sorter.java 3 import java.util.Comparator;
9 * to use a <code>Sorter</code> directly. Instead, use {@link org.junit.runner.Request#sortWith(Comparator)}.
13 public class Sorter implements Comparator<Description> {
17 public static Sorter NULL= new Sorter(new Comparator<Description>() {
21 private final Comparator<Description> fComparator;
24 * Creates a <code>Sorter</code> that uses <code>comparator</code>
26 * @param comparator the {@link Comparator} to use when sorting tests
28 public Sorter(Comparator<Description> comparator) {
    [all...]
  /external/guava/guava/src/com/google/common/collect/
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...]
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...]
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/junit/src/org/junit/internal/requests/
SortingRequest.java 3 import java.util.Comparator;
12 private final Comparator<Description> fComparator;
14 public SortingRequest(Request request, Comparator<Description> comparator) {
16 fComparator= comparator;
  /external/icu/android_icu4j/src/main/tests/android/icu/dev/util/
ArrayComparator.java 9 import java.util.Comparator;
11 public class ArrayComparator implements Comparator {
12 public static final Comparator COMPARABLE = new Comparator() {
17 private Comparator[] comparators;
20 public ArrayComparator (Comparator[] comparators, int[] reordering) {
30 throw new IllegalArgumentException("comparator and reordering lengths must match");
35 public ArrayComparator (Comparator... comparators) {
41 * where i is the index of the first comparator finding a difference
42 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object
    [all...]
  /external/icu/icu4j/main/tests/framework/src/com/ibm/icu/dev/util/
ArrayComparator.java 8 import java.util.Comparator;
10 public class ArrayComparator implements Comparator {
11 public static final Comparator COMPARABLE = new Comparator() {
16 private Comparator[] comparators;
19 public ArrayComparator (Comparator[] comparators, int[] reordering) {
29 throw new IllegalArgumentException("comparator and reordering lengths must match");
34 public ArrayComparator (Comparator... comparators) {
40 * where i is the index of the first comparator finding a difference
41 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object
    [all...]
  /external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
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...]
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);
  /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/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/ojluni/src/main/java/java/util/
Comparator.java 38 * as {@link Collections#sort(List,Comparator) Collections.sort} or {@link
39 * Arrays#sort(Object[],Comparator) Arrays.sort}) to allow precise control
45 * The ordering imposed by a comparator <tt>c</tt> on a set of elements
51 * Caution should be exercised when using a comparator capable of imposing an
53 * Suppose a sorted set (or sorted map) with an explicit comparator <tt>c</tt>
62 * to an empty {@code TreeSet} with comparator {@code c}.
72 * order for the data structure to serialize successfully, the comparator (if
76 * <i>imposed ordering</i> that a given comparator <tt>c</tt> imposes on a
92 * <p>Unlike {@code Comparable}, a comparator may optionally permit
100 * @param <T> the type of objects that may be compared by this comparator
    [all...]
  /packages/apps/UnifiedEmail/src/org/apache/commons/io/comparator/
ReverseComparator.java 17 package org.apache.commons.io.comparator;
20 import java.util.Comparator;
24 * the delegate {@link Comparator}.
29 class ReverseComparator<T> implements Comparator<T>, Serializable {
31 private final Comparator<T> delegate;
34 * Construct an instance with the sepecified delegate {@link Comparator}.
36 * @param delegate The comparator to delegate to
38 public ReverseComparator(Comparator<T> delegate) {
40 throw new IllegalArgumentException("Delegate comparator is missing");
46 * Compare using the delegate Comparator, but reversing the result
    [all...]
NameFileComparator.java 17 package org.apache.commons.io.comparator;
21 import java.util.Comparator;
28 * This comparator can be used to sort lists or arrays of files
52 public class NameFileComparator implements Comparator<File>, Serializable {
54 /** Case-sensitive name comparator instance (see {@link IOCase#SENSITIVE}) */
55 public static final Comparator<File> NAME_COMPARATOR = new NameFileComparator();
57 /** Reverse case-sensitive name comparator instance (see {@link IOCase#SENSITIVE}) */
58 public static final Comparator<File> NAME_REVERSE = new ReverseComparator<File>(NAME_COMPARATOR);
60 /** Case-insensitive name comparator instance (see {@link IOCase#INSENSITIVE}) */
61 public static final Comparator<File> NAME_INSENSITIVE_COMPARATOR = new NameFileComparator(IOCase.INSENSITIVE)
    [all...]
PathFileComparator.java 17 package org.apache.commons.io.comparator;
21 import java.util.Comparator;
28 * This comparator can be used to sort lists or arrays of files
52 public class PathFileComparator implements Comparator<File>, Serializable {
54 /** Case-sensitive path comparator instance (see {@link IOCase#SENSITIVE}) */
55 public static final Comparator<File> PATH_COMPARATOR = new PathFileComparator();
57 /** Reverse case-sensitive path comparator instance (see {@link IOCase#SENSITIVE}) */
58 public static final Comparator<File> PATH_REVERSE = new ReverseComparator<File>(PATH_COMPARATOR);
60 /** Case-insensitive path comparator instance (see {@link IOCase#INSENSITIVE}) */
61 public static final Comparator<File> PATH_INSENSITIVE_COMPARATOR = new PathFileComparator(IOCase.INSENSITIVE)
    [all...]
  /external/guava/guava-tests/benchmark/com/google/common/collect/
MinMaxPriorityQueueBenchmark.java 28 import java.util.Comparator;
39 @Param private ComparatorType comparator; field in class:MinMaxPriorityQueueBenchmark
42 // NotApplicableException in the expensive comparator case.
52 queue = heap.create(comparator.get());
82 public InvertedMinMaxPriorityQueue(Comparator<T> comparator) {
83 mmHeap = MinMaxPriorityQueue.orderedBy(comparator).create();
100 @Override public Queue<Integer> create(Comparator<Integer> comparator) {
101 return MinMaxPriorityQueue.orderedBy(comparator).create()
    [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/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/
org.eclipse.equinox.p2.repository.tools_2.0.1.R36x_v20100823.jar 
  /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/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...]

Completed in 1277 milliseconds

1 2 3 4 5 6 7 8 91011>>