Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 108 for Supplier (0.07 sec)

  1. 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);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 26 12:58:35 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  2. 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, NANOSECONDS);
              }
            };
        testSupplierThreadSafe(memoizer);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  3. 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, NANOSECONDS);
              }
            };
        testSupplierThreadSafe(memoizer);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/MultimapBuilder.java

        }
      }
    
      private enum LinkedListSupplier implements Supplier<List<?>> {
        INSTANCE;
    
        public static <V extends @Nullable Object> Supplier<List<V>> instance() {
          // Each call generates a fresh LinkedList, which can serve as a List<V> for any V.
          @SuppressWarnings({"rawtypes", "unchecked"})
          Supplier<List<V>> result = (Supplier) INSTANCE;
          return result;
        }
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  5. compat/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemSupplier.java

     * memorized and kept as long as supplier instance is kept open.
     * <p>
     * This class is not thread safe and must be used from one thread only, while the constructed {@link RepositorySystem}
     * is thread safe.
     * <p>
     * Important: Given the instance of supplier memorizes the supplier {@link RepositorySystem} instance it supplies,
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 45.7K bytes
    - Viewed (0)
  6. impl/maven-core/src/main/java/org/apache/maven/internal/impl/SisuDiBridgeModule.java

                    this.beanEntry = beanEntry;
                    return this;
                }
    
                @Override
                public Supplier<T> compile(Function<Dependency<?>, Supplier<?>> compiler) {
                    return beanEntry.getProvider()::get;
                }
            }
    
            class BridgeProvider<T> implements Provider<T> {
                final Binding<T> binding;
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java

          Supplier<Spliterator<E>> spliteratorSupplier) {
        return new SpliteratorTester<>(
            ImmutableSet.of(() -> new GeneralSpliteratorOfObject<>(spliteratorSupplier.get())));
      }
    
      /**
       * @since NEXT (but since 28.1 in the JRE flavor)
       */
      public static SpliteratorTester<Integer> ofInt(Supplier<Spliterator.OfInt> spliteratorSupplier) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/collect/testing/SpliteratorTester.java

          Supplier<Spliterator<E>> spliteratorSupplier) {
        return new SpliteratorTester<>(
            ImmutableSet.of(() -> new GeneralSpliteratorOfObject<>(spliteratorSupplier.get())));
      }
    
      /**
       * @since 28.1 (but only since 33.4.0 in the Android flavor)
       */
      public static SpliteratorTester<Integer> ofInt(Supplier<Spliterator.OfInt> spliteratorSupplier) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  9. android/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
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  10. 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);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 10.5K bytes
    - Viewed (0)
Back to top