Home
last modified time | relevance | path

Searched refs:predicate (Results 1 – 24 of 24) sorted by relevance

/libcore/ojluni/src/main/java/java/util/stream/
DMatchOps.java79 public static <T> TerminalOp<T, Boolean> makeRef(Predicate<? super T> predicate, in makeRef() argument
81 Objects.requireNonNull(predicate); in makeRef()
90 if (!stop && predicate.test(t) == matchKind.stopOnPredicateMatches) { in makeRef()
108 public static TerminalOp<Integer, Boolean> makeInt(IntPredicate predicate, in makeInt() argument
110 Objects.requireNonNull(predicate); in makeInt()
119 if (!stop && predicate.test(t) == matchKind.stopOnPredicateMatches) { in makeInt()
137 public static TerminalOp<Long, Boolean> makeLong(LongPredicate predicate, in makeLong() argument
139 Objects.requireNonNull(predicate); in makeLong()
149 if (!stop && predicate.test(t) == matchKind.stopOnPredicateMatches) { in makeLong()
167 public static TerminalOp<Double, Boolean> makeDouble(DoublePredicate predicate, in makeDouble() argument
[all …]
DDoubleStream.java87 DoubleStream filter(DoublePredicate predicate); in filter() argument
376 default DoubleStream takeWhile(DoublePredicate predicate) { in takeWhile() argument
377 Objects.requireNonNull(predicate); in takeWhile()
381 … new WhileOps.UnorderedWhileSpliterator.OfDouble.Taking(spliterator(), true, predicate), in takeWhile()
443 default DoubleStream dropWhile(DoublePredicate predicate) { in dropWhile() argument
444 Objects.requireNonNull(predicate); in dropWhile()
448 … new WhileOps.UnorderedWhileSpliterator.OfDouble.Dropping(spliterator(), true, predicate), in dropWhile()
835 boolean anyMatch(DoublePredicate predicate);
858 boolean allMatch(DoublePredicate predicate);
881 boolean noneMatch(DoublePredicate predicate);
DIntStream.java88 IntStream filter(IntPredicate predicate); in filter() argument
373 default IntStream takeWhile(IntPredicate predicate) { in takeWhile() argument
374 Objects.requireNonNull(predicate); in takeWhile()
378 new WhileOps.UnorderedWhileSpliterator.OfInt.Taking(spliterator(), true, predicate), in takeWhile()
439 default IntStream dropWhile(IntPredicate predicate) { in dropWhile() argument
440 Objects.requireNonNull(predicate); in dropWhile()
444 … new WhileOps.UnorderedWhileSpliterator.OfInt.Dropping(spliterator(), true, predicate), in dropWhile()
753 boolean anyMatch(IntPredicate predicate);
776 boolean allMatch(IntPredicate predicate);
799 boolean noneMatch(IntPredicate predicate);
DLongStream.java88 LongStream filter(LongPredicate predicate); in filter() argument
374 default LongStream takeWhile(LongPredicate predicate) { in takeWhile() argument
375 Objects.requireNonNull(predicate); in takeWhile()
379 … new WhileOps.UnorderedWhileSpliterator.OfLong.Taking(spliterator(), true, predicate), in takeWhile()
441 default LongStream dropWhile(LongPredicate predicate) { in dropWhile() argument
442 Objects.requireNonNull(predicate); in dropWhile()
446 … new WhileOps.UnorderedWhileSpliterator.OfLong.Dropping(spliterator(), true, predicate), in dropWhile()
754 boolean anyMatch(LongPredicate predicate);
777 boolean allMatch(LongPredicate predicate);
800 boolean noneMatch(LongPredicate predicate);
DWhileOps.java62 Predicate<? super T> predicate) { in makeTakeWhileRef() argument
63 Objects.requireNonNull(predicate); in makeTakeWhileRef()
75 helper.wrapSpliterator(spliterator), false, predicate); in makeTakeWhileRef()
101 if (take && (take = predicate.test(t))) { in makeTakeWhileRef()
122 IntPredicate predicate) {
123 Objects.requireNonNull(predicate);
135 … (Spliterator.OfInt) helper.wrapSpliterator(spliterator), false, predicate);
161 if (take && (take = predicate.test(t))) {
182 LongPredicate predicate) {
183 Objects.requireNonNull(predicate);
[all …]
DStream.java179 Stream<T> filter(Predicate<? super T> predicate); in filter() argument
759 default Stream<T> takeWhile(Predicate<? super T> predicate) {
760 Objects.requireNonNull(predicate);
764 … new WhileOps.UnorderedWhileSpliterator.OfRef.Taking<>(spliterator(), true, predicate),
825 default Stream<T> dropWhile(Predicate<? super T> predicate) {
826 Objects.requireNonNull(predicate);
830 … new WhileOps.UnorderedWhileSpliterator.OfRef.Dropping<>(spliterator(), true, predicate),
1286 boolean anyMatch(Predicate<? super T> predicate);
1309 boolean allMatch(Predicate<? super T> predicate);
1332 boolean noneMatch(Predicate<? super T> predicate);
DIntPipeline.java394 public final IntStream filter(IntPredicate predicate) {
395 Objects.requireNonNull(predicate);
409 if (predicate.test(t))
456 public final IntStream takeWhile(IntPredicate predicate) {
457 return WhileOps.makeTakeWhileInt(this, predicate);
461 public final IntStream dropWhile(IntPredicate predicate) {
462 return WhileOps.makeDropWhileInt(this, predicate);
554 public final boolean anyMatch(IntPredicate predicate) {
555 return evaluate(MatchOps.makeInt(predicate, MatchOps.MatchKind.ANY));
559 public final boolean allMatch(IntPredicate predicate) {
[all …]
DLongPipeline.java376 public final LongStream filter(LongPredicate predicate) {
377 Objects.requireNonNull(predicate);
391 if (predicate.test(t))
438 public final LongStream takeWhile(LongPredicate predicate) {
439 return WhileOps.makeTakeWhileLong(this, predicate);
443 public final LongStream dropWhile(LongPredicate predicate) {
444 return WhileOps.makeDropWhileLong(this, predicate);
537 public final boolean anyMatch(LongPredicate predicate) {
538 return evaluate(MatchOps.makeLong(predicate, MatchOps.MatchKind.ANY));
542 public final boolean allMatch(LongPredicate predicate) {
[all …]
DDoublePipeline.java360 public final DoubleStream filter(DoublePredicate predicate) {
361 Objects.requireNonNull(predicate);
375 if (predicate.test(t))
424 public final DoubleStream takeWhile(DoublePredicate predicate) {
425 return WhileOps.makeTakeWhileDouble(this, predicate);
429 public final DoubleStream dropWhile(DoublePredicate predicate) {
430 return WhileOps.makeDropWhileDouble(this, predicate);
562 public final boolean anyMatch(DoublePredicate predicate) {
563 return evaluate(MatchOps.makeDouble(predicate, MatchOps.MatchKind.ANY));
567 public final boolean allMatch(DoublePredicate predicate) {
[all …]
DReferencePipeline.java175 public final Stream<P_OUT> filter(Predicate<? super P_OUT> predicate) {
176 Objects.requireNonNull(predicate);
190 if (predicate.test(u))
606 public final Stream<P_OUT> takeWhile(Predicate<? super P_OUT> predicate) {
607 return WhileOps.makeTakeWhileRef(this, predicate);
611 public final Stream<P_OUT> dropWhile(Predicate<? super P_OUT> predicate) {
612 return WhileOps.makeDropWhileRef(this, predicate);
655 public final boolean anyMatch(Predicate<? super P_OUT> predicate) {
656 return evaluate(MatchOps.makeRef(predicate, MatchOps.MatchKind.ANY));
660 public final boolean allMatch(Predicate<? super P_OUT> predicate) {
[all …]
DCollectors.java561 Collector<T, ?, R> filtering(Predicate<? super T> predicate,
566 if (predicate.test(t)) {
1359 Collector<T, ?, Map<Boolean, List<T>>> partitioningBy(Predicate<? super T> predicate) {
1360 return partitioningBy(predicate, toList());
1393 Collector<T, ?, Map<Boolean, D>> partitioningBy(Predicate<? super T> predicate,
1397 … downstreamAccumulator.accept(predicate.test(t) ? result.forTrue : result.forFalse, t);
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
DDefaultMethodStreams.java187 public Stream<T> filter(Predicate<? super T> predicate) { in filter() argument
188 return s.filter(predicate); in filter()
322 public boolean anyMatch(Predicate<? super T> predicate) { in anyMatch() argument
323 return s.anyMatch(predicate); in anyMatch()
327 public boolean allMatch(Predicate<? super T> predicate) { in allMatch() argument
328 return s.allMatch(predicate); in allMatch()
332 public boolean noneMatch(Predicate<? super T> predicate) { in noneMatch() argument
333 return s.noneMatch(predicate); in noneMatch()
398 public IntStream filter(IntPredicate predicate) { in filter() argument
399 return s.filter(predicate); in filter()
[all …]
DLambdaTestHelpers.java129 …public static <T, R> Function<T, R> forPredicate(Predicate<? super T> predicate, R forTrue, R forF… in forPredicate() argument
130 Objects.requireNonNull(predicate); in forPredicate()
132 return t -> predicate.test(t) ? forTrue : forFalse; in forPredicate()
/libcore/ojluni/annotations/flagged_api/java/util/stream/
DDoubleStream.annotated.java31 public java.util.stream.DoubleStream filter(java.util.function.DoublePredicate predicate); in filter() argument
57 public default java.util.stream.DoubleStream takeWhile(java.util.function.DoublePredicate predicate in takeWhile() argument
60 public default java.util.stream.DoubleStream dropWhile(java.util.function.DoublePredicate predicate in dropWhile() argument
86 public boolean anyMatch(java.util.function.DoublePredicate predicate); in anyMatch() argument
88 public boolean allMatch(java.util.function.DoublePredicate predicate); in allMatch() argument
90 public boolean noneMatch(java.util.function.DoublePredicate predicate); in noneMatch() argument
DIntStream.annotated.java31 public java.util.stream.IntStream filter(java.util.function.IntPredicate predicate); in filter() argument
57 public default java.util.stream.IntStream takeWhile(java.util.function.IntPredicate predicate) { th… in takeWhile() argument
60 public default java.util.stream.IntStream dropWhile(java.util.function.IntPredicate predicate) { th… in dropWhile() argument
86 public boolean anyMatch(java.util.function.IntPredicate predicate); in anyMatch() argument
88 public boolean allMatch(java.util.function.IntPredicate predicate); in allMatch() argument
90 public boolean noneMatch(java.util.function.IntPredicate predicate); in noneMatch() argument
DLongStream.annotated.java31 public java.util.stream.LongStream filter(java.util.function.LongPredicate predicate); in filter() argument
57 public default java.util.stream.LongStream takeWhile(java.util.function.LongPredicate predicate) { … in takeWhile() argument
60 public default java.util.stream.LongStream dropWhile(java.util.function.LongPredicate predicate) { … in dropWhile() argument
86 public boolean anyMatch(java.util.function.LongPredicate predicate); in anyMatch() argument
88 public boolean allMatch(java.util.function.LongPredicate predicate); in allMatch() argument
90 public boolean noneMatch(java.util.function.LongPredicate predicate); in noneMatch() argument
DCollectors.annotated.java53 …ream.Collector<T,?,R> filtering(java.util.function.Predicate<? super T> predicate, java.util.strea… in filtering() argument
93 …a.util.List<T>>> partitioningBy(java.util.function.Predicate<? super T> predicate) { throw new Run… in partitioningBy() argument
95 …lang.Boolean,D>> partitioningBy(java.util.function.Predicate<? super T> predicate, java.util.strea… in partitioningBy() argument
/libcore/ojluni/src/main/java/java/util/
DOptional.java213 public Optional<T> filter(Predicate<? super T> predicate) { in filter() argument
214 Objects.requireNonNull(predicate); in filter()
218 return predicate.test(value) ? this : empty(); in filter()
/libcore/tools/openjdk-analyzer/src/libcore/tools/analyzer/openjdk/
DSignaturesCollector.java157 public SignaturesCollector setClassFilter(Predicate<String> predicate) { in setClassFilter() argument
158 this.mClassPredicate = predicate; in setClassFilter()
162 public SignaturesCollector setFieldFilter(Predicate<Field> predicate) { in setFieldFilter() argument
163 this.mFieldPredicate = predicate; in setFieldFilter()
167 public SignaturesCollector setMethodFilter(Predicate<Method> predicate) { in setMethodFilter() argument
168 this.mMethodPredicate = predicate; in setMethodFilter()
/libcore/metrictests/memory/host/src/libcore/heapmetrics/
DHeapCategorization.java291 private boolean isOwnedByClassMatching(AhatInstance rooted, Predicate<String> predicate) { in isOwnedByClassMatching() argument
303 return predicate.test(instance.asClassObj().getName()); in isOwnedByClassMatching()
311 if (predicate.test(classObj.getName())) { in isOwnedByClassMatching()
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DTabulatorsTest.java144 private final Predicate<T> predicate; field in TabulatorsTest.PartitionAssertion
147 protected PartitionAssertion(Predicate<T> predicate, in PartitionAssertion() argument
149 this.predicate = predicate; in PartitionAssertion()
159 downstream.assertValue(map.get(true), () -> source.get().filter(predicate), ordered); in assertValue()
160 … downstream.assertValue(map.get(false), () -> source.get().filter(predicate.negate()), ordered); in assertValue()
DCollectorsTest.java204 private final Predicate<T> predicate; field in CollectorsTest.PartitioningByAssertion
207 PartitioningByAssertion(Predicate<T> predicate, CollectorAssertion<T, D> downstream) { in PartitioningByAssertion() argument
208 this.predicate = predicate; in PartitioningByAssertion()
219 downstream.assertValue(map.get(true), () -> source.get().filter(predicate), ordered); in assertValue()
220 … downstream.assertValue(map.get(false), () -> source.get().filter(predicate.negate()), ordered); in assertValue()
/libcore/ojluni/src/test/java/util/stream/Collectors/
DCollectorsTest.java207 private final Predicate<T> predicate; field in CollectorsTest.PartitioningByAssertion
210 PartitioningByAssertion(Predicate<T> predicate, CollectorAssertion<T, D> downstream) { in PartitioningByAssertion() argument
211 this.predicate = predicate; in PartitioningByAssertion()
222 downstream.assertValue(map.get(true), () -> source.get().filter(predicate), ordered); in assertValue()
223 … downstream.assertValue(map.get(false), () -> source.get().filter(predicate.negate()), ordered); in assertValue()
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
DLambdaTestHelpers.java127 …public static <T, R> Function<T, R> forPredicate(Predicate<? super T> predicate, R forTrue, R forF… in forPredicate() argument
128 Objects.requireNonNull(predicate); in forPredicate()
130 return t -> predicate.test(t) ? forTrue : forFalse; in forPredicate()