Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 159 for predicate (0.06 seconds)

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

     * @author Jared Levy
     */
    @GwtIncompatible(value = "untested")
    @NullUnmarked
    public class MultimapsFilterEntriesAsMapTest extends AbstractMultimapAsMapImplementsMapTest {
      private static final Predicate<Entry<String, Integer>> PREDICATE =
          new Predicate<Entry<String, Integer>>() {
            @Override
            public boolean apply(Entry<String, Integer> entry) {
              return !Objects.equals(entry.getKey(), "badkey") && entry.getValue() != 55556;
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Wed Feb 12 03:49:18 GMT 2025
    - 2.1K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/collect/IterablesFilterArrayListTest.java

      Iterable<Integer> createUnfiltered(Iterable<Integer> contents) {
        return Lists.newArrayList(contents);
      }
    
      @Override
      Iterable<Integer> filter(Iterable<Integer> elements, Predicate<? super Integer> predicate) {
        return Iterables.filter(elements, predicate);
      }
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Dec 19 18:03:30 GMT 2024
    - 1.2K bytes
    - Click Count (0)
  3. android/guava/src/com/google/common/collect/Collections2.java

        final Collection<E> unfiltered;
        final Predicate<? super E> predicate;
    
        FilteredCollection(Collection<E> unfiltered, Predicate<? super E> predicate) {
          this.unfiltered = unfiltered;
          this.predicate = predicate;
        }
    
        FilteredCollection<E> createCombined(Predicate<? super E> newPredicate) {
          return new FilteredCollection<>(unfiltered, Predicates.and(predicate, newPredicate));
        }
    
        @Override
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Sat Aug 09 01:14:59 GMT 2025
    - 22.6K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/collect/SetsFilterSortedSetTest.java

          protected SortedSet<Integer> delegate() {
            return result;
          }
        };
      }
    
      @Override
      SortedSet<Integer> filter(SortedSet<Integer> elements, Predicate<? super Integer> predicate) {
        return Sets.filter(elements, predicate);
      }
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue May 13 18:46:00 GMT 2025
    - 1.5K bytes
    - Click Count (0)
  5. 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);
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Mon Nov 17 22:50:48 GMT 2025
    - 43.6K bytes
    - Click Count (0)
  6. impl/maven-core/src/main/java/org/apache/maven/artifact/resolver/filter/ExclusionArtifactFilter.java

            this.exclusions = exclusions;
            this.predicates =
                    exclusions.stream().map(ExclusionArtifactFilter::toPredicate).collect(Collectors.toList());
        }
    
        @Override
        public boolean include(Artifact artifact) {
            return predicates.stream().noneMatch(p -> p.test(artifact));
        }
    
        private static Predicate<Artifact> toPredicate(Exclusion exclusion) {
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Fri Oct 25 12:31:46 GMT 2024
    - 3K bytes
    - Click Count (0)
  7. guava-tests/test/com/google/common/collect/FilteredMultimapTest.java

    import static com.google.common.collect.Multimaps.filterValues;
    import static java.util.Arrays.asList;
    
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.base.Predicate;
    import java.util.Map.Entry;
    import java.util.Objects;
    import junit.framework.TestCase;
    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Unit tests for {@link Multimaps} filtering methods.
     *
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Wed Feb 12 03:49:18 GMT 2025
    - 3.1K bytes
    - Click Count (0)
  8. 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)}.
       *
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue Sep 16 18:35:28 GMT 2025
    - 43.8K bytes
    - Click Count (0)
  9. guava-testlib/src/com/google/common/collect/testing/testers/ReflectionFreeAssertThrows.java

          Class<T> expectedThrowable, ThrowingSupplier supplier, boolean userPassedSupplier) {
        checkNotNull(expectedThrowable);
        checkNotNull(supplier);
        Predicate<Throwable> predicate = INSTANCE_OF.get(expectedThrowable);
        if (predicate == null) {
          throw new IllegalArgumentException(
              expectedThrowable
                  + " is not yet supported by ReflectionFreeAssertThrows. Add an entry for it in the"
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 6.9K bytes
    - Click Count (0)
  10. android/guava-tests/test/com/google/common/collect/FluentIterableTest.java

        Iterable<A> aIterable = ImmutableList.of();
        Iterable<B> bIterable = ImmutableList.of();
    
        Predicate<X> xPredicate = Predicates.alwaysTrue();
        Predicate<Y> yPredicate = Predicates.alwaysTrue();
    
        FluentIterable<?> unused =
            FluentIterable.concat(aIterable, bIterable).filter(xPredicate).filter(yPredicate);
    
        /* The following fails to compile:
         *
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 30.5K bytes
    - Click Count (0)
Back to Top