Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for binarySearch (0.17 sec)

  1. 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)
  2. 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)
  3. 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)
  4. okhttp/src/main/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt

        // will look like: [foo, bar, com], [bar, com], [com]. The longest matching rule wins.
        var exactMatch: String? = null
        for (i in domainLabelsUtf8Bytes.indices) {
          val rule = publicSuffixListBytes.binarySearch(domainLabelsUtf8Bytes, i)
          if (rule != null) {
            exactMatch = rule
            break
          }
        }
    
        // In theory, wildcard rules are not restricted to having the wildcard in the leftmost position.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 11.7K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. src/test/java/jcifs/tests/EnumTest.java

                    }
    
                    String[] found = f.list();
                    Arrays.sort(found);
    
                    for ( int i = 0; i < n; i++ ) {
                        Assert.assertTrue(Arrays.binarySearch(found, String.format("%s%d.tmp", prefix, i)) >= 0);
                    }
                }
                finally {
                    f.delete();
                }
            }
    
        }
    
    
        @Test
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Thu Jan 05 13:09:03 UTC 2023
    - 25.5K bytes
    - Viewed (0)
Back to top