Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for presentInstances (0.52 sec)

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

        assertThat(Optional.presentInstances(optionals)).containsExactly("a", "b", "c").inOrder();
      }
    
      public void testPresentInstances_allAbsent() {
        List<Optional<Object>> optionals = ImmutableList.of(Optional.absent(), Optional.absent());
        assertThat(Optional.presentInstances(optionals)).isEmpty();
      }
    
      public void testPresentInstances_somePresent() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 17 18:14:12 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/collect/BinaryTreeTraverserBenchmark.java

      }
    
      private static final TreeTraverser<BinaryNode> VIEWER =
          new TreeTraverser<BinaryNode>() {
            @Override
            public Iterable<BinaryNode> children(BinaryNode root) {
              return Optional.presentInstances(ImmutableList.of(root.left, root.right));
            }
          };
    
      enum Traversal {
        PRE_ORDER {
          @Override
          <T> Iterable<T> view(T root, TreeTraverser<T> viewer) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 26 19:18:53 UTC 2019
    - 4.9K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/collect/BinaryTreeTraverserBenchmark.java

      }
    
      private static final TreeTraverser<BinaryNode> VIEWER =
          new TreeTraverser<BinaryNode>() {
            @Override
            public Iterable<BinaryNode> children(BinaryNode root) {
              return Optional.presentInstances(ImmutableList.of(root.left, root.right));
            }
          };
    
      enum Traversal {
        PRE_ORDER {
          @Override
          <T> Iterable<T> view(T root, TreeTraverser<T> viewer) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 26 19:18:53 UTC 2019
    - 4.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/base/Optional.java

       *
       * <p><b>Java 9 users:</b> use {@code optionals.stream().flatMap(Optional::stream)} instead.
       *
       * @since 11.0 (generics widened in 13.0)
       */
      public static <T> Iterable<T> presentInstances(
          final Iterable<? extends Optional<? extends T>> optionals) {
        checkNotNull(optionals);
        return new Iterable<T>() {
          @Override
          public Iterator<T> iterator() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 15.4K bytes
    - Viewed (0)
Back to top