- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for binarySearch (0.14 sec)
-
android/guava/src/com/google/common/collect/SortedLists.java
* algorithm. * * <p>Equivalent to {@link #binarySearch(List, Function, Object, Comparator, KeyPresentBehavior, * KeyAbsentBehavior)} using {@link Ordering#natural}. */ @SuppressWarnings("rawtypes") // https://github.com/google/guava/issues/989 public static <E extends Comparable> int binarySearch( List<? extends E> list, E e, KeyPresentBehavior presentBehavior,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 11K bytes - Viewed (0) -
guava/src/com/google/common/collect/SortedLists.java
* algorithm. * * <p>Equivalent to {@link #binarySearch(List, Function, Object, Comparator, KeyPresentBehavior, * KeyAbsentBehavior)} using {@link Ordering#natural}. */ @SuppressWarnings("rawtypes") // https://github.com/google/guava/issues/989 public static <E extends Comparable> int binarySearch( List<? extends E> list, E e, KeyPresentBehavior presentBehavior,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 11K bytes - Viewed (0) -
guava/src/com/google/common/collect/ImmutableRangeSet.java
fromIndex = SortedLists.binarySearch( ranges, Range::upperBound, range.lowerBound, KeyPresentBehavior.FIRST_AFTER, KeyAbsentBehavior.NEXT_HIGHER); } else { fromIndex = 0; } int toIndex; if (range.hasUpperBound()) { toIndex = SortedLists.binarySearch( ranges,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 27K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/SortedListsTest.java
for (int key = 0; key <= 10; key++) { assertModelAgrees( LIST_WITHOUT_DUPS, key, SortedLists.binarySearch(LIST_WITHOUT_DUPS, key, presentBehavior, absentBehavior), presentBehavior, absentBehavior); } } } } public void testWithDups() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 17:21:56 UTC 2024 - 4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableRangeMap.java
return this; } int lowerIndex = SortedLists.binarySearch( ranges, Range::upperBound, range.lowerBound, KeyPresentBehavior.FIRST_AFTER, KeyAbsentBehavior.NEXT_HIGHER); int upperIndex = SortedLists.binarySearch( ranges, Range::lowerBound, range.upperBound,
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 14.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Ordering.java
return true; } /** * {@link Collections#binarySearch(List, Object, Comparator) Searches} {@code sortedList} for * {@code key} using the binary search algorithm. The list must be sorted using this ordering. * * @param sortedList the list to be searched * @param key the key to be searched for * @deprecated Use {@link Collections#binarySearch(List, Object, Comparator)} directly. */ @Deprecated
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 39.4K bytes - Viewed (0) -
guava/src/com/google/common/collect/Ordering.java
return true; } /** * {@link Collections#binarySearch(List, Object, Comparator) Searches} {@code sortedList} for * {@code key} using the binary search algorithm. The list must be sorted using this ordering. * * @param sortedList the list to be searched * @param key the key to be searched for * @deprecated Use {@link Collections#binarySearch(List, Object, Comparator)} directly. */ @Deprecated
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 39.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/OrderingTest.java
for (int i = 0; i < strictlyOrderedList.size(); i++) { assertEquals(i, ordering.binarySearch(strictlyOrderedList, strictlyOrderedList.get(i))); } List<T> newList = Lists.newArrayList(strictlyOrderedList); T valueNotInList = newList.remove(1); assertEquals(-2, ordering.binarySearch(newList, valueNotInList)); } void testSortedCopy() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 42.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/OrderingTest.java
for (int i = 0; i < strictlyOrderedList.size(); i++) { assertEquals(i, ordering.binarySearch(strictlyOrderedList, strictlyOrderedList.get(i))); } List<T> newList = Lists.newArrayList(strictlyOrderedList); T valueNotInList = newList.remove(1); assertEquals(-2, ordering.binarySearch(newList, valueNotInList)); } void testSortedCopy() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 42.6K bytes - Viewed (0) -
guava/src/com/google/common/base/CharMatcher.java
checkArgument(rangeEnds[i] < rangeStarts[i + 1]); } } } @Override public boolean matches(char c) { int index = Arrays.binarySearch(rangeStarts, c); if (index >= 0) { return true; } else { index = ~index - 1; return index >= 0 && c <= rangeEnds[index]; } } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 13:00:28 UTC 2024 - 53.9K bytes - Viewed (0)