Searched refs:sort (Results 1 - 25 of 67) sorted by relevance

123

/libcore/benchmarks/src/benchmarks/regression/
H A DCollectionsBenchmark.java44 Collections.sort(input);
51 Collections.sort(input, REVERSE);
58 Collections.sort(input);
65 Collections.sort(input, REVERSE);
/libcore/metrictests/memory/apps/src/libcore/heapdumper/
H A DActions.java39 * Uses a collator for the root locale to trivially sort some strings.
49 * Uses a collator for the US English locale to trivially sort some strings.
59 * Uses a collator for the Korean locale to trivially sort some strings.
73 Arrays.sort(strings, collator);
/libcore/luni/src/test/java/libcore/java/util/
H A DTimSortTest.java48 Arrays.sort(array);
55 Arrays.sort(array, NATURAL_ORDER_COMPARATOR);
H A DListDefaultMethodTester.java45 l.sort((v1, v2) -> v1.compareTo(v2));
H A DOldTreeSetTest.java142 SortedSet sort = ts.headSet(new Integer(100));
144 sort.headSet(new Integer(101));
228 SortedSet sort = ts.tailSet(new Integer(101));
231 sort.tailSet(new Integer(100));
H A DSpliteratorTester.java76 Collections.sort(expectedElements, comparator);
77 Collections.sort(recorder, comparator);
154 Collections.sort(expectedElements, comparator);
155 Collections.sort(recorder, comparator);
314 Collections.sort(sortedElements, comparator);
321 Collections.sort(sortedElements, comparator);
H A DOldTreeMapTest.java218 SortedMap sort = tm.headMap("100");
220 sort.headMap("50");
462 SortedMap sort = tm.tailMap("99");
465 sort.tailMap("101");
/libcore/harmony-tests/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/
H A DRetentionPolicyTest.java57 Arrays.sort(values);
H A DElementTypeTest.java62 Arrays.sort(values);
/libcore/ojluni/src/main/java/java/util/
H A DList.java417 // Android-changed: Warn about Collections.sort() being built on top
418 // of List.sort() rather than the other way round when targeting an
436 * Nougat (API level {@code > 25}), {@link Collections#sort(List)}
438 * {@link Collections#sort(List)} from this method. Instead, prefer
443 * public void sort(Comparator<? super E> c) {
445 * Arrays.sort(elements, c);
459 * to sort a linked list in place.)
475 * simply concatenate the arrays and sort the resulting array.
477 * <p>The implementation was adapted from Tim Peters's list sort for Python
498 default void sort(Comparato method in interface:List
[all...]
H A DDualPivotQuicksort.java59 * The maximum number of runs in merge sort.
64 * The maximum length of run in merge sort.
70 * constant, Quicksort is used in preference to merge sort.
76 * constant, insertion sort is used in preference to Quicksort.
82 * constant, counting sort is used in preference to insertion sort.
88 * than this constant, counting sort is used in preference to Quicksort.
107 static void sort(int[] a, int left, int right, method in class:DualPivotQuicksort
111 sort(a, left, right, true);
134 sort(
214 private static void sort(int[] a, int left, int right, boolean leftmost) { method in class:DualPivotQuicksort
555 static void sort(long[] a, int left, int right, method in class:DualPivotQuicksort
662 private static void sort(long[] a, int left, int right, boolean leftmost) { method in class:DualPivotQuicksort
1003 static void sort(short[] a, int left, int right, method in class:DualPivotQuicksort
1146 private static void sort(short[] a, int left, int right, boolean leftmost) { method in class:DualPivotQuicksort
1487 static void sort(char[] a, int left, int right, method in class:DualPivotQuicksort
1630 private static void sort(char[] a, int left, int right, boolean leftmost) { method in class:DualPivotQuicksort
1970 static void sort(byte[] a, int left, int right) { method in class:DualPivotQuicksort
2012 static void sort(float[] a, int left, int right, method in class:DualPivotQuicksort
2210 private static void sort(float[] a, int left, int right, boolean leftmost) { method in class:DualPivotQuicksort
2551 static void sort(double[] a, int left, int right, method in class:DualPivotQuicksort
2749 private static void sort(double[] a, int left, int right, boolean leftmost) { method in class:DualPivotQuicksort
[all...]
H A DArrays.java60 * example, the algorithm used by {@code sort(Object[])} does not have to be
142 * Sorting methods. Note that all public "sort" methods take the
160 public static void sort(int[] a) { method in class:Arrays
161 DualPivotQuicksort.sort(a, 0, a.length - 1, null, 0, 0);
184 public static void sort(int[] a, int fromIndex, int toIndex) { method in class:Arrays
186 DualPivotQuicksort.sort(a, fromIndex, toIndex - 1, null, 0, 0);
200 public static void sort(long[] a) { method in class:Arrays
201 DualPivotQuicksort.sort(a, 0, a.length - 1, null, 0, 0);
224 public static void sort(long[] a, int fromIndex, int toIndex) { method in class:Arrays
226 DualPivotQuicksort.sort(
240 public static void sort(short[] a) { method in class:Arrays
264 public static void sort(short[] a, int fromIndex, int toIndex) { method in class:Arrays
280 public static void sort(char[] a) { method in class:Arrays
304 public static void sort(char[] a, int fromIndex, int toIndex) { method in class:Arrays
320 public static void sort(byte[] a) { method in class:Arrays
344 public static void sort(byte[] a, int fromIndex, int toIndex) { method in class:Arrays
368 public static void sort(float[] a) { method in class:Arrays
400 public static void sort(float[] a, int fromIndex, int toIndex) { method in class:Arrays
424 public static void sort(double[] a) { method in class:Arrays
456 public static void sort(double[] a, int fromIndex, int toIndex) { method in class:Arrays
1246 public static void sort(Object[] a) { method in class:Arrays
1306 public static void sort(Object[] a, int fromIndex, int toIndex) { method in class:Arrays
1424 public static <T> void sort(T[] a, Comparator<? super T> c) { method in class:Arrays
1488 public static <T> void sort(T[] a, int fromIndex, int toIndex, method in class:Arrays
3822 public void sort(Comparator<? super E> c) { method in class:Arrays.ArrayList
[all...]
/libcore/
H A Drun-libcore-tests13 xargs grep -h '^package ' | sed 's/^package //' | sed 's/;$//' | sort | uniq | tr "\n" " ")
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DArrays2Test.java118 * java.util.Arrays#sort(double[])
121 // Test a basic sort
126 Arrays.sort(reversedArray);
132 // These have to sort as per the Double compare ordering
137 Arrays.sort(specials1);
142 assertTrue("Assert 1: specials sort incorrectly" + Arrays.asList(print1),
145 Arrays.sort(specials2);
150 assertTrue("Assert 2: specials sort incorrectly " + Arrays.asList(print2),
155 * java.util.Arrays#sort(float[])
158 // Test a basic sort
[all...]
H A DArraysTest.java1024 * java.util.Arrays#sort(byte[])
1027 // Test for method void java.util.Arrays.sort(byte [])
1031 Arrays.sort(reversedArray);
1038 * java.util.Arrays#sort(byte[], int, int)
1041 // Test for method void java.util.Arrays.sort(byte [], int, int)
1050 Arrays.sort(reversedArray, startIndex, endIndex);
1063 Arrays.sort(reversedArray, startIndex + 1, startIndex);
1069 Arrays.sort(reversedArray, -1, startIndex);
1075 Arrays.sort(reversedArray, startIndex, reversedArray.length + 1);
1082 * java.util.Arrays#sort(cha
1894 private void sort(Object array) { method in class:ArraysTest
[all...]
H A DPriorityQueueTest.java57 Arrays.sort(array);
58 Arrays.sort(resultArray);
135 Arrays.sort(newArray);
276 Arrays.sort(array);
365 Arrays.sort(array);
475 Arrays.sort(array);
501 Arrays.sort(array);
538 Arrays.sort(array);
591 Arrays.sort(newArray);
681 Arrays.sort(arra
[all...]
H A DCollections2Test.java62 Collections.sort(lst, null);
292 Arrays.sort(numbers, roc);
293 assertTrue("Assert 2: the arrays are not equal, the sort failed",
310 Arrays.sort(numbers, roc);
311 assertTrue("Assert 2: the arrays are not equal, the sort failed",
321 Arrays.sort(numbers, roc);
322 assertTrue("Assert 5: the arrays are not equal, the sort failed",
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
H A DDoublePrimitiveOpsTests.java62 Arrays.sort(sortedContent);
80 Arrays.sort(sortedContent);
H A DIntPrimitiveOpsTests.java105 Arrays.sort(sortedContent);
123 Arrays.sort(sortedContent);
H A DLongPrimitiveOpsTests.java105 Arrays.sort(sortedContent);
123 Arrays.sort(sortedContent);
/libcore/ojluni/src/main/java/java/util/stream/
H A DSortedOps.java114 // Will throw CCE when we try to sort if T is not Comparable
156 // @@@ Weak two-pass parallel implementation; parallel collect, parallel sort
282 * Abstract {@link Sink} for implementing sort on reference streams.
328 * {@link Sink} for implementing sort on SIZED reference streams.
348 Arrays.sort(array, 0, offset, comparator);
369 * {@link Sink} for implementing sort on reference streams.
387 list.sort(comparator);
409 * Abstract {@link Sink} for implementing sort on int streams.
426 * {@link Sink} for implementing sort on SIZED int streams.
445 Arrays.sort(arra
[all...]
/libcore/luni/src/main/java/libcore/util/
H A DCollectionUtils.java86 Collections.sort(list, comparator);
/libcore/tools/docs/crypto/
H A Dformat_supported_algorithm_table.py83 # collapse all our ciphers into "equivalence classes" of a sort.
102 tuples.sort(key=operator.itemgetter(0, 1, 3, 4))
115 tuples.sort(key=operator.itemgetter(0, 2, 3, 4))
142 tuples.sort(key=operator.itemgetter(0, 4, 1, 2, 3))
/libcore/luni/src/test/java/libcore/java/lang/reflect/annotations/
H A DAnnotatedElementTestSupport.java265 // discovered before "Repeated" due to their sort ordering.
268 // source their natural sort order when attributes are considered, just to make the testing
276 Arrays.sort(expectedAnnotationStrings);
279 Arrays.sort(actualAnnotationStrings);
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
H A DTestChronoLocalDate.java103 Collections.sort(copy, ChronoLocalDate.timeLineOrder());
127 Collections.sort(copy, ChronoLocalDate.timeLineOrder());

Completed in 2029 milliseconds

123