Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 569 for present (0.25 sec)

  1. android/guava/src/com/google/common/base/Optional.java

      }
    
      Optional() {}
    
      /**
       * Returns {@code true} if this holder contains a (non-null) instance.
       *
       * <p><b>Comparison to {@code java.util.Optional}:</b> no differences.
       */
      public abstract boolean isPresent();
    
      /**
       * Returns the contained instance, which must be present. If the instance might be absent, use
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 13K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/collection/LruHashSet.java

         *         element.
         */
        @Override
        public boolean add(final E o) {
            return map.put(o, PRESENT) == null;
        }
    
        /**
         * Removes the specified element from this set if it is present.
         *
         * @param o
         *            object to be removed from this set, if present.
         * @return true if the set contained the specified element.
         */
        @Override
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  3. guava/src/com/google/common/base/Optional.java

     *       value was available
     *   <li>To distinguish between "unknown" (for example, not present in a map) and "known to have no
     *       value" (present in the map, with value {@code Optional.absent()})
     *   <li>To wrap nullable references for storage in a collection that does not support {@code null}
     *       (though there are <a
    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)
  4. guava-testlib/src/com/google/common/collect/testing/testers/CollectionRemoveTester.java

      @CollectionFeature.Require(SUPPORTS_REMOVE)
      @CollectionSize.Require(absent = ZERO)
      public void testRemove_present() {
        int initialSize = collection.size();
        assertTrue("remove(present) should return true", collection.remove(e0()));
        assertEquals(
            "remove(present) should decrease a collection's size by one.",
            initialSize - 1,
            collection.size());
        expectMissing(e0());
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/CollectionFuture.java

      @CheckForNull @LazyInit private List<@Nullable Present<V>> values;
    
      CollectionFuture(
          ImmutableCollection<? extends ListenableFuture<? extends V>> futures,
          boolean allMustSucceed) {
        super(futures, allMustSucceed, true);
    
        List<@Nullable Present<V>> values =
            futures.isEmpty()
                ? Collections.<@Nullable Present<V>>emptyList()
                : Lists.<@Nullable Present<V>>newArrayListWithCapacity(futures.size());
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/SortedListsTest.java

        switch (presentBehavior) {
          case FIRST_PRESENT:
            if (list.contains(key)) {
              assertEquals(list.indexOf(key), answer);
              return;
            }
            break;
          case LAST_PRESENT:
            if (list.contains(key)) {
              assertEquals(list.lastIndexOf(key), answer);
              return;
            }
            break;
          case ANY_PRESENT:
            if (list.contains(key)) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Feb 19 20:34:55 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  7. 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)
  8. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/google/MultisetRemoveTester.java

      @CollectionFeature.Require(SUPPORTS_REMOVE)
      public void testRemove_occurrences_present() {
        assertEquals(
            "multiset.remove(present, 2) didn't return the old count",
            1,
            getMultiset().remove(e0(), 2));
        assertFalse(
            "multiset contains present after multiset.remove(present, 2)",
            getMultiset().contains(e0()));
        assertEquals(0, getMultiset().count(e0()));
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 7K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/collect/testing/testers/MapPutTester.java

      }
    
      @MapFeature.Require(absent = SUPPORTS_PUT)
      @CollectionSize.Require(absent = ZERO)
      public void testPut_unsupportedPresentExistingValue() {
        try {
          assertEquals("put(present, existingValue) should return present or throw", v0(), put(e0()));
        } catch (UnsupportedOperationException tolerated) {
        }
        expectUnchanged();
      }
    
      @MapFeature.Require(absent = SUPPORTS_PUT)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 16:49:06 GMT 2024
    - 9.4K bytes
    - Viewed (0)
Back to top