Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 160 for Supplier (0.46 sec)

  1. android/guava-tests/test/com/google/common/base/FunctionsTest.java

        }
      }
    
      public void testForSupplier() {
        Supplier<Integer> supplier = new CountingSupplier();
        Function<@Nullable Object, Integer> function = Functions.forSupplier(supplier);
    
        assertEquals(1, (int) function.apply(null));
        assertEquals(2, (int) function.apply("foo"));
    
        new EqualsTester()
            .addEqualityGroup(function, Functions.forSupplier(supplier))
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 16K bytes
    - Viewed (0)
  2. 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
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 13K bytes
    - Viewed (0)
  3. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

        public <T extends FromTo<String, Integer> & Supplier<Long>> void checkArray(T f, String s) {
          calledWith(f, s);
        }
    
        void check() {
          runTester();
          FromTo<?, ?> defaultFunction = (FromTo<?, ?>) getDefaultParameterValue(0);
          assertEquals(0, defaultFunction.apply(null));
          Supplier<?> defaultSupplier = (Supplier<?>) defaultFunction;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 47.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/Multimaps.java

              java.util.function.Supplier<M> multimapSupplier) {
        return CollectCollectors.<T, K, V, M>toMultimap(keyFunction, valueFunction, multimapSupplier);
      }
    
      /**
       * Returns a {@code Collector} accumulating entries into a {@code Multimap} generated from the
       * specified supplier. Each input element is mapped to a key and a stream of values, each of which
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 86.4K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/CollectCollectors.java

    import java.util.EnumMap;
    import java.util.EnumSet;
    import java.util.LinkedHashMap;
    import java.util.TreeMap;
    import java.util.function.BinaryOperator;
    import java.util.function.Function;
    import java.util.function.Supplier;
    import java.util.function.ToIntFunction;
    import java.util.stream.Collector;
    import java.util.stream.Collectors;
    import java.util.stream.Stream;
    import javax.annotation.CheckForNull;
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 16:21:40 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/TestStreamSupplier.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.io;
    
    /**
     * Interface for a supplier of streams that can report whether a stream was opened and whether that
     * stream was closed. Intended for use in a test where only a single stream should be opened and
     * possibly closed.
     *
     * @author Colin Decker
     */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.annotations.VisibleForTesting;
    import com.google.common.base.Supplier;
    import com.google.common.base.Throwables;
    import com.google.common.collect.Lists;
    import com.google.common.collect.Queues;
    import com.google.common.util.concurrent.ForwardingListenableFuture.SimpleForwardingListenableFuture;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 41.8K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/collect/MultimapsCollectionTest.java

        SUPPORTS_REMOVE,
        CollectionFeature.SUPPORTS_ITERATOR_REMOVE,
        MultisetTestSuiteBuilder.NoRecurse.NO_ENTRY_SET, // Cannot create entries with count > 1
      };
    
      static final Supplier<TreeSet<String>> STRING_TREESET_FACTORY =
          new Supplier<TreeSet<String>>() {
            @Override
            public TreeSet<String> get() {
              return new TreeSet<>(Ordering.natural().nullsLast());
            }
          };
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 20:09:59 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/ByteSink.java

    /**
     * A destination to which bytes can be written, such as a file. Unlike an {@link OutputStream}, a
     * {@code ByteSink} is not an open, stateful stream that can be written to and closed. Instead, it
     * is an immutable <i>supplier</i> of {@code OutputStream} instances.
     *
     * <p>{@code ByteSink} provides two kinds of methods:
     *
     * <ul>
     *   <li><b>Methods that return a stream:</b> These methods should return a <i>new</i>, independent
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/reflect/TypeTokenResolutionTest.java

     */
    
    package com.google.common.reflect;
    
    import static com.google.common.truth.Truth.assertThat;
    import static org.junit.Assert.assertThrows;
    
    import com.google.common.base.Predicate;
    import com.google.common.base.Supplier;
    import java.lang.reflect.GenericArrayType;
    import java.lang.reflect.ParameterizedType;
    import java.lang.reflect.Type;
    import java.lang.reflect.TypeVariable;
    import java.lang.reflect.WildcardType;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 19.5K bytes
    - Viewed (0)
Back to top