Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 59 for predicate (0.17 sec)

  1. guava/src/com/google/common/base/Predicates.java

        <T extends @Nullable Object> Predicate<T> withNarrowedType() {
          return (Predicate<T>) this;
        }
      }
    
      /**
       * @see Predicates#not(Predicate)
       */
      private static final class NotPredicate<T extends @Nullable Object>
          implements Predicate<T>, Serializable {
        final Predicate<T> predicate;
    
        NotPredicate(Predicate<T> predicate) {
          this.predicate = checkNotNull(predicate);
        }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 26.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/collect/IterablesTest.java

        List<String> list = new ArrayList<>();
        Predicate<String> predicate = equalTo("pants");
    
        assertFalse(any(list, predicate));
        list.add("cool");
        assertFalse(any(list, predicate));
        list.add("pants");
        assertTrue(any(list, predicate));
      }
    
      public void testAll() {
        List<String> list = new ArrayList<>();
        Predicate<String> predicate = equalTo("cool");
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 45.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/collect/FilteredEntryMultimap.java

        this.unfiltered = checkNotNull(unfiltered);
        this.predicate = checkNotNull(predicate);
      }
    
      @Override
      public Multimap<K, V> unfiltered() {
        return unfiltered;
      }
    
      @Override
      public Predicate<? super Entry<K, V>> entryPredicate() {
        return predicate;
      }
    
      @Override
      public int size() {
        return entries().size();
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/base/PredicatesTest.java

      }
    
      public void testAnd_listDefensivelyCopied() {
        List<Predicate<Object>> list = new ArrayList<>();
        Predicate<Object> predicate = Predicates.and(list);
        assertTrue(predicate.apply(1));
        list.add(Predicates.alwaysFalse());
        assertTrue(predicate.apply(1));
      }
    
      public void testAnd_iterableDefensivelyCopied() {
        List<Predicate<Object>> list = new ArrayList<>();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 32.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/Iterables.java

          Iterable<T> iterable, Predicate<? super T> predicate) {
        return Iterators.find(iterable.iterator(), predicate);
      }
    
      /**
       * Returns the first element in {@code iterable} that satisfies the given predicate, or {@code
       * defaultValue} if none found. Note that this can usually be handled more naturally using {@code
       * tryFind(iterable, predicate).or(defaultValue)}.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 43.6K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/testing/GcFinalization.java

      }
    
      /**
       * Waits until the given predicate returns true, invoking the garbage collector as necessary to
       * try to ensure that this will happen.
       *
       * @throws RuntimeException if timed out or interrupted while waiting
       */
      @SuppressWarnings("removal") // b/260137033
      public static void awaitDone(FinalizationPredicate predicate) {
        if (predicate.isDone()) {
          return;
        }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/FilteredEntryMultimap.java

        this.unfiltered = checkNotNull(unfiltered);
        this.predicate = checkNotNull(predicate);
      }
    
      @Override
      public Multimap<K, V> unfiltered() {
        return unfiltered;
      }
    
      @Override
      public Predicate<? super Entry<K, V>> entryPredicate() {
        return predicate;
      }
    
      @Override
      public int size() {
        return entries().size();
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/Iterables.java

          return ((Collection<T>) removeFrom).removeIf(predicate);
        }
        return Iterators.removeIf(removeFrom.iterator(), predicate);
      }
    
      /** Removes and returns the first matching element, or returns {@code null} if there is none. */
      static <T extends @Nullable Object> @Nullable T removeFirstMatching(
          Iterable<T> removeFrom, Predicate<? super T> predicate) {
        checkNotNull(predicate);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 43.3K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/IterablesTest.java

        List<String> list = new ArrayList<>();
        Predicate<String> predicate = equalTo("pants");
    
        assertFalse(any(list, predicate));
        list.add("cool");
        assertFalse(any(list, predicate));
        list.add("pants");
        assertTrue(any(list, predicate));
      }
    
      public void testAll() {
        List<String> list = new ArrayList<>();
        Predicate<String> predicate = equalTo("cool");
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 46.6K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/FluentIterable.java

       *
       * <p><b>{@code Stream} equivalent:</b> {@link Stream#anyMatch} (same).
       */
      public final boolean anyMatch(Predicate<? super E> predicate) {
        return Iterables.any(getDelegate(), predicate);
      }
    
      /**
       * Returns {@code true} if every element in this fluent iterable satisfies the predicate. If this
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 35.3K bytes
    - Viewed (0)
Back to top