Home
last modified time | relevance | path

Searched refs:binarySearch (Results 1 – 23 of 23) sorted by relevance

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DArrays2Test.java44 int result = Arrays.binarySearch(specials, specials[i]); in test_binarySearch$DD()
49 -4, Arrays.binarySearch(specials, -1d)); in test_binarySearch$DD()
51 -8, Arrays.binarySearch(specials, 1d)); in test_binarySearch$DD()
64 int result = Arrays.binarySearch(specials, specials[i]); in test_binarySearch$FF()
69 -4, Arrays.binarySearch(specials, -1f)); in test_binarySearch$FF()
71 -8, Arrays.binarySearch(specials, 1f)); in test_binarySearch$FF()
371 assertEquals(0, Arrays.binarySearch(strings, "a", in test_binarySearch$TTLjava_util_ComparatorsuperT()
373 assertEquals(0, Arrays.binarySearch(strings, "A", in test_binarySearch$TTLjava_util_ComparatorsuperT()
375 assertEquals(1, Arrays.binarySearch(strings, "b", in test_binarySearch$TTLjava_util_ComparatorsuperT()
377 assertEquals(1, Arrays.binarySearch(strings, "B", in test_binarySearch$TTLjava_util_ComparatorsuperT()
[all …]
DArraysTest.java122 Arrays.binarySearch(byteArray, counter) == counter); in test_binarySearch$BB()
124 -1, Arrays.binarySearch(intArray, (byte) -1)); in test_binarySearch$BB()
127 Arrays.binarySearch(intArray, (byte) arraySize) == -(arraySize + 1)); in test_binarySearch$BB()
133 Arrays.binarySearch(byteArray, (byte) (counter - 50)) == counter); in test_binarySearch$BB()
144 Arrays.binarySearch(charArray, (char) (counter + 1)) == counter); in test_binarySearch$CC()
146 -1, Arrays.binarySearch(charArray, '\u0000')); in test_binarySearch$CC()
149 Arrays.binarySearch(charArray, (char) (arraySize + 1)) == -(arraySize + 1)); in test_binarySearch$CC()
160 Arrays.binarySearch(doubleArray, (double) counter) == (double) counter); in test_binarySearch$DD()
162 -1, Arrays.binarySearch(doubleArray, (double) -1)); in test_binarySearch$DD()
165 Arrays.binarySearch(doubleArray, (double) arraySize) == -(arraySize + 1)); in test_binarySearch$DD()
[all …]
DCollections2Test.java63 int index = Collections.binarySearch(lst, new Integer(2), null); in test_binarySearchLjava_util_ListLjava_lang_ObjectLjava_util_Comparator()
75 assertEquals(-1, Collections.binarySearch(localList, new Object())); in test_binarySearchLjava_util_ListLjava_lang_Object()
78 Collections.binarySearch(localList, new Integer(1)); in test_binarySearchLjava_util_ListLjava_lang_Object()
DCollectionsTest.java266 Collections.binarySearch(null, new Object()); in test_binarySearchLjava_util_ListLjava_lang_Object()
273 .get(i), ll.get(Collections.binarySearch(ll, ll in test_binarySearchLjava_util_ListLjava_lang_Object()
288 Collections.binarySearch(null, new Object(), comp); in test_binarySearchLjava_util_ListLjava_lang_ObjectLjava_util_Comparator()
297 .get(Collections.binarySearch(myReversedLinkedList, in test_binarySearchLjava_util_ListLjava_lang_ObjectLjava_util_Comparator()
2030 Object o = Collections.binarySearch(list, 1, new StringComparator()); in test_binarySearch_asymmetry_with_comparator()
2043 Object o = Collections.binarySearch(list, 1); in test_binarySearch_asymmetry()
DRefSortedMap.java369 return Collections.binarySearch(entries, new MapEntry<K, V>((K) arg0, null), cmp);
DFormatterTest.java1109 if (Arrays.binarySearch(chars, i) >= 0 || Character.isDigit(i) in test_formatLjava_lang_String$Ljava_lang_Object_Flag()
/libcore/ojluni/annotations/hiddenapi/java/util/
DArrays.java237 public static int binarySearch(long[] a, long key) { in binarySearch() method in Arrays
241 public static int binarySearch(long[] a, int fromIndex, int toIndex, long key) { in binarySearch() method in Arrays
249 public static int binarySearch(int[] a, int key) { in binarySearch() method in Arrays
253 public static int binarySearch(int[] a, int fromIndex, int toIndex, int key) { in binarySearch() method in Arrays
261 public static int binarySearch(short[] a, short key) { in binarySearch() method in Arrays
265 public static int binarySearch(short[] a, int fromIndex, int toIndex, short key) { in binarySearch() method in Arrays
273 public static int binarySearch(char[] a, char key) { in binarySearch() method in Arrays
277 public static int binarySearch(char[] a, int fromIndex, int toIndex, char key) { in binarySearch() method in Arrays
285 public static int binarySearch(byte[] a, byte key) { in binarySearch() method in Arrays
289 public static int binarySearch(byte[] a, int fromIndex, int toIndex, byte key) { in binarySearch() method in Arrays
[all …]
/libcore/ojluni/annotations/sdk/nullability/java/util/
DArrays.annotated.java134 public static int binarySearch(long @libcore.util.NonNull [] a, long key) { throw new RuntimeExcept… in binarySearch() method in Arrays
136 public static int binarySearch(long @libcore.util.NonNull [] a, int fromIndex, int toIndex, long ke… in binarySearch() method in Arrays
138 public static int binarySearch(int @libcore.util.NonNull [] a, int key) { throw new RuntimeExceptio… in binarySearch() method in Arrays
140 public static int binarySearch(int @libcore.util.NonNull [] a, int fromIndex, int toIndex, int key)… in binarySearch() method in Arrays
142 public static int binarySearch(short @libcore.util.NonNull [] a, short key) { throw new RuntimeExce… in binarySearch() method in Arrays
144 public static int binarySearch(short @libcore.util.NonNull [] a, int fromIndex, int toIndex, short … in binarySearch() method in Arrays
146 public static int binarySearch(char @libcore.util.NonNull [] a, char key) { throw new RuntimeExcept… in binarySearch() method in Arrays
148 public static int binarySearch(char @libcore.util.NonNull [] a, int fromIndex, int toIndex, char ke… in binarySearch() method in Arrays
150 public static int binarySearch(byte @libcore.util.NonNull [] a, byte key) { throw new RuntimeExcept… in binarySearch() method in Arrays
152 public static int binarySearch(byte @libcore.util.NonNull [] a, int fromIndex, int toIndex, byte ke… in binarySearch() method in Arrays
[all …]
DCollections.annotated.java42 public static <T> int binarySearch(@libcore.util.NonNull java.util.List<? extends @libcore.util.Non… in binarySearch() method in Collections
44 public static <T> int binarySearch(@libcore.util.NonNull java.util.List<? extends @libcore.util.Nul… in binarySearch() method in Collections
/libcore/harmony-tests/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/
DRetentionPolicyTest.java58 assertTrue(Arrays.binarySearch(values, RetentionPolicy.RUNTIME) >= 0); in test_values()
DElementTypeTest.java63 assertTrue(Arrays.binarySearch(values, ElementType.METHOD) >= 0); in test_values()
/libcore/luni/src/test/java/tests/java/sql/
DDatabaseMetaDataTest.java358 assertTrue("Invalid table name", Arrays.binarySearch( in test_getColumnsSpecific()
360 assertTrue("Invalid field name", Arrays.binarySearch(fields, rs in test_getColumnsSpecific()
362 assertTrue("Invalid nullable value", Arrays.binarySearch( in test_getColumnsSpecific()
364 assertTrue("Invalid nullable code", Arrays.binarySearch( in test_getColumnsSpecific()
378 assertTrue("Wrong table name", Arrays.binarySearch(tablesName, in test_getColumnsSpecific()
393 assertTrue("Wrong table name", Arrays.binarySearch(tablesName, in test_getColumnsSpecific()
1047 assertTrue("Wrong table type", Arrays.binarySearch(tableTypes, rs in test_getTableTypes()
1083 assertTrue("Wrong table name", Arrays.binarySearch(tablesName, rs in test_getTablesLjava_lang_StringLjava_lang_StringLjava_lang_String$Ljava_lang_String()
1087 assertTrue("Wrong table type", Arrays.binarySearch(tablesType, rs in test_getTablesLjava_lang_StringLjava_lang_StringLjava_lang_String$Ljava_lang_String()
1119 assertTrue("Wrong table name", Arrays.binarySearch(tablesName, rs in test_getTablesLjava_lang_StringLjava_lang_StringLjava_lang_String$Ljava_lang_String()
[all …]
/libcore/ojluni/src/main/java/java/util/
DArrays.java1707 public static int binarySearch(long[] a, long key) { in binarySearch() method in Arrays
1743 public static int binarySearch(long[] a, int fromIndex, int toIndex, in binarySearch() method in Arrays
1788 public static int binarySearch(int[] a, int key) { in binarySearch() method in Arrays
1824 public static int binarySearch(int[] a, int fromIndex, int toIndex, in binarySearch() method in Arrays
1869 public static int binarySearch(short[] a, short key) { in binarySearch() method in Arrays
1905 public static int binarySearch(short[] a, int fromIndex, int toIndex, in binarySearch() method in Arrays
1950 public static int binarySearch(char[] a, char key) { in binarySearch() method in Arrays
1986 public static int binarySearch(char[] a, int fromIndex, int toIndex, in binarySearch() method in Arrays
2031 public static int binarySearch(byte[] a, byte key) { in binarySearch() method in Arrays
2067 public static int binarySearch(byte[] a, int fromIndex, int toIndex, in binarySearch() method in Arrays
[all …]
/libcore/ojluni/src/main/java/java/time/zone/
DZoneRules.java500 int index = Arrays.binarySearch(savingsInstantTransitions, epochSec); in getOffset()
653 int index = Arrays.binarySearch(savingsLocalTransitions, dt); in getOffsetInfo()
755 int index = Arrays.binarySearch(standardTransitions, epochSec); in getStandardOffset()
863 int index = Arrays.binarySearch(savingsInstantTransitions, epochSec); in nextTransition()
914 int index = Arrays.binarySearch(savingsInstantTransitions, epochSec); in previousTransition()
/libcore/luni/src/test/java/libcore/java/util/
DOldCollectionsTest.java61 int index = Collections.binarySearch(lst, new Integer(2), null); in test_binarySearchLjava_util_ListLjava_lang_ObjectLjava_util_Comparator()
73 Collections.binarySearch(ll, new Integer(10), null); in test_binarySearchLjava_util_ListLjava_lang_ObjectLjava_util_Comparator()
88 assertEquals(-1, Collections.binarySearch(localList, new Object())); in test_binarySearchLjava_util_ListLjava_lang_Object()
91 Collections.binarySearch(localList, new Integer(1)); in test_binarySearchLjava_util_ListLjava_lang_Object()
106 Collections.binarySearch(ll, new Integer(10)); in test_binarySearchLjava_util_ListLjava_lang_Object()
DCollectionsTest.java250 int index = Collections.binarySearch(list, 9, new Comparator<Integer>() { in testBinarySearch_comparatorThatReturnsMinAndMaxValue()
273 assertEquals(1, Collections.binarySearch(list2, new IntegerWithExtremeComparator(9))); in testBinarySearch_comparatorThatReturnsMinAndMaxValue()
277 assertEquals(-1, Collections.binarySearch(new ArrayList<Integer>(), 9)); in testBinarySearch_emptyCollection()
279 assertEquals(-1, Collections.binarySearch(new ArrayList<>(), 9, Integer::compareTo)); in testBinarySearch_emptyCollection()
/libcore/luni/src/main/java/libcore/icu/
DTimeZoneNames.java135 int index = Arrays.binarySearch(zoneStrings, needle, ZONE_STRINGS_COMPARATOR); in getDisplayName()
/libcore/luni/src/main/java/libcore/timezone/
DZoneInfoDB.java161 int index = Arrays.binarySearch(ids, id); in getBufferIterator()
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
DTestCertUtils.java630 int pos = Arrays.binarySearch(data, (byte) 0); in engineGenerateCertificate()
/libcore/ojluni/src/main/java/sun/util/logging/
DPlatformLogger.java151 int i = Arrays.binarySearch(LEVEL_VALUES, 0, LEVEL_VALUES.length-2, level); in valueOf()
/libcore/ojluni/src/main/java/java/time/chrono/
DHijrahChronology.java785 int ndx = Arrays.binarySearch(hijrahEpochMonthStartDays, epochDay); in epochDayToEpochMonth()
/libcore/luni/src/main/java/libcore/util/
DZoneInfo.java442 int transition = Arrays.binarySearch(mTransitions, seconds); in findTransitionIndex()
/libcore/luni/src/main/java/java/math/
DBigDecimal.java1816 int index = Arrays.binarySearch(MathUtils.LONG_POWERS_OF_TEN, Math.abs(value)); in decimalDigitsInLong()