Home
last modified time | relevance | path

Searched refs:Predicate (Results 1 – 25 of 38) sorted by relevance

12

/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/lang/invoke/
DSerializedLambdaTest.java43 import java.util.function.Predicate;
73 private void assertNotSerial(Predicate<String> p, Consumer<Predicate<String>> asserter) in assertNotSerial()
102 Predicate<String> pred = (Predicate<String> & Serializable) s -> true; in testSimpleSerializedInstantiation()
105 assertTrue(p instanceof Predicate); in testSimpleSerializedInstantiation()
111 interface SerPredicate<T> extends Predicate<T>, Serializable { }
118 assertTrue(p instanceof Predicate); in testSimpleSerializedInstantiation2()
128 Predicate<String> pred = (Predicate<String>) s -> true; in testNonserializableInstantiation()
131 assertTrue(p instanceof Predicate); in testNonserializableInstantiation()
141 Predicate<String> foo(int x) { in testSerializeCapturingInt()
142 return (Predicate<String> & Serializable) s -> s.length() >= x; in testSerializeCapturingInt()
[all …]
/libcore/ojluni/src/main/java/java/util/function/
DPredicate.java40 public interface Predicate<T> { interface
67 default Predicate<T> and(Predicate<? super T> other) { in and()
79 default Predicate<T> negate() { in negate()
99 default Predicate<T> or(Predicate<? super T> other) { in or()
114 static <T> Predicate<T> isEqual(Object targetRef) { in isEqual()
/libcore/luni/src/test/java/libcore/java/util/function/
DPredicateTest.java22 import java.util.function.Predicate;
36 Predicate<Object> alwaysTrue = in testAnd()
38 Predicate<Object> alwaysTrue2 = in testAnd()
40 Predicate<Object> alwaysFalse = in testAnd()
42 Predicate<Object> alwaysFalse2 = in testAnd()
68 Predicate<Object> alwaysTrue = x -> { assertSame(arg, x); return true; }; in testAnd_null()
76 Predicate<Object> alwaysTrue = x -> true; in testNegate()
79 Predicate<Object> alwaysFalse = x -> false; in testNegate()
93 Predicate<Object> alwaysTrue = in testOr()
95 Predicate<Object> alwaysTrue2 = in testOr()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DRemoveIfTester.java21 import java.util.function.Predicate;
32 private static final Predicate<Integer> isEven = x -> x % 2 == 0;
33 private static final Predicate<Integer> isOdd = isEven.negate();
DOptionalTest.java27 import java.util.function.Predicate;
88 Predicate<String> alwaysFail = s -> { fail(); return true; }; in testFilter()
97 Predicate<String> alwaysTrue = s -> true; in testFilter()
98 Predicate<String> alwaysFalse = s -> false; in testFilter()
/libcore/ojluni/src/main/java/java/util/stream/
DStream.java45 import java.util.function.Predicate;
169 Stream<T> filter(Predicate<? super T> predicate); in filter()
875 boolean anyMatch(Predicate<? super T> predicate); in anyMatch()
898 boolean allMatch(Predicate<? super T> predicate); in allMatch()
921 boolean noneMatch(Predicate<? super T> predicate); in noneMatch()
DFindOps.java33 import java.util.function.Predicate;
112 final Predicate<O> presentPredicate;
130 Predicate<O> presentPredicate, in FindOp()
DBaseStream.java35 import java.util.function.Predicate;
DReferencePipeline.java42 import java.util.function.Predicate;
169 public final Stream<P_OUT> filter(Predicate<? super P_OUT> predicate) {
466 public final boolean anyMatch(Predicate<? super P_OUT> predicate) {
471 public final boolean allMatch(Predicate<? super P_OUT> predicate) {
476 public final boolean noneMatch(Predicate<? super P_OUT> predicate) {
DMatchOps.java32 import java.util.function.Predicate;
79 public static <T> TerminalOp<T, Boolean> makeRef(Predicate<? super T> predicate, in makeRef()
/libcore/ojluni/src/main/java/java/util/
DCollection.java28 import java.util.function.Predicate;
409 default boolean removeIf(Predicate<? super E> filter) { in removeIf()
DOptional.java29 import java.util.function.Predicate;
169 public Optional<T> filter(Predicate<? super T> predicate) { in filter()
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DMatchOpTest.java44 import java.util.function.Predicate;
82 private static final Predicate<Integer>[] INTEGER_PREDICATES
83 = (Predicate<Integer>[]) new Predicate<?>[]{pTrue, pFalse, pEven, pOdd};
87 … = new HashMap<Kind, Function<Predicate<Integer>, Function<Stream<Integer>, Boolean>>>() {{
94 private <T> Map<Kind, Function<Predicate<T>, Function<Stream<T>, Boolean>>> kinds() { in kinds()
95 return (Map<Kind, Function<Predicate<T>, Function<Stream<T>, Boolean>>>) kinds; in kinds()
98 …private <T> void assertPredicates(List<T> source, Kind kind, Predicate<T>[] predicates, boolean...… in assertPredicates()
122 for (Predicate<Integer> p : INTEGER_PREDICATES) { in testStream()
DTabulatorsTest.java45 import java.util.function.Predicate;
144 private final Predicate<T> predicate;
147 protected PartitionAssertion(Predicate<T> predicate, in PartitionAssertion()
577 Predicate<Integer> classifier = i -> i % 3 == 0;
590 Predicate<Integer> classifier = i -> i % 3 == 0;
591 Predicate<Integer> classifier2 = i -> i % 7 == 0;
/libcore/ojluni/src/main/java/java/util/concurrent/
DCopyOnWriteArraySet.java46 import java.util.function.Predicate;
415 public boolean removeIf(Predicate<? super E> filter) { in removeIf()
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
DLambdaTestHelpers.java42 import java.util.function.Predicate;
81 public static final Predicate<Integer> pFalse = x -> false;
82 public static final Predicate<Integer> pTrue = x -> true;
83 public static final Predicate<Integer> pEven = x -> 0 == x % 2;
84 public static final Predicate<Integer> pOdd = x -> 1 == x % 2;
127 …public static <T, R> Function<T, R> forPredicate(Predicate<? super T> predicate, R forTrue, R forF… in forPredicate()
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
DLambdaTestHelpers.java43 import java.util.function.Predicate;
82 public static final Predicate<Integer> pFalse = x -> false;
83 public static final Predicate<Integer> pTrue = x -> true;
84 public static final Predicate<Integer> pEven = x -> 0 == x % 2;
85 public static final Predicate<Integer> pOdd = x -> 1 == x % 2;
128 …public static <T, R> Function<T, R> forPredicate(Predicate<? super T> predicate, R forTrue, R forF… in forPredicate()
/libcore/metrictests/memory/host/src/libcore/heapmetrics/
DHeapCategorization.java33 import java.util.function.Predicate;
291 private boolean isOwnedByClassMatching(AhatInstance rooted, Predicate<String> predicate) { in isOwnedByClassMatching()
/libcore/ojluni/annotations/hiddenapi/java/util/concurrent/
DCopyOnWriteArraySet.java112 public boolean removeIf(java.util.function.Predicate<? super E> filter) { in removeIf()
DCopyOnWriteArrayList.java195 public boolean removeIf(java.util.function.Predicate<? super E> filter) { in removeIf()
407 public boolean removeIf(java.util.function.Predicate<? super E> filter) { in removeIf()
/libcore/ojluni/annotations/sdk/nullability/java/util/
DCollection.annotated.java57 public default boolean removeIf(@libcore.util.NonNull java.util.function.Predicate<? super @libcore… in removeIf()
DArrayList.annotated.java97 public boolean removeIf(@libcore.util.NonNull java.util.function.Predicate<? super @libcore.util.Nu… in removeIf()
/libcore/ojluni/src/main/java/java/util/regex/
DPattern.java39 import java.util.function.Predicate;
1447 public Predicate<String> asPredicate() { in asPredicate()
/libcore/ojluni/annotations/sdk/nullability/java/util/regex/
DPattern.annotated.java56 @libcore.util.NonNull public java.util.function.Predicate<java.lang.@libcore.util.NonNull String> a… in asPredicate()
/libcore/ojluni/annotations/sdk/nullability/java/util/concurrent/
DCopyOnWriteArrayList.annotated.java104 public boolean removeIf(@libcore.util.NonNull java.util.function.Predicate<? super @libcore.util.Nu… in removeIf()

12