Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 137 for Present (0.56 sec)

  1. guava-tests/test/com/google/common/base/OptionalTest.java

          fail();
        } catch (IllegalStateException expected) {
        }
      }
    
      public void testGet_present() {
        assertEquals("training", Optional.of("training").get());
      }
    
      @SuppressWarnings("OptionalOfRedundantMethod") // Unit tests for Optional
      public void testOr_T_present() {
        assertEquals("a", Optional.of("a").or("default"));
      }
    
      public void testOr_T_absent() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/BloomFilterTest.java

        // flip GOLDEN_PRESENT_KEY to true even if it wasn't explicitly inserted
        // (false positive).
        assertThat(bloomFilter.mightContain(GOLDEN_PRESENT_KEY)).isFalse();
        for (int i = 0; i < NUM_PUTS; i++) {
          bloomFilter.put(getNonGoldenRandomKey());
        }
        bloomFilter.put(GOLDEN_PRESENT_KEY);
    
        int numThreads = 12;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 21.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/HashBiMap.java

            hashTableVToK[valueBucket] = entryToRehash;
          }
        }
      }
    
      /**
       * Returns the bucket (in either the K-to-V or V-to-K tables) where elements with the specified
       * hash could be found, if present, or could be inserted.
       */
      private int bucket(int hash) {
        return hash & (hashTableKToV.length - 1);
      }
    
      /** Given a key, returns the index of the entry in the tables, or ABSENT if not found. */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 06 16:06:58 GMT 2023
    - 36.4K bytes
    - Viewed (0)
  4. guava/src/com/google/common/base/Optional.java

     * might be absent" as two distinct types in your program, which can aid clarity.
     *
     * <p>Some uses of this class include
     *
     * <ul>
     *   <li>As a method return type, as an alternative to returning {@code null} to indicate that no
     *       value was available
     *   <li>To distinguish between "unknown" (for example, not present in a map) and "known to have no
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 14.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/base/OptionalTest.java

          optional.get();
          fail();
        } catch (IllegalStateException expected) {
        }
      }
    
      public void testGet_present() {
        assertEquals("training", Optional.of("training").get());
      }
    
      @SuppressWarnings("OptionalOfRedundantMethod") // Unit tests for Optional
      public void testOr_T_present() {
        assertEquals("a", Optional.of("a").or("default"));
      }
    
      public void testOr_T_absent() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java

      /** Return type from "contains the following elements" assertions. */
      public interface Ordered {
        /**
         * Attests that the expected values must not just be present but must be present in the order
         * they were given.
         */
        void inOrder();
      }
    
      private abstract static class GeneralSpliterator<E extends @Nullable Object> {
        final Spliterator<E> spliterator;
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 18:19:31 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/SortedLists.java

        /**
         * Return the index of any list element that compares as equal to the key. No guarantees are
         * made as to which index is returned, if more than one element compares as equal to the key.
         */
        ANY_PRESENT {
          @Override
          <E extends @Nullable Object> int resultIndex(
              Comparator<? super E> comparator,
              @ParametricNullness E key,
              List<? extends E> list,
              int foundIndex) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/ImmutableRangeMap.java

      @CheckForNull
      public V get(K key) {
        int index =
            SortedLists.binarySearch(
                ranges,
                Range::lowerBound,
                Cut.belowValue(key),
                KeyPresentBehavior.ANY_PRESENT,
                KeyAbsentBehavior.NEXT_LOWER);
        if (index == -1) {
          return null;
        } else {
          Range<K> range = ranges.get(index);
          return range.contains(key) ? values.get(index) : null;
        }
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/RateLimiter.java

       *     arbitrary past or present time
       */
      abstract long queryEarliestAvailable(long nowMicros);
    
      /**
       * Reserves the requested number of permits and returns the time that those permits can be used
       * (with one caveat).
       *
       * @return the time that the permits may be used, or, if the permits may be used immediately, an
       *     arbitrary past or present time
       */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 18.2K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/HashBiMap.java

        if (oldEntryForValue != null) {
          if (force) {
            delete(oldEntryForValue);
          } else {
            throw new IllegalArgumentException("value already present: " + value);
          }
        }
    
        BiEntry<K, V> newEntry = new BiEntry<>(key, keyHash, value, valueHash);
        if (oldEntryForKey != null) {
          delete(oldEntryForKey);
          insert(newEntry, oldEntryForKey);
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri Oct 13 14:11:58 GMT 2023
    - 24.5K bytes
    - Viewed (0)
Back to top