Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 234 for Supplier (0.15 sec)

  1. android/guava/src/com/google/common/cache/CacheLoader.java

      /**
       * Returns a cache loader based on an <i>existing</i> supplier instance. Note that there's no need
       * to create a <i>new</i> supplier just to pass it in here; just subclass {@code CacheLoader} and
       * implement {@link #load load} instead.
       *
       * <p>The returned object is serializable if {@code supplier} is serializable.
       *
       * @param supplier the supplier to be used for loading values; must never return {@code null}
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 19 20:20:14 GMT 2022
    - 9.6K bytes
    - Viewed (0)
  2. maven-api-impl/src/main/java/org/apache/maven/internal/impl/resolver/DefaultModelCache.java

            public int hashCode() {
                return hash;
            }
        }
    
        static class CachingSupplier<T> implements Supplier<T> {
            final Supplier<T> supplier;
            volatile Object value;
    
            CachingSupplier(Supplier<T> supplier) {
                this.supplier = supplier;
            }
    
            @Override
            @SuppressWarnings({"unchecked", "checkstyle:InnerAssignment"})
            public T get() {
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu May 02 15:10:38 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  3. 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)
  4. api/maven-api-core/src/main/java/org/apache/maven/api/SessionData.java

         *
         * @param key the key for which to retrieve the session data, must not be {@code null}
         * @param supplier the supplier will compute the new value
         * @return the session data associated with the key
         */
        @Nullable
        <T> T computeIfAbsent(@Nonnull Key<T> key, @Nonnull Supplier<T> supplier);
    
        /**
         * Create a key using the given class as an identifier and as the type of the object.
         */
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Wed Feb 28 23:31:09 GMT 2024
    - 4.7K 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. maven-api-impl/src/main/java/org/apache/maven/api/services/model/ModelCache.java

     * model builder.
     *
     */
    public interface ModelCache {
    
        <T> T computeIfAbsent(String groupId, String artifactId, String version, String tag, Supplier<T> data);
    
        <T> T computeIfAbsent(Source path, String tag, Supplier<T> data);
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/core/misc/LocaleUtil.java

                }
            }
            return locale;
        }
    
        private static Supplier<Locale> defaultLocaleSupplier;
    
        public static Locale getDefault() {
            if (defaultLocaleSupplier != null) {
                return defaultLocaleSupplier.get();
            }
            return Locale.ENGLISH;
        }
    
        public static void setDefault(final Supplier<Locale> localeSupplier) {
            defaultLocaleSupplier = localeSupplier;
        }
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  8. maven-core/src/main/java/org/apache/maven/internal/impl/SisuDiBridgeModule.java

    import java.util.ArrayList;
    import java.util.Comparator;
    import java.util.HashSet;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Map;
    import java.util.Set;
    import java.util.function.Supplier;
    import java.util.stream.Collectors;
    
    import com.google.inject.AbstractModule;
    import com.google.inject.binder.AnnotatedBindingBuilder;
    import com.google.inject.name.Names;
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu Apr 25 14:13:36 GMT 2024
    - 8K bytes
    - Viewed (0)
  9. api/maven-api-core/src/main/java/org/apache/maven/api/plugin/Log.java

         * The stack trace for this exception will be output when this error level is enabled.
         *
         * @param error
         */
        void debug(Throwable error);
    
        void debug(Supplier<String> content);
    
        void debug(Supplier<String> content, Throwable error);
    
        /**
         * @return true if the <b>info</b> error level is enabled
         */
        boolean isInfoEnabled();
    
        /**
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Wed Feb 28 23:54:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/testing/CollectorTester.java

              A result(Collector<T, A, R> collector, Iterable<T> inputs) {
            A accum = collector.supplier().get();
            for (T input : inputs) {
              A newAccum = collector.supplier().get();
              collector.accumulator().accept(newAccum, input);
              accum = collector.combiner().apply(accum, newAccum);
            }
            return accum;
          }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 6.5K bytes
    - Viewed (0)
Back to top