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

1 2 3 4 5 6

  /external/guava/src/com/google/common/collect/
ComparatorOrdering.java 24 import java.util.Comparator;
29 /** An ordering for a pre-existing {@code comparator}. */
32 final Comparator<T> comparator; field in class:ComparatorOrdering
34 ComparatorOrdering(Comparator<T> comparator) {
35 this.comparator = checkNotNull(comparator);
39 return comparator.compare(a, b);
44 return Collections.binarySearch(sortedList, key, comparator);
    [all...]
ImmutableSortedSet.java 30 import java.util.Comparator;
37 * Some instances are ordered by an explicit comparator, while others follow the
58 * two elements are equivalent. Instead, with an explicit comparator, the
62 * {(x, y) | comparator.compare(x, y) == 0}}</pre>
89 private static final Comparator NATURAL_ORDER = Ordering.natural();
101 Comparator<? super E> comparator) {
102 if (NATURAL_ORDER.equals(comparator)) {
105 return new EmptyImmutableSortedSet<E>(comparator);
193 Comparator<? super E> comparator, E... elements)
346 Comparator<? super E> comparator = sortedSet.comparator(); local
483 private final Comparator<? super E> comparator; field in class:ImmutableSortedSet.Builder
570 final transient Comparator<? super E> comparator; field in class:ImmutableSortedSet
583 public Comparator<? super E> comparator() { method in class:ImmutableSortedSet
660 final Comparator<? super E> comparator; field in class:ImmutableSortedSet.SerializedForm
    [all...]
ImmutableSortedMap.java 27 import java.util.Comparator;
64 private static final Comparator NATURAL_ORDER = Ordering.natural();
81 Comparator<? super K> comparator) {
82 if (NATURAL_ORDER.equals(comparator)) {
85 return new ImmutableSortedMap<K, V>(EMPTY_ARRAY, comparator);
177 * keys sorted by the provided comparator.
184 * the comparator
187 Map<? extends K, ? extends V> map, Comparator<? super K> comparator) {
205 Comparator<? super K> comparator = local
325 private final Comparator<? super K> comparator; field in class:ImmutableSortedMap.Builder
375 private final transient Comparator<? super K> comparator; field in class:ImmutableSortedMap
584 public Comparator<? super K> comparator() { method
676 private final Comparator<Object> comparator; field in class:SerializedForm
    [all...]
TreeMultiset.java 24 import java.util.Comparator;
36 * their natural order or an explicit {@link Comparator}. In all cases, this
38 * Comparator#compare} instead of {@link Object#equals} to determine
76 * comparator. All elements inserted into the multiset must be <i>mutually
77 * comparable</i> by the specified comparator: {@code comparator.compare(e1,
83 * @param comparator the comparator that will be used to sort this multiset. A
87 public static <E> TreeMultiset<E> create(Comparator<? super E> comparator) {
151 public Comparator<? super E> comparator() { method in class:TreeMultiset.SortedMapBasedElementSet
208 Comparator<? super E> comparator local
    [all...]
ForwardingSortedMap.java 21 import java.util.Comparator;
40 public Comparator<? super K> comparator() { method in class:ForwardingSortedMap
41 return delegate().comparator();
ForwardingSortedSet.java 21 import java.util.Comparator;
40 public Comparator<? super E> comparator() { method in class:ForwardingSortedSet
41 return delegate().comparator();
ComparisonChain.java 23 import java.util.Comparator;
70 @Nullable T left, @Nullable T right, Comparator<T> comparator) {
71 return classify(comparator.compare(left, right));
112 @Nullable T right, @Nullable Comparator<T> comparator) {
144 * Compares two objects using a comparator, <i>if</i> the result of this
148 @Nullable T left, @Nullable T right, Comparator<T> comparator);
  /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));
  /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...]
  /cts/tools/signature-tools/test/signature/comparator/util/
AbstractComparatorTest.java 17 package signature.comparator.util;
33 private IApiComparator comparator; field in class:AbstractComparatorTest
37 comparator = new ApiComparator();
41 return comparator.compare(from, to);
  /libcore/luni/src/main/java/java/util/
SortedSet.java 24 * {@link Comparator} which is passed into a concrete implementation at
28 * @see Comparator
34 * Returns the comparator used to compare elements in this {@code SortedSet}.
36 * @return a comparator or null if the natural ordering is used.
38 public Comparator<? super E> comparator(); method in interface:SortedSet
SortedMap.java 23 * natural ordering of its keys or the ordering given by a specified comparator.
28 * Returns the comparator used to compare keys in this sorted map.
30 * @return the comparator or {@code null} if the natural order is used.
32 public Comparator<? super K> comparator(); method in interface:SortedMap
PriorityQueue.java 25 * according to their natural order or according to the comparator specified at
47 private Comparator<? super E> comparator; field in class:PriorityQueue
73 * Constructs a priority queue with the specified capacity and comparator.
77 * @param comparator
78 * the specified comparator. If it is null, the natural ordering
83 public PriorityQueue(int initialCapacity, Comparator<? super E> comparator) {
88 this.comparator = comparator;
229 public Comparator<? super E> comparator() { method in class:PriorityQueue
    [all...]
  /cts/tools/signature-tools/test/signature/comparator/
AnnotationCompareTest.java 17 package signature.comparator;
24 import signature.comparator.util.AbstractComparatorTest;
AllDocletTests.java 17 package signature.comparator;
  /cts/tests/tests/content/src/android/content/pm/cts/
PackageItemInfo_DisplayNameComparatorTest.java 55 DisplayNameComparator comparator = new DisplayNameComparator(pm); local
64 assertTrue(comparator.compare(pkgItemInfo, cmpInfo) < 0);
65 assertTrue(comparator.compare(pkgItemInfo, pkgItemInfo) == 0);
66 assertTrue(comparator.compare(cmpInfo, pkgItemInfo) > 0);
  /packages/apps/Email/emailcommon/src/org/apache/commons/io/comparator/
DefaultFileComparator.java 17 package org.apache.commons.io.comparator;
21 import java.util.Comparator;
26 * This comparator can be used to sort lists or arrays of files
47 public class DefaultFileComparator implements Comparator<File>, Serializable {
49 /** Singleton default comparator instance */
50 public static final Comparator<File> DEFAULT_COMPARATOR = new DefaultFileComparator();
52 /** Singleton reverse default comparator instance */
53 public static final Comparator<File> DEFAULT_REVERSE = new ReverseComparator<File>(DEFAULT_COMPARATOR);
LastModifiedFileComparator.java 17 package org.apache.commons.io.comparator;
21 import java.util.Comparator;
27 * This comparator can be used to sort lists or arrays of files
48 public class LastModifiedFileComparator implements Comparator<File>, Serializable {
50 /** Last modified comparator instance */
51 public static final Comparator<File> LASTMODIFIED_COMPARATOR = new LastModifiedFileComparator();
53 /** Reverse last modified comparator instance */
54 public static final Comparator<File> LASTMODIFIED_REVERSE = new ReverseComparator<File>(LASTMODIFIED_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...]
  /external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/
HttpRetryExceptionTest.java 34 // comparator for HttpRetryException objects
35 private static final SerializableAssert comparator = new SerializableAssert() { field in class:HttpRetryExceptionTest
53 LOCATION), comparator);
61 100, LOCATION), comparator);
  /libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/
HttpRetryExceptionTest.java 34 // comparator for HttpRetryException objects
35 private static final SerializableAssert comparator = new SerializableAssert() { field in class:HttpRetryExceptionTest
53 LOCATION), comparator);
61 100, LOCATION), comparator);
  /external/webkit/Source/WebCore/inspector/front-end/
CookiesTable.js 165 var comparator; variable
167 case 0: comparator = localeCompare.bind(this, "name"); break;
168 case 1: comparator = localeCompare.bind(this, "value"); break;
169 case 2: comparator = localeCompare.bind(this, "domain"); break;
170 case 3: comparator = localeCompare.bind(this, "path"); break;
171 case 4: comparator = expiresCompare; break;
172 case 5: comparator = numberCompare.bind(this, "size"); break;
173 case 6: comparator = localeCompare.bind(this, "httpOnly"); break;
174 case 7: comparator = localeCompare.bind(this, "secure"); break;
178 cookies.sort(comparator);
    [all...]
  /external/webkit/Source/WebCore/platform/leveldb/
LevelDBDatabase.cpp 34 #include <leveldb/comparator.h>
67 class ComparatorAdapter : public leveldb::Comparator {
69 ComparatorAdapter(const LevelDBComparator* comparator)
70 : m_comparator(comparator)
99 LevelDBDatabase* LevelDBDatabase::open(const String& fileName, const LevelDBComparator* comparator)
101 OwnPtr<ComparatorAdapter> comparatorAdapter(new ComparatorAdapter(comparator));
106 options.comparator = comparatorAdapter.get();
  /external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/serialization/
KeyPairTest.java 59 SerializationTest.verifyGolden(this, keyPair, comparator);
67 SerializationTest.verifySelf(keyPair, comparator);
71 // comparator for KeyPair objects
72 private static SerializableAssert comparator = new SerializableAssert(){ field in class:KeyPairTest
  /libcore/luni/src/main/java/libcore/util/
CollectionUtils.java 22 import java.util.Comparator;
83 * not use {@link Object#equals}: only the comparator defines equality.
85 public static <T> void removeDuplicates(List<T> list, Comparator<? super T> comparator) {
86 Collections.sort(list, comparator);
89 if (comparator.compare(list.get(j - 1), list.get(i)) != 0) {

Completed in 255 milliseconds

1 2 3 4 5 6