Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 71 for Supplier (0.17 sec)

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

       * words, the new supplier's value will be computed by retrieving the value from {@code supplier},
       * and then applying {@code function} to that value. Note that the resulting supplier will not
       * call {@code supplier} or invoke {@code function} until it is called.
       */
      public static <F extends @Nullable Object, T extends @Nullable Object> Supplier<T> compose(
          Function<? super F, T> function, Supplier<F> supplier) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 15.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/base/SuppliersTest.java

      public void testExpiringMemoizedSupplierThreadSafe() throws Throwable {
        Function<Supplier<Boolean>, Supplier<Boolean>> memoizer =
            new Function<Supplier<Boolean>, Supplier<Boolean>>() {
              @Override
              public Supplier<Boolean> apply(Supplier<Boolean> supplier) {
                return Suppliers.memoizeWithExpiration(supplier, Long.MAX_VALUE, TimeUnit.NANOSECONDS);
              }
            };
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 18.1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/base/SuppliersTest.java

      public void testExpiringMemoizedSupplierThreadSafe() throws Throwable {
        Function<Supplier<Boolean>, Supplier<Boolean>> memoizer =
            new Function<Supplier<Boolean>, Supplier<Boolean>>() {
              @Override
              public Supplier<Boolean> apply(Supplier<Boolean> supplier) {
                return Suppliers.memoizeWithExpiration(supplier, Long.MAX_VALUE, TimeUnit.NANOSECONDS);
              }
            };
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 18.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/base/OptionalTest.java

      public void testOr_supplier_present() {
        assertEquals("a", Optional.of("a").or(Suppliers.ofInstance("fallback")));
      }
    
      public void testOr_supplier_absent() {
        assertEquals("fallback", Optional.absent().or(Suppliers.ofInstance("fallback")));
      }
    
      public void testOr_nullSupplier_absent() {
        Supplier<Object> nullSupplier = (Supplier<Object>) Suppliers.<@Nullable Object>ofInstance(null);
    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)
  5. guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java

      }
    
      public static <E extends @Nullable Object> SpliteratorTester<E> of(
          Supplier<Spliterator<E>> spliteratorSupplier) {
        return new SpliteratorTester<>(
            ImmutableSet.of(() -> new GeneralSpliteratorOfObject<>(spliteratorSupplier.get())));
      }
    
      /**
       * @since 28.1
       */
      public static SpliteratorTester<Integer> ofInt(Supplier<Spliterator.OfInt> spliteratorSupplier) {
        return new SpliteratorTester<>(
    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)
  6. guava/src/com/google/common/base/Functions.java

          implements Function<F, T>, Serializable {
    
        private final Supplier<T> supplier;
    
        private SupplierFunction(Supplier<T> supplier) {
          this.supplier = checkNotNull(supplier);
        }
    
        @Override
        @ParametricNullness
        public T apply(@ParametricNullness F input) {
          return supplier.get();
        }
    
        @Override
        public boolean equals(@CheckForNull Object obj) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/base/OptionalTest.java

      public void testOr_supplier_present() {
        assertEquals("a", Optional.of("a").or(Suppliers.ofInstance("fallback")));
      }
    
      public void testOr_supplier_absent() {
        assertEquals("fallback", Optional.absent().or(Suppliers.ofInstance("fallback")));
      }
    
      public void testOr_nullSupplier_absent() {
        Supplier<Object> nullSupplier = (Supplier<Object>) Suppliers.<@Nullable Object>ofInstance(null);
    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)
  8. android/guava/src/com/google/common/util/concurrent/Striped.java

       * obtained from the passed supplier.
       *
       * @param stripes the minimum number of stripes (locks) required
       * @param supplier a {@code Supplier<L>} object to obtain locks from
       * @return a new {@code Striped<L>}
       */
      static <L> Striped<L> custom(int stripes, Supplier<L> supplier) {
        return new CompactStriped<>(stripes, supplier);
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 10 20:55:18 GMT 2023
    - 20.3K bytes
    - Viewed (1)
  9. android/guava/src/com/google/common/base/Functions.java

          implements Function<F, T>, Serializable {
    
        private final Supplier<T> supplier;
    
        private SupplierFunction(Supplier<T> supplier) {
          this.supplier = checkNotNull(supplier);
        }
    
        @Override
        @ParametricNullness
        public T apply(@ParametricNullness F input) {
          return supplier.get();
        }
    
        @Override
        public boolean equals(@CheckForNull Object obj) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  10. guava/src/com/google/common/base/Optional.java

       *
       * @throws NullPointerException if this optional's value is absent and the supplier returns {@code
       *     null}
       */
      public abstract T or(Supplier<? extends T> supplier);
    
      /**
       * Returns the contained instance if it is present; {@code null} otherwise. If the instance is
       * known to be present, use {@link #get()} instead.
       *
       * <p><b>Comparison to {@code java.util.Optional}:</b> this method is equivalent to Java 8's
    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)
Back to top