Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 289 for Supplier (0.3 sec)

  1. guava-tests/test/com/google/common/util/concurrent/CallablesTest.java

    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.base.Supplier;
    import com.google.common.base.Suppliers;
    import java.security.Permission;
    import java.util.concurrent.Callable;
    import java.util.concurrent.ExecutionException;
    import junit.framework.TestCase;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  2. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 19 20:20:14 GMT 2022
    - 9.6K bytes
    - Viewed (0)
  3. maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLog.java

        @Override
        public void debug(Throwable error) {
            logger.debug("", error);
        }
    
        @Override
        public void debug(Supplier<String> content) {
            if (isDebugEnabled()) {
                logger.debug(content.get());
            }
        }
    
        @Override
        public void debug(Supplier<String> content, Throwable error) {
            if (isDebugEnabled()) {
                logger.debug(content.get(), error);
            }
        }
    
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Fri Sep 22 09:07:17 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/cache/LongAddables.java

          LongAdder unused = new LongAdder();
          supplier =
              new Supplier<LongAddable>() {
                @Override
                public LongAddable get() {
                  return new LongAdder();
                }
              };
        } catch (Throwable t) { // we really want to catch *everything*
          supplier =
              new Supplier<LongAddable>() {
                @Override
                public LongAddable get() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 04 17:27:14 GMT 2022
    - 2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/hash/ChecksumHashFunctionTest.java

      }
    
      private static void assertChecksum(ImmutableSupplier<Checksum> supplier, String input) {
        byte[] bytes = HashTestUtils.ascii(input);
    
        Checksum checksum = supplier.get();
        checksum.update(bytes, 0, bytes.length);
        long value = checksum.getValue();
    
        String toString = "name";
        HashFunction func = new ChecksumHashFunction(supplier, 32, toString);
        assertEquals(toString, func.toString());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jan 30 14:33:12 GMT 2018
    - 3.1K bytes
    - Viewed (0)
  6. 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 Apr 28 03:35:10 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 6.5K bytes
    - Viewed (0)
  7. 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)
  8. guava/src/com/google/common/base/Absent.java

      @Override
      public Optional<T> or(Optional<? extends T> secondChoice) {
        return (Optional<T>) checkNotNull(secondChoice);
      }
    
      @Override
      public T or(Supplier<? extends T> supplier) {
        return checkNotNull(
            supplier.get(), "use Optional.orNull() instead of a Supplier that returns null");
      }
    
      @Override
      @CheckForNull
      public T orNull() {
        return null;
      }
    
      @Override
      public Set<T> asSet() {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon May 17 14:07:47 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/base/Absent.java

      @Override
      public Optional<T> or(Optional<? extends T> secondChoice) {
        return (Optional<T>) checkNotNull(secondChoice);
      }
    
      @Override
      public T or(Supplier<? extends T> supplier) {
        return checkNotNull(
            supplier.get(), "use Optional.orNull() instead of a Supplier that returns null");
      }
    
      @Override
      @CheckForNull
      public T orNull() {
        return null;
      }
    
      @Override
      public Set<T> asSet() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon May 17 14:07:47 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  10. 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 Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Dec 19 20:20:14 GMT 2022
    - 9.5K bytes
    - Viewed (0)
Back to top