/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/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/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ |
ImmutableSortedSet.java | 25 import java.util.Comparator; 51 private static final Comparator NATURAL_ORDER = Ordering.natural(); 63 Comparator<? super E> comparator) { 64 checkNotNull(comparator); 65 if (NATURAL_ORDER.equals(comparator)) { 68 return new EmptyImmutableSortedSet<E>(comparator); 124 Comparator<? super E> comparator, E... elements) { 128 return emptySet(comparator); 179 Comparator<? super E> comparator = sortedSet.comparator(); local 258 public Comparator<? super E> comparator() { method in class:ImmutableSortedSet 383 private final Comparator<? super E> comparator; field in class:ImmutableSortedSet.Builder [all...] |
ImmutableSortedMap.java | 25 import java.util.Comparator; 46 private static final Comparator NATURAL_ORDER = Ordering.natural(); 54 private Comparator<K> unusedComparatorForSerialization; 60 // The comparator used by this map. It's the same as that of sortedDelegate, 61 // except that when sortedDelegate's comparator is null, it points to a 63 private transient final Comparator<K> comparator; field in class:ImmutableSortedMap 65 // If map has a null comparator, the keys should have a natural ordering, 70 this.comparator = (delegate.comparator() == null 136 Comparator<? super K> comparator = local 195 private final Comparator<? super K> comparator; field in class:ImmutableSortedMap.Builder 244 public Comparator<? super K> comparator() { method in class:ImmutableSortedMap [all...] |
EmptyImmutableSortedSet.java | 19 import java.util.Comparator; 27 EmptyImmutableSortedSet(Comparator<? super E> comparator) { 28 super(comparator);
|
/external/guava/guava/src/com/google/common/collect/ |
SortedIterables.java | 26 import java.util.Comparator; 43 * to {@code comparator}. 45 public static boolean hasSameComparator(Comparator<?> comparator, Iterable<?> elements) { 46 checkNotNull(comparator); 48 Comparator<?> comparator2; 51 comparator2 = sortedSet.comparator(); 53 comparator2 = (Comparator) Ordering.natural(); 56 comparator2 = ((SortedIterable<?>) elements).comparator(); 60 return comparator.equals(comparator2) [all...] |
ComparatorOrdering.java | 25 import java.util.Comparator; 30 /** An ordering for a pre-existing comparator. */ 33 final Comparator<T> comparator; field in class:ComparatorOrdering 35 ComparatorOrdering(Comparator<T> comparator) { 36 this.comparator = checkNotNull(comparator); 40 return comparator.compare(a, b); 45 return Collections.binarySearch(sortedList, key, comparator); [all...] |
GeneralRange.java | 23 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...] |
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...] |
SortedIterable.java | 19 import java.util.Comparator; 23 * An {@code Iterable} whose elements are sorted relative to a {@code Comparator}, typically 31 * Returns the {@code Comparator} by which the elements of this iterable are ordered, or {@code 34 Comparator<? super T> comparator(); method in interface:SortedIterable 38 * nondecreasing order according to the associated {@link #comparator}.
|
ImmutableSortedSet.java | 31 import java.util.Comparator; 40 * Some instances are ordered by an explicit comparator, while others follow the 61 * two elements are equivalent. Instead, with an explicit comparator, the 65 * {(x, y) | comparator.compare(x, y) == 0}}</pre> 92 private static final Comparator<Comparable> NATURAL_ORDER = 104 Comparator<? super E> comparator) { 105 if (NATURAL_ORDER.equals(comparator)) { 108 return new EmptyImmutableSortedSet<E>(comparator); 217 * copy of a {@code SortedSet} that preserves the comparator, call {@lin 383 Comparator<? super E> comparator = sortedSet.comparator(); local 477 private final Comparator<? super E> comparator; field in class:ImmutableSortedSet.Builder 564 final transient Comparator<? super E> comparator; field in class:ImmutableSortedSet 578 public Comparator<? super E> comparator() { method in class:ImmutableSortedSet 674 final Comparator<? super E> comparator; field in class:ImmutableSortedSet.SerializedForm [all...] |
ImmutableSortedMap.java | 33 import java.util.Comparator; 71 private static final Comparator<Comparable> NATURAL_ORDER = 83 // unsafe, comparator() returns a comparator on the specified type 84 // TODO(kevinb): evaluate whether or not of().comparator() should return null 91 Comparator<? super K> comparator) { 92 if (NATURAL_ORDER.equals(comparator)) { 96 ImmutableList.<Entry<K, V>>of(), comparator); 189 * keys sorted by the provided comparator 217 Comparator<? super K> comparator = map.comparator(); local 352 private final Comparator<? super K> comparator; field in class:ImmutableSortedMap.Builder 414 private final transient Comparator<? super K> comparator; field in class:ImmutableSortedMap [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));
|
/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/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/ |
org.eclipse.equinox.p2.repository.tools_2.0.1.R36x_v20100823.jar | |
/external/chromium_org/third_party/leveldatabase/src/include/leveldb/ |
comparator.h | 14 // A Comparator object provides a total order across slices that are 15 // used as keys in an sstable or a database. A Comparator implementation 18 class Comparator { 20 virtual ~Comparator(); 28 // The name of the comparator. Used to check for comparator 29 // mismatches (i.e., a DB created with one comparator is 30 // accessed using a different comparator. 33 // the comparator implementation changes in a way that will cause 44 // Simple comparator implementations may return with *start unchanged [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);
|
/external/chromium_org/third_party/leveldatabase/src/db/ |
skiplist.h | 37 template<typename Key, class Comparator> 46 explicit SkipList(Comparator cmp, Arena* arena); 98 Comparator const compare_; 143 template<typename Key, class Comparator> 144 struct SkipList<Key,Comparator>::Node { 179 template<typename Key, class Comparator> 180 typename SkipList<Key,Comparator>::Node* 181 SkipList<Key,Comparator>::NewNode(const Key& key, int height) { 187 template<typename Key, class Comparator> 188 inline SkipList<Key,Comparator>::Iterator::Iterator(const SkipList* list) [all...] |
/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/guava/guava-gwt/src/com/google/common/collect/ |
ImmutableSortedMap_CustomFieldSerializer.java | 24 import java.util.Comparator; 45 Comparator<Object> comparator = (Comparator<Object>) reader.readObject(); local 47 SortedMap<Object, Object> entries = new TreeMap<Object, Object>(comparator); 50 return ImmutableSortedMap.orderedBy(comparator).putAll(entries).build(); 55 writer.writeObject(instance.comparator());
|
TreeBasedTable_CustomFieldSerializer.java | 23 import java.util.Comparator; 40 @SuppressWarnings("unchecked") // The comparator isn't used statically. 41 Comparator<Object> rowComparator 42 = (Comparator<Object>) reader.readObject(); 43 @SuppressWarnings("unchecked") // The comparator isn't used statically. 44 Comparator<Object> columnComparator 45 = (Comparator<Object>) reader.readObject(); 62 * column, value, the row comparator and column comparator are all
|
/external/smali/util/src/main/java/org/jf/util/ |
CollectionUtils.java | 75 public static <T> int compareAsIterable(@Nonnull Comparator<? super T> comparator, 86 int res = comparator.compare(element1, element2); 114 public static <T> int compareAsList(@Nonnull Comparator<? super T> elementComparator, 128 public static <T> Comparator<Collection<? extends T>> listComparator( 129 @Nonnull final Comparator<? super T> elementComparator) { 130 return new Comparator<Collection<? extends T>>() { 141 Comparator<?> comparator = sortedSet.comparator(); [all...] |