Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for firstMatch (0.08 sec)

  1. android/guava-tests/test/com/google/common/collect/WriteReplaceOverridesTest.java

              FluentIterable.from(TypeToken.of(clazz).getTypes())
                  .transform(TypeToken::getRawType)
                  .transformAndConcat(c -> asList(c.getDeclaredMethods()))
                  .firstMatch(
                      m ->
                          m.getName().equals("writeReplace")
                              && m.getParameterTypes().length == 0
                              // Only package-private methods are a problem.
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 18:53:31 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/FluentIterableTest.java

        FluentIterable<String> iterable = FluentIterable.from(Lists.newArrayList("cool", "pants"));
        assertThat(iterable.firstMatch(equalTo("cool"))).hasValue("cool");
        assertThat(iterable.firstMatch(equalTo("pants"))).hasValue("pants");
        assertThat(iterable.firstMatch(Predicates.alwaysFalse())).isAbsent();
        assertThat(iterable.firstMatch(Predicates.alwaysTrue())).hasValue("cool");
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 30.4K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/collect/WriteReplaceOverridesTest.java

              FluentIterable.from(TypeToken.of(clazz).getTypes())
                  .transform(TypeToken::getRawType)
                  .transformAndConcat(c -> asList(c.getDeclaredMethods()))
                  .firstMatch(
                      m ->
                          m.getName().equals("writeReplace")
                              && m.getParameterTypes().length == 0
                              // Only package-private methods are a problem.
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 18:53:31 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/FluentIterable.java

       * is matched in this fluent iterable, a {@link NullPointerException} will be thrown.
       *
       * <p><b>{@code Stream} equivalent:</b> {@code stream.filter(predicate).findFirst()}.
       */
      public final Optional<@NonNull E> firstMatch(Predicate<? super E> predicate) {
        // Unsafe, but we can't do much about it now.
        return Iterables.<@NonNull E>tryFind((Iterable<@NonNull E>) getDelegate(), predicate);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 24 13:42:31 UTC 2024
    - 35.7K bytes
    - Viewed (0)
Back to top