/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ |
EmptyImmutableSortedSet.java | 19 import java.util.Comparator; 27 EmptyImmutableSortedSet(Comparator<? super E> comparator) { 28 super(comparator);
|
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...] |
/external/guava/guava/src/com/google/common/collect/ |
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...] |
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...] |
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...] |
ImmutableSortedMultiset.java | 26 import java.util.Comparator; 32 * are ordered by an explicit comparator, while others follow the natural sort ordering of their 50 * are equivalent. Instead, with an explicit comparator, the following relation determines whether 55 * {(x, y) | comparator.compare(x, y) == 0}}</pre> 79 private static final Comparator<Comparable> NATURAL_ORDER = Ordering.natural(); 181 * comparator, call {@link #copyOfSorted} instead. This method iterates over {@code elements} at 228 * Comparator}. 230 * @throws NullPointerException if {@code comparator} or any of {@code elements} is null 233 Comparator<? super E> comparator, Iterator<? extends E> elements) 270 Comparator<? super E> comparator = sortedMultiset.comparator(); local 322 private final transient Comparator<? super E> comparator; field in class:ImmutableSortedMultiset 329 public Comparator<? super E> comparator() { method in class:ImmutableSortedMultiset 467 private final Comparator<? super E> comparator; field in class:ImmutableSortedMultiset.Builder 574 Comparator comparator; field in class:ImmutableSortedMultiset.SerializedForm [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...] |
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...] |
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}.
|
/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/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 );
|
FixedSizeArray.java | 20 import java.util.Comparator; 36 private Comparator<T> mComparator; 51 public FixedSizeArray(int size, Comparator<T> comparator) { 56 mComparator = comparator; 79 * Otherwise, the comparator set on this array (if any) will be used to find the object. 185 * binary search will be performed. If a comparator has been specified with setComparator(), 186 * it will be used to perform the search. If not, the default comparator for the object type 189 * performed. Otherwise, the comparator set on this array (if any) will be used to find the 198 final Comparator comparator = mComparator [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/jmonkeyengine/engine/src/core/com/jme3/renderer/queue/ |
GeometryList.java | 54 private GeometryComparator comparator; field in class:GeometryList 60 * @param comparator The comparator to use. 62 public GeometryList(GeometryComparator comparator) { 66 this.comparator = comparator; 76 this.comparator.setCamera(cam); 128 * Sorts the elements in the list according to their Comparator. 132 // sort the spatial list using the comparator 134 // SortUtil.qsort(geometries, 0, size, comparator); [all...] |
/external/guava/guava-gwt/src/com/google/common/collect/ |
EmptyImmutableSortedSet_CustomFieldSerializer.java | 23 import java.util.Comparator; 43 Comparator<Object> comparator = (Comparator<Object>) reader.readObject(); local 52 ImmutableSortedSet.orderedBy(comparator).build(); 57 writer.writeObject(instance.comparator());
|
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());
|
/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/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...] |
/cts/tests/tests/content/src/android/content/pm/cts/ |
PackageItemInfo_DisplayNameComparatorTest.java | 35 DisplayNameComparator comparator = new DisplayNameComparator(pm); local 44 assertTrue(comparator.compare(pkgItemInfo, cmpInfo) < 0); 45 assertTrue(comparator.compare(pkgItemInfo, pkgItemInfo) == 0); 46 assertTrue(comparator.compare(cmpInfo, pkgItemInfo) > 0);
|
/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
|