/libcore/luni/src/main/java/java/util/ |
TreeSet.java | 29 * Comparator. 73 * specified comparator. 75 * @param comparator 76 * the comparator to use. 78 public TreeSet(Comparator<? super E> comparator) { 79 backingMap = new TreeMap<E, Object>(comparator); 84 * the specified SortedSet and using the same Comparator. 90 this(set.comparator()); 108 * when the object is null and the comparator cannot handl 175 public Comparator<? super E> comparator() { method in class:TreeSet [all...] |
TreeMap.java | 33 * <p>This map sorts keys using either a user-supplied comparator or the key's 37 * this map. If a user-supplied comparator is in use, it will be returned 38 * by {@link #comparator}. 39 * <li>If no user-supplied comparator is supplied, keys will be sorted by 43 * this map. In this case {@link #comparator} will return null. 45 * With either a comparator or a natural ordering, comparisons should be 70 private static final Comparator<Comparable> NATURAL_ORDER = new Comparator<Comparable>() { 76 Comparator<? super K> comparator; field in class:TreeMap 671 public Comparator<? super K> comparator() { method in class:TreeMap [all...] |
/external/guava/src/com/google/common/collect/ |
CompoundOrdering.java | 22 import java.util.Comparator; 28 final ImmutableList<Comparator<? super T>> comparators; 30 CompoundOrdering(Comparator<? super T> primary, 31 Comparator<? super T> secondary) { 33 = ImmutableList.<Comparator<? super T>>of(primary, secondary); 36 CompoundOrdering(Iterable<? extends Comparator<? super T>> comparators) { 40 CompoundOrdering(List<? extends Comparator<? super T>> comparators, 41 Comparator<? super T> lastComparator) { 42 this.comparators = new ImmutableList.Builder<Comparator<? super T>>() 47 for (Comparator<? super T> comparator : comparators) [all...] |
EmptyImmutableSortedSet.java | 22 import java.util.Comparator; 36 EmptyImmutableSortedSet(Comparator<? super E> comparator) { 37 super(comparator);
|
RegularImmutableSortedSet.java | 22 import java.util.Comparator; 53 Comparator<? super E> comparator) { 54 super(comparator); 61 Comparator<? super E> comparator, int fromIndex, int toIndex) { 62 super(comparator); 97 if (!hasSameComparator(targets, comparator()) || (targets.size() <= 1)) { 102 * If targets is a sorted set with the same comparator, containsAll can 180 if (hasSameComparator(that, comparator)) { [all...] |
ImmutableSortedAsList.java | 59 array(), set.comparator(),
|
Ordering.java | 25 import java.util.Comparator; 36 * A comparator with added methods to support common functions. For example: 39 * if (Ordering.from(comparator).reverse().isOrdered(list)) { ... }}</pre> 41 * <p>The {@link #from(Comparator)} method returns the equivalent {@code 42 * Ordering} instance for a pre-existing comparator. You can also skip the 43 * comparator step and extend {@code Ordering} directly: <pre> {@code 61 public abstract class Ordering<T> implements Comparator<T> { 80 * Returns an ordering for a pre-existing {@code comparator}. Note 81 * that if the comparator is not pre-existing, and you don't require 85 * @param comparator the comparator that defines the orde [all...] |
/libcore/luni/src/main/java/java/util/concurrent/ |
ConcurrentSkipListSet.java | 15 * or by a {@link Comparator} provided at set creation time, depending 77 * the specified comparator. 79 * @param comparator the comparator that will be used to order this set. 83 public ConcurrentSkipListSet(Comparator<? super E> comparator) { 84 m = new ConcurrentSkipListMap<E,Object>(comparator); 112 m = new ConcurrentSkipListMap<E,Object>(s.comparator()); 348 public Comparator<? super E> comparator() { method in class:ConcurrentSkipListSet [all...] |
PriorityBlockingQueue.java | 104 * priority queue is ordered by comparator, or by the elements' 105 * natural ordering, if comparator is null: For each node n in the 117 * The comparator, or null if priority queue uses elements' 120 private transient Comparator<? super E> comparator; field in class:PriorityBlockingQueue 169 * comparator. 172 * @param comparator the comparator that will be used to order this 179 Comparator<? super E> comparator) { 549 public Comparator<? super E> comparator() { method in class:PriorityBlockingQueue [all...] |
/external/webkit/Source/WebCore/inspector/front-end/ |
ProfileDataGridTree.js | 121 sort: function(/*Function*/ comparator, /*Boolean*/ force) 134 if (!force && (!gridNode.expanded || gridNode.lastComparator === comparator)) { 140 gridNode.lastComparator = comparator; 146 children.sort(comparator); 368 var comparator = this.propertyComparators[(isAscending ? 1 : 0)][property]; 370 if (!comparator) { 372 comparator = function(lhs, rhs) 383 comparator = function(lhs, rhs) 395 this.propertyComparators[(isAscending ? 1 : 0)][property] = comparator; 398 return comparator; 371 comparator = function(lhs, rhs) function [all...] |
ApplicationCacheItemsView.js | 209 var comparator; variable 211 case 0: comparator = localeCompare.bind(this, "name"); break; 212 case 1: comparator = localeCompare.bind(this, "type"); break; 213 case 2: comparator = numberCompare.bind(this, "size"); break; 214 default: localeCompare.bind(this, "resource"); // FIXME: comparator = ? 217 this._resources.sort(comparator);
|
/libcore/support/src/test/java/org/apache/harmony/testframework/serialization/ |
SerializationTest.java | 186 // default comparator for a class that has equals(Object) method 194 * Comparator for verifying that deserialized object is the same as initial. 203 * Comparator for Throwable objects 228 * Comparator for PermissionCollection objects 253 * Returns <code>comparator</code> for provided serializable 256 * The <code>comparator</code> is searched in the following order: <br> 258 * selected as </code>comparator</code>.<br>- if passed <code>object</code> 268 * @return object's comparator 280 // use default comparator 284 // TODO use generics to detect comparator [all...] |
/cts/tools/cts-api-coverage/src/com/android/cts/apicoverage/ |
XmlReport.java | 54 CoverageComparator comparator = new CoverageComparator(); local 56 Collections.sort(packages, comparator); 68 Collections.sort(classes, comparator);
|
TextReport.java | 33 CoverageComparator comparator = new CoverageComparator(); local 35 Collections.sort(packages, comparator); 52 Collections.sort(classes, comparator);
|
/cts/tools/signature-tools/test/signature/comparator/ |
AllDexTests.java | 17 package signature.comparator;
|
PackageCompareTest.java | 17 package signature.comparator; 25 import signature.comparator.util.AbstractComparatorTest;
|
/external/emma/core/java12/com/vladium/jcd/cls/ |
IConstantCollection.java | 104 * semantics expressed by 'comparator'. This method guarantees that 105 * when comparator.equals(c) is called c.type() is 'type'. The cost is 110 * @param comparator [may not be null] 113 * @throws IllegalArgumentException if 'comparator' is null 115 int find (int type, IConstantComparator comparator);
|
/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/ |
RefSortedMap.java | 28 import java.util.Comparator; 88 private final Comparator<? super K> comparator; field in class:RefSortedMap 166 public Comparator<? super K> comparator() { 167 return RefSortedMap.this.comparator(); 241 this((Comparator<? super K>) null); 246 return comparator != null ? comparator.compare(start, end) 251 public RefSortedMap(Comparator<? super K> comparator) [all...] |
PriorityQueueTest.java | 22 import java.util.Comparator; 143 // Try removing an entry that the comparator says is equal 197 assertNull(queue.comparator()); 207 assertNull(queue.comparator()); 211 * @tests java.util.PriorityQueue#PriorityQueue(int, Comparator<? super E>) 215 (Comparator<Object>) null); 218 assertNull(queue.comparator()); 220 MockComparator<Object> comparator = new MockComparator<Object>(); local 221 queue = new PriorityQueue<Object>(100, comparator); 224 assertEquals(comparator, queue.comparator()) 646 MockComparator<Object> comparator = new MockComparator<Object>(); local 665 MockComparator<Object> comparator = new MockComparator<Object>(); local [all...] |
/external/apache-harmony/support/src/test/java/org/apache/harmony/testframework/serialization/ |
SerializationTest.java | 233 // default comparator for a class that has equals(Object) method 243 * Comparator for verifying that deserialized object is the same as initial. 254 * Comparator for java.lang.Throwable objects 281 * Comparator for java.security.PermissionCollection objects 359 * Comparator for java.security.UnresolvedPermission objects 383 * Returns <code>comparator</code> for provided serializable 386 * The <code>comparator</code> is searched in the following order: <br>- 388 * selected as </code>comparator</code>.<br>- if passed <code>object</code> 400 * @return object's comparator 419 // use default comparator [all...] |
/external/apache-harmony/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/ |
PropertyChangeEventTest.java | 144 // comparator for PropertyChangeEvent objects 145 public static final SerializableAssert comparator = new SerializableAssert() { field in class:PropertyChangeEventTest 167 "myPropName", "oldValue", "newValue"), comparator); 177 "myPropName", "oldValue", "newValue"), comparator);
|
/external/apache-xml/src/main/java/org/apache/xpath/objects/ |
XNodeSet.java | 443 /** Less than comparator */ 446 /** Less than or equal comparator */ 449 /** Greater than comparator */ 452 /** Greater than or equal comparator */ 456 /** Equal comparator */ 459 /** Not equal comparator */ 466 * @param comparator Comparator to use 472 public boolean compare(XObject obj2, Comparator comparator) [all...] |
/frameworks/base/test-runner/src/android/test/suitebuilder/ |
TestGrouping.java | 33 import java.util.Comparator; 53 public static final Comparator<Class<? extends TestCase>> SORT_BY_SIMPLE_NAME 56 public static final Comparator<Class<? extends TestCase>> SORT_BY_FULLY_QUALIFIED_NAME 62 public TestGrouping(Comparator<Class<? extends TestCase>> comparator) { 63 testCaseClasses = new TreeSet<Class<? extends TestCase>>(comparator); 100 return this.testCaseClasses.comparator().equals(other.testCaseClasses.comparator()); 188 implements Comparator<Class<? extends TestCase>>, Serializable { 205 implements Comparator<Class<? extends TestCase>>, Serializable [all...] |
/packages/apps/Email/emailcommon/src/org/apache/commons/io/comparator/ |
ExtensionFileComparator.java | 17 package org.apache.commons.io.comparator;
21 import java.util.Comparator;
30 * This comparator can be used to sort lists or arrays of files
54 public class ExtensionFileComparator implements Comparator<File>, Serializable {
56 /** Case-sensitive extension comparator instance (see {@link IOCase#SENSITIVE}) */
57 public static final Comparator<File> EXTENSION_COMPARATOR = new ExtensionFileComparator();
59 /** Reverse case-sensitive extension comparator instance (see {@link IOCase#SENSITIVE}) */
60 public static final Comparator<File> EXTENSION_REVERSE = new ReverseComparator<File>(EXTENSION_COMPARATOR);
62 /** Case-insensitive extension comparator instance (see {@link IOCase#INSENSITIVE}) */
63 public static final Comparator<File> EXTENSION_INSENSITIVE_COMPARATOR = new ExtensionFileComparator(IOCase.INSENSITIVE); [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...] |