/external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ |
D | ImmutableSortedSet.java | 66 Comparator<? super E> comparator) { in emptySet() argument 67 checkNotNull(comparator); in emptySet() 68 if (NATURAL_ORDER.equals(comparator)) { in emptySet() 71 return new EmptyImmutableSortedSet<E>(comparator); in emptySet() 120 Comparator<? super E> comparator, E... elements) { in ofInternal() argument 124 return emptySet(comparator); in ofInternal() 126 SortedSet<E> delegate = new TreeSet<E>(comparator); in ofInternal() 153 Comparator<? super E> comparator, Iterable<? extends E> elements) { in copyOf() argument 154 checkNotNull(comparator); in copyOf() 155 return copyOfInternal(comparator, elements, false); in copyOf() [all …]
|
D | ImmutableSortedMap.java | 57 private final transient Comparator<? super K> comparator; field in ImmutableSortedMap 59 ImmutableSortedMap(SortedMap<K, V> delegate, Comparator<? super K> comparator) { in ImmutableSortedMap() argument 61 this.comparator = comparator; in ImmutableSortedMap() 66 Comparator<? super K> comparator, in create() argument 68 checkNotNull(comparator); in create() 69 SortedMap<K, V> delegate = newModifiableDelegate(comparator); in create() 73 return newView(unmodifiableSortedMap(delegate), comparator); in create() 117 Map<? extends K, ? extends V> map, Comparator<? super K> comparator) { in copyOf() argument 118 return copyOfInternal(map, checkNotNull(comparator)); in copyOf() 126 Comparator<? super K> comparator = in copyOfSorted() local [all …]
|
D | TreeMultiset.java | 86 public static <E> TreeMultiset<E> create(@Nullable Comparator<? super E> comparator) { in create() argument 87 return (comparator == null) in create() 89 : new TreeMultiset<E>(comparator); in create() 112 super(range.comparator()); in TreeMultiset() 118 TreeMultiset(Comparator<? super E> comparator) { in TreeMultiset() argument 119 super(comparator); in TreeMultiset() 120 this.range = GeneralRange.all(comparator); in TreeMultiset() 173 int cmp = comparator().compare(range.getLowerEndpoint(), node.elem); in aggregateBelowRange() 195 int cmp = comparator().compare(range.getUpperEndpoint(), node.elem); in aggregateAboveRange() 232 return root.count(comparator(), e); in count() [all …]
|
D | EmptyImmutableSortedMap.java | 28 private EmptyImmutableSortedMap(Comparator<? super K> comparator) { in EmptyImmutableSortedMap() argument 29 super(new TreeMap<K, V>(comparator), comparator); in EmptyImmutableSortedMap() 36 static <K, V> ImmutableSortedMap<K, V> forComparator(Comparator<? super K> comparator) { in forComparator() argument 37 if (comparator == NATURAL_ORDER) { in forComparator() 40 return new EmptyImmutableSortedMap<K, V>(comparator); in forComparator()
|
/external/guava/guava/src/com/google/common/collect/ |
D | ImmutableSortedSet.java | 108 Comparator<? super E> comparator) { in emptySet() argument 109 if (NATURAL_ORDER.equals(comparator)) { in emptySet() 112 return new EmptyImmutableSortedSet<E>(comparator); in emptySet() 324 Comparator<? super E> comparator, Iterator<? extends E> elements) { in copyOf() argument 325 return new Builder<E>(comparator).addAll(elements).build(); in copyOf() 342 Comparator<? super E> comparator, Iterable<? extends E> elements) { in copyOf() argument 343 checkNotNull(comparator); in copyOf() 345 SortedIterables.hasSameComparator(comparator, elements); in copyOf() 356 return construct(comparator, array.length, array); in copyOf() 378 Comparator<? super E> comparator, Collection<? extends E> elements) { in copyOf() argument [all …]
|
D | GeneralRange.java | 59 static <T> GeneralRange<T> all(Comparator<? super T> comparator) { in all() argument 60 return new GeneralRange<T>(comparator, false, null, OPEN, false, null, OPEN); in all() 67 static <T> GeneralRange<T> downTo(Comparator<? super T> comparator, @Nullable T endpoint, in downTo() argument 69 return new GeneralRange<T>(comparator, true, endpoint, boundType, false, null, OPEN); in downTo() 76 static <T> GeneralRange<T> upTo(Comparator<? super T> comparator, @Nullable T endpoint, in upTo() argument 78 return new GeneralRange<T>(comparator, false, null, OPEN, true, endpoint, boundType); in upTo() 85 static <T> GeneralRange<T> range(Comparator<? super T> comparator, @Nullable T lower, in range() argument 87 return new GeneralRange<T>(comparator, true, lower, lowerType, true, upper, upperType); in range() 90 private final Comparator<? super T> comparator; field in GeneralRange 100 private GeneralRange(Comparator<? super T> comparator, boolean hasLowerBound, in GeneralRange() argument [all …]
|
D | ImmutableSortedMap.java | 69 static <K, V> ImmutableSortedMap<K, V> emptyMap(Comparator<? super K> comparator) { in emptyMap() argument 70 if (Ordering.natural().equals(comparator)) { in emptyMap() 73 return new EmptyImmutableSortedMap<K, V>(comparator); in emptyMap() 78 Comparator<? super K> comparator, in fromSortedEntries() argument 82 return emptyMap(comparator); in fromSortedEntries() 94 new RegularImmutableSortedSet<K>(keyBuilder.build(), comparator), in fromSortedEntries() 101 return emptyMap(keySet.comparator()); in from() 221 Map<? extends K, ? extends V> map, Comparator<? super K> comparator) { in copyOf() argument 222 return copyOfInternal(map, checkNotNull(comparator)); in copyOf() 238 Comparator<? super K> comparator = map.comparator(); in copyOfSorted() local [all …]
|
D | ImmutableSortedMultiset.java | 237 Comparator<? super E> comparator, Iterator<? extends E> elements) { in copyOf() argument 238 checkNotNull(comparator); in copyOf() 239 return new Builder<E>(comparator).addAll(elements).build(); in copyOf() 253 Comparator<? super E> comparator, Iterable<? extends E> elements) { in copyOf() argument 257 if (comparator.equals(multiset.comparator())) { in copyOf() 259 return copyOfSortedEntries(comparator, multiset.entrySet().asList()); in copyOf() 266 TreeMultiset<E> sortedCopy = TreeMultiset.create(checkNotNull(comparator)); in copyOf() 268 return copyOfSortedEntries(comparator, sortedCopy.entrySet()); in copyOf() 286 return copyOfSortedEntries(sortedMultiset.comparator(), in copyOfSorted() 291 Comparator<? super E> comparator, Collection<Entry<E>> entries) { in copyOfSortedEntries() argument [all …]
|
D | ComparatorOrdering.java | 31 final Comparator<T> comparator; field in ComparatorOrdering 33 ComparatorOrdering(Comparator<T> comparator) { in ComparatorOrdering() argument 34 this.comparator = checkNotNull(comparator); in ComparatorOrdering() 38 return comparator.compare(a, b); in compare() 47 return this.comparator.equals(that.comparator); in equals() 53 return comparator.hashCode(); in hashCode() 57 return comparator.toString(); in toString()
|
D | TreeMultiset.java | 90 public static <E> TreeMultiset<E> create(@Nullable Comparator<? super E> comparator) { in create() argument 91 return (comparator == null) in create() 93 : new TreeMultiset<E>(comparator); in create() 116 super(range.comparator()); in TreeMultiset() 122 TreeMultiset(Comparator<? super E> comparator) { in TreeMultiset() argument 123 super(comparator); in TreeMultiset() 124 this.range = GeneralRange.all(comparator); in TreeMultiset() 177 int cmp = comparator().compare(range.getLowerEndpoint(), node.elem); in aggregateBelowRange() 199 int cmp = comparator().compare(range.getUpperEndpoint(), node.elem); in aggregateAboveRange() 236 return root.count(comparator(), e); in count() [all …]
|
D | SortedLists.java | 56 Comparator<? super E> comparator, E key, List<? extends E> list, int foundIndex) { in resultIndex() argument 66 Comparator<? super E> comparator, E key, List<? extends E> list, int foundIndex) { in resultIndex() argument 74 int c = comparator.compare(list.get(middle), key); in resultIndex() 90 Comparator<? super E> comparator, E key, List<? extends E> list, int foundIndex) { in resultIndex() argument 99 int c = comparator.compare(list.get(middle), key); in resultIndex() 116 Comparator<? super E> comparator, E key, List<? extends E> list, int foundIndex) { in resultIndex() argument 117 return LAST_PRESENT.resultIndex(comparator, key, list, foundIndex) + 1; in resultIndex() 127 Comparator<? super E> comparator, E key, List<? extends E> list, int foundIndex) { in resultIndex() argument 128 return FIRST_PRESENT.resultIndex(comparator, key, list, foundIndex) - 1; in resultIndex() 132 Comparator<? super E> comparator, E key, List<? extends E> list, int foundIndex); in resultIndex() argument [all …]
|
D | SortedIterables.java | 37 public static boolean hasSameComparator(Comparator<?> comparator, Iterable<?> elements) { in hasSameComparator() argument 38 checkNotNull(comparator); in hasSameComparator() 42 comparator2 = comparator((SortedSet<?>) elements); in hasSameComparator() 44 comparator2 = ((SortedIterable<?>) elements).comparator(); in hasSameComparator() 48 return comparator.equals(comparator2); in hasSameComparator() 53 public static <E> Comparator<? super E> comparator(SortedSet<E> sortedSet) { in comparator() method in SortedIterables 54 Comparator<? super E> result = sortedSet.comparator(); in comparator()
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/optimization/direct/ |
D | NelderMead.java | 74 protected void iterateSimplex(final Comparator<RealPointValuePair> comparator) in iterateSimplex() argument 109 if ((comparator.compare(best, reflected) <= 0) && in iterateSimplex() 110 (comparator.compare(reflected, secondBest) < 0)) { in iterateSimplex() 113 replaceWorstPoint(reflected, comparator); in iterateSimplex() 115 } else if (comparator.compare(reflected, best) < 0) { in iterateSimplex() 124 if (comparator.compare(expanded, reflected) < 0) { in iterateSimplex() 126 replaceWorstPoint(expanded, comparator); in iterateSimplex() 129 replaceWorstPoint(reflected, comparator); in iterateSimplex() 134 if (comparator.compare(reflected, worst) < 0) { in iterateSimplex() 143 if (comparator.compare(outContracted, reflected) <= 0) { in iterateSimplex() [all …]
|
D | MultiDirectional.java | 61 protected void iterateSimplex(final Comparator<RealPointValuePair> comparator) in iterateSimplex() argument 74 final RealPointValuePair reflected = evaluateNewSimplex(original, 1.0, comparator); in iterateSimplex() 75 if (comparator.compare(reflected, best) < 0) { in iterateSimplex() 79 final RealPointValuePair expanded = evaluateNewSimplex(original, khi, comparator); in iterateSimplex() 80 if (comparator.compare(reflected, expanded) <= 0) { in iterateSimplex() 90 final RealPointValuePair contracted = evaluateNewSimplex(original, gamma, comparator); in iterateSimplex() 91 if (comparator.compare(contracted, best) < 0) { in iterateSimplex() 120 final Comparator<RealPointValuePair> comparator) in evaluateNewSimplex() argument 139 evaluateSimplex(comparator); in evaluateNewSimplex()
|
/external/replicaisland/src/com/replica/replicaisland/ |
D | QuickSorter.java | 22 public void sort(Type[] array, int count, Comparator<Type> comparator) { in sort() argument 23 quicksort(array, 0, count - 1, comparator); in sort() 45 public void quicksort(Type[] a, int left, int right, Comparator<Type> comparator) { in quicksort() argument 47 int i = partition(a, left, right, comparator); in quicksort() 48 quicksort(a, left, i - 1, comparator); in quicksort() 49 quicksort(a, i + 1, right, comparator); in quicksort() 53 private int partition(Type[] a, int left, int right, Comparator<Type> comparator) { in partition() argument 57 while (comparator.compare(a[++i], a[right]) < 0) { // find item on left to swap in partition() 59 while (comparator.compare(a[right], a[--j]) < 0) { // find item on right to swap in partition()
|
D | ShellSorter.java | 30 public void sort(Type[] array, int count, Comparator<Type> comparator) { in sort() argument 36 insertionSort(array, count, start, increment, comparator); in sort() 44 insertionSort(array, count, 0, 1, comparator ); in sort() 59 Comparator<Type> comparator) { in insertionSort() argument 67 int delta = comparator.compare(array[j], array[k]); in insertionSort() 77 } while ( j != start && comparator.compare(array[k], temp) > 0 ); in insertionSort()
|
D | FixedSizeArray.java | 51 public FixedSizeArray(int size, Comparator<T> comparator) { in FixedSizeArray() argument 56 mComparator = comparator; in FixedSizeArray() 198 final Comparator comparator = mComparator; 201 if (comparator != null) { 202 index = Arrays.binarySearch(contents, object, comparator); 214 if (comparator != null && !ignoreComparator) { 216 final int result = comparator.compare(contents[x], object); 269 public void setComparator(Comparator<T> comparator) { 270 mComparator = comparator;
|
/external/guava/guava-tests/benchmark/com/google/common/collect/ |
D | MinMaxPriorityQueueBenchmark.java | 39 @Param private ComparatorType comparator; field in MinMaxPriorityQueueBenchmark 52 queue = heap.create(comparator.get()); in setUp() 82 public InvertedMinMaxPriorityQueue(Comparator<T> comparator) { in InvertedMinMaxPriorityQueue() argument 83 mmHeap = MinMaxPriorityQueue.orderedBy(comparator).create(); in InvertedMinMaxPriorityQueue() 100 @Override public Queue<Integer> create(Comparator<Integer> comparator) { in create() argument 101 return MinMaxPriorityQueue.orderedBy(comparator).create(); in create() 105 @Override public Queue<Integer> create(Comparator<Integer> comparator) { in create() argument 106 return new PriorityQueue<Integer>(11, comparator); in create() 110 @Override public Queue<Integer> create(Comparator<Integer> comparator) { in create() argument 111 return new InvertedMinMaxPriorityQueue<Integer>(comparator); in create() [all …]
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/ |
D | IterableComparator.java | 13 private final Comparator<T> comparator; field in IterableComparator 20 public IterableComparator(Comparator<T> comparator) { in IterableComparator() argument 21 this(comparator, true); in IterableComparator() 24 public IterableComparator(Comparator<T> comparator, boolean shorterFirst) { in IterableComparator() argument 25 this.comparator = comparator; in IterableComparator() 47 …int result = comparator != null ? comparator.compare(aItem, bItem) : ((Comparable<T>)aItem).compar… in compare()
|
/external/smali/util/src/main/java/org/jf/util/ |
D | CollectionUtils.java | 75 public static <T> int compareAsIterable(@Nonnull Comparator<? super T> comparator, in compareAsIterable() argument 86 int res = comparator.compare(element1, element2); in compareAsIterable() 141 Comparator<?> comparator = sortedSet.comparator(); 142 return (comparator == null) || comparator.equals(Ordering.natural()); 151 Comparator<?> comparator = sortedSet.comparator(); 152 if (comparator == null) { 155 return elementComparator.equals(comparator); 173 Comparator<?> comparator = sortedSet.comparator(); 174 if (comparator != null && comparator.equals(elementComparator)) {
|
D | ArraySortedSet.java | 40 @Nonnull private final Comparator<? super T> comparator; field in ArraySortedSet 43 private ArraySortedSet(@Nonnull Comparator<? super T> comparator, @Nonnull T[] arr) { in ArraySortedSet() argument 45 this.comparator = comparator; in ArraySortedSet() 49 …public static <T> ArraySortedSet<T> of(@Nonnull Comparator<? super T> comparator, @Nonnull T[] arr… in of() argument 50 return new ArraySortedSet<T>(comparator, arr); in of() 66 return Arrays.binarySearch((T[])arr, (T)o, comparator) >= 0; in contains() 131 public Comparator<? super T> comparator() { in comparator() method in ArraySortedSet 132 return comparator; in comparator()
|
/external/easymock/src/org/easymock/internal/matchers/ |
D | Compare.java | 30 private Comparator<? super T> comparator; field in Compare 34 public Compare(T expected, Comparator<? super T> comparator, LogicalOperator result) { in Compare() argument 36 this.comparator = comparator; in Compare() 41 buffer.append(comparator + "(" + expected + ") " + operator.getSymbol() in appendTo() 50 return operator.matchResult(comparator.compare((T) actual, expected)); in matches()
|
/external/jmonkeyengine/engine/src/core/com/jme3/renderer/queue/ |
D | GeometryList.java | 54 private GeometryComparator comparator; field in GeometryList 62 public GeometryList(GeometryComparator comparator) { in GeometryList() argument 66 this.comparator = comparator; in GeometryList() 76 this.comparator.setCamera(cam); in setCamera() 138 SortUtil.msort(geometries2, geometries, 0, size-1, comparator); in sort()
|
/external/guava/guava-testlib/src/com/google/common/collect/testing/ |
D | SafeTreeSet.java | 50 public SafeTreeSet(Comparator<? super E> comparator) { in SafeTreeSet() argument 51 this(new TreeSet<E>(comparator)); in SafeTreeSet() 77 @Override public Comparator<? super E> comparator() { in comparator() method in SafeTreeSet 78 Comparator<? super E> comparator = delegate.comparator(); in comparator() local 79 if (comparator == null) { in comparator() 80 comparator = (Comparator<? super E>) NATURAL_ORDER; in comparator() 82 return comparator; in comparator() 150 comparator().compare(e, e); in checkValid()
|
/external/emma/core/java12/com/vladium/emma/report/ |
D | ItemComparator.java | 45 …final Comparator comparator = IItemAttribute.Factory.getAttribute (attributeID, unitsID).comparato… in create() local 46 …ators [a >> 1] = attributeIDsWithDir [a + 1] < 0 ? new ReverseComparator (comparator) : comparator; in create() 70 ReverseComparator (final Comparator comparator) 72 m_comparator = comparator;
|