/libcore/ojluni/src/main/java/java/util/ |
H A D | Optional.java | 159 * If a value is present, and the value matches the given predicate, 163 * @param predicate a predicate to apply to the value, if present 165 * if a value is present and the value matches the given predicate, 167 * @throws NullPointerException if the predicate is null 169 public Optional<T> filter(Predicate<? super T> predicate) { argument 170 Objects.requireNonNull(predicate); 174 return predicate.test(value) ? this : empty();
|
/libcore/ojluni/src/main/java/java/util/stream/ |
H A D | MatchOps.java | 37 * quantified predicate matching on the elements of a stream. Supported variants 51 /** Do all elements match the predicate? */ 54 /** Do any elements match the predicate? */ 57 /** Do no elements match the predicate? */ 71 * Constructs a quantified predicate matcher for a Stream. 74 * @param predicate the {@code Predicate} to apply to stream elements 79 public static <T> TerminalOp<T, Boolean> makeRef(Predicate<? super T> predicate, argument 81 Objects.requireNonNull(predicate); 90 if (!stop && predicate.test(t) == matchKind.stopOnPredicateMatches) { 101 * Constructs a quantified predicate matche 108 makeInt(IntPredicate predicate, MatchKind matchKind) argument 137 makeLong(LongPredicate predicate, MatchKind matchKind) argument 167 makeDouble(DoublePredicate predicate, MatchKind matchKind) argument [all...] |
H A D | DoubleStream.java | 79 * the given predicate. 84 * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>, 86 * predicate to apply to each element to determine if it 90 DoubleStream filter(DoublePredicate predicate); argument 595 * predicate. May not evaluate the predicate on all elements if not 597 * {@code false} is returned and the predicate is not evaluated. 604 * predicate over the elements of the stream (for some x P(x)). 606 * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>, 608 * predicate t 612 anyMatch(DoublePredicate predicate) argument 635 allMatch(DoublePredicate predicate) argument 658 noneMatch(DoublePredicate predicate) argument [all...] |
H A D | Stream.java | 155 * the given predicate. 160 * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>, 162 * predicate to apply to each element to determine if it 166 Stream<T> filter(Predicate<? super T> predicate); argument 855 * predicate. May not evaluate the predicate on all elements if not 857 * {@code false} is returned and the predicate is not evaluated. 864 * predicate over the elements of the stream (for some x P(x)). 866 * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>, 868 * predicate t 872 anyMatch(Predicate<? super T> predicate) argument 895 allMatch(Predicate<? super T> predicate) argument 918 noneMatch(Predicate<? super T> predicate) argument [all...] |
H A D | Collectors.java | 1103 * @param predicate a predicate used for classifying input elements 1109 Collector<T, ?, Map<Boolean, List<T>>> partitioningBy(Predicate<? super T> predicate) { argument 1110 return partitioningBy(predicate, toList()); 1126 * @param predicate a predicate used for classifying input elements 1135 Collector<T, ?, Map<Boolean, D>> partitioningBy(Predicate<? super T> predicate, argument 1139 downstreamAccumulator.accept(predicate.test(t) ? result.forTrue : result.forFalse, t);
|
H A D | DoublePipeline.java | 294 public final DoubleStream filter(DoublePredicate predicate) { argument 295 Objects.requireNonNull(predicate); 308 if (predicate.test(t)) 481 public final boolean anyMatch(DoublePredicate predicate) { argument 482 return evaluate(MatchOps.makeDouble(predicate, MatchOps.MatchKind.ANY)); 486 public final boolean allMatch(DoublePredicate predicate) { argument 487 return evaluate(MatchOps.makeDouble(predicate, MatchOps.MatchKind.ALL)); 491 public final boolean noneMatch(DoublePredicate predicate) { argument 492 return evaluate(MatchOps.makeDouble(predicate, MatchOps.MatchKind.NONE));
|
H A D | IntPipeline.java | 330 public final IntStream filter(IntPredicate predicate) { argument 331 Objects.requireNonNull(predicate); 344 if (predicate.test(t)) 477 public final boolean anyMatch(IntPredicate predicate) { argument 478 return evaluate(MatchOps.makeInt(predicate, MatchOps.MatchKind.ANY)); 482 public final boolean allMatch(IntPredicate predicate) { argument 483 return evaluate(MatchOps.makeInt(predicate, MatchOps.MatchKind.ALL)); 487 public final boolean noneMatch(IntPredicate predicate) { argument 488 return evaluate(MatchOps.makeInt(predicate, MatchOps.MatchKind.NONE));
|
H A D | IntStream.java | 77 * the given predicate. 82 * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>, 84 * predicate to apply to each element to determine if it 88 IntStream filter(IntPredicate predicate); argument 540 * predicate. May not evaluate the predicate on all elements if not 542 * {@code false} is returned and the predicate is not evaluated. 549 * predicate over the elements of the stream (for some x P(x)). 551 * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>, 553 * predicate t 557 anyMatch(IntPredicate predicate) argument 580 allMatch(IntPredicate predicate) argument 603 noneMatch(IntPredicate predicate) argument [all...] |
H A D | LongPipeline.java | 311 public final LongStream filter(LongPredicate predicate) { argument 312 Objects.requireNonNull(predicate); 325 if (predicate.test(t)) 459 public final boolean anyMatch(LongPredicate predicate) { argument 460 return evaluate(MatchOps.makeLong(predicate, MatchOps.MatchKind.ANY)); 464 public final boolean allMatch(LongPredicate predicate) { argument 465 return evaluate(MatchOps.makeLong(predicate, MatchOps.MatchKind.ALL)); 469 public final boolean noneMatch(LongPredicate predicate) { argument 470 return evaluate(MatchOps.makeLong(predicate, MatchOps.MatchKind.NONE));
|
H A D | LongStream.java | 81 * the given predicate. 86 * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>, 88 * predicate to apply to each element to determine if it 92 LongStream filter(LongPredicate predicate); argument 544 * predicate. May not evaluate the predicate on all elements if not 546 * {@code false} is returned and the predicate is not evaluated. 553 * predicate over the elements of the stream (for some x P(x)). 555 * @param predicate a <a href="package-summary.html#NonInterference">non-interfering</a>, 557 * predicate t 561 anyMatch(LongPredicate predicate) argument 584 allMatch(LongPredicate predicate) argument 607 noneMatch(LongPredicate predicate) argument [all...] |
H A D | ReferencePipeline.java | 161 public final Stream<P_OUT> filter(Predicate<? super P_OUT> predicate) { argument 162 Objects.requireNonNull(predicate); 175 if (predicate.test(u)) 450 public final boolean anyMatch(Predicate<? super P_OUT> predicate) { argument 451 return evaluate(MatchOps.makeRef(predicate, MatchOps.MatchKind.ANY)); 455 public final boolean allMatch(Predicate<? super P_OUT> predicate) { argument 456 return evaluate(MatchOps.makeRef(predicate, MatchOps.MatchKind.ALL)); 460 public final boolean noneMatch(Predicate<? super P_OUT> predicate) { argument 461 return evaluate(MatchOps.makeRef(predicate, MatchOps.MatchKind.NONE));
|
/libcore/metrictests/memory/host/src/libcore/heapmetrics/ |
H A D | HeapCategorization.java | 291 private boolean isOwnedByClassMatching(AhatInstance rooted, Predicate<String> predicate) { argument 303 return predicate.test(instance.asClassObj().getName()); 311 if (predicate.test(classObj.getName())) {
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
H A D | TabulatorsTest.java | 144 private final Predicate<T> predicate; field in class:TabulatorsTest.PartitionAssertion 147 protected PartitionAssertion(Predicate<T> predicate, argument 149 this.predicate = predicate; 159 downstream.assertValue(map.get(true), () -> source.get().filter(predicate), ordered); 160 downstream.assertValue(map.get(false), () -> source.get().filter(predicate.negate()), ordered);
|
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/ |
H A D | LambdaTestHelpers.java | 127 public static <T, R> Function<T, R> forPredicate(Predicate<? super T> predicate, R forTrue, R forFalse) { argument 128 Objects.requireNonNull(predicate); 130 return t -> predicate.test(t) ? forTrue : forFalse;
|
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
H A D | LambdaTestHelpers.java | 128 public static <T, R> Function<T, R> forPredicate(Predicate<? super T> predicate, R forTrue, R forFalse) { argument 129 Objects.requireNonNull(predicate); 131 return t -> predicate.test(t) ? forTrue : forFalse;
|