Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 289 for Supplier (0.24 sec)

  1. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  2. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/stream/StreamUtil.java

        }
    
        public static class StreamOf<T> {
    
            private final Supplier<Stream<T>> supplier;
    
            public StreamOf(final Supplier<Stream<T>> supplier) {
                this.supplier = supplier;
            }
    
            public void of(final Consumer<Stream<T>> stream) {
                try (Stream<T> s = supplier.get()) {
                    stream.accept(s);
                }
            }
    
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2K bytes
    - Viewed (0)
  4. guava-tests/benchmark/com/google/common/util/concurrent/StripedBenchmark.java

    /** A benchmark comparing the various striped implementations. */
    @VmOptions({"-Xms12g", "-Xmx12g", "-d64"})
    public class StripedBenchmark {
      private static final Supplier<Lock> LOCK_SUPPLIER =
          new Supplier<Lock>() {
            @Override
            public Lock get() {
              return new ReentrantLock();
            }
          };
    
      @Param({"2", "8", "64", "1024", "65536"})
      int numStripes;
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4K bytes
    - Viewed (0)
  5. android/guava-tests/benchmark/com/google/common/util/concurrent/StripedBenchmark.java

    /** A benchmark comparing the various striped implementations. */
    @VmOptions({"-Xms12g", "-Xmx12g", "-d64"})
    public class StripedBenchmark {
      private static final Supplier<Lock> LOCK_SUPPLIER =
          new Supplier<Lock>() {
            @Override
            public Lock get() {
              return new ReentrantLock();
            }
          };
    
      @Param({"2", "8", "64", "1024", "65536"})
      int numStripes;
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/graph/InvalidatableSet.java

      private final Supplier<Boolean> validator;
      private final Set<E> delegate;
      private final Supplier<String> errorMessage;
    
      public static final <E> InvalidatableSet<E> of(
          Set<E> delegate, Supplier<Boolean> validator, Supplier<String> errorMessage) {
        return new InvalidatableSet<>(
            checkNotNull(delegate), checkNotNull(validator), checkNotNull(errorMessage));
      }
    
      @Override
      protected Set<E> delegate() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 17:29:38 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  7. 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 Apr 28 03:35:10 GMT 2024
    - Last Modified: Thu Apr 25 14:13:36 GMT 2024
    - 8K bytes
    - Viewed (0)
  8. guava-tests/benchmark/com/google/common/collect/StreamsBenchmark.java

          this.supplier = supplier;
        }
      }
    
      @Param private CollectionType source;
    
      enum Operation {
        FIND_FIRST {
          @Override
          Object operate(Stream<?> stream) {
            return stream.findFirst();
          }
        },
        STREAMS_ONLY_ELEMENT {
          @Override
          Object operate(Stream<?> stream) {
            try {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 03 19:39:41 GMT 2016
    - 2.8K bytes
    - Viewed (0)
  9. maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelTransformerContext.java

                    }
                }
                return model;
            }
    
            public Model computeIfAbsent(Supplier<Model> supplier) {
                if (!set) {
                    synchronized (this) {
                        if (!set) {
                            this.set = true;
                            this.model = supplier.get();
                            this.notifyAll();
                        }
                    }
                }
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Fri Apr 12 10:50:18 GMT 2024
    - 4K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/TableCollectors.java

    import com.google.common.collect.Tables.AbstractCell;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.function.BinaryOperator;
    import java.util.function.Function;
    import java.util.function.Supplier;
    import java.util.stream.Collector;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /** Collectors utilities for {@code common.collect.Table} internals. */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sat Mar 09 00:21:17 GMT 2024
    - 7.7K bytes
    - Viewed (0)
Back to top