Home
last modified time | relevance | path

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

123

/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()
136 static <T> Predicate<T> not(Predicate<? super T> target) { in not()
138 return (Predicate<T>)target.negate(); in not()
/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/ojluni/src/test/java/util/function/
DPredicateNotTest.java37 import java.util.function.Predicate;
53 MethodType notType = MethodType.methodType(Predicate.class, Predicate.class); in initializeNot()
54 return MethodHandles.lookup().findStatic(Predicate.class, "not", notType); in initializeNot()
60 static <T> Predicate<T> not(Predicate<? super T> target) { in not()
62 return (Predicate<T>) NOT.invoke(target); in not()
69 static class IsEmptyPredicate implements Predicate<String> {
/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;
89 Predicate<String> alwaysFail = s -> { fail(); return true; }; in testFilter()
98 Predicate<String> alwaysTrue = s -> true; in testFilter()
99 Predicate<String> alwaysFalse = s -> false; in testFilter()
/libcore/ojluni/src/main/java/java/util/stream/
DStream.java40 import java.util.function.Predicate;
179 Stream<T> filter(Predicate<? super T> predicate); in filter()
759 default Stream<T> takeWhile(Predicate<? super T> predicate) {
825 default Stream<T> dropWhile(Predicate<? super T> predicate) {
1286 boolean anyMatch(Predicate<? super T> predicate);
1309 boolean allMatch(Predicate<? super T> predicate);
1332 boolean noneMatch(Predicate<? super T> predicate);
1514 … public static<T> Stream<T> iterate(T seed, Predicate<? super T> hasNext, UnaryOperator<T> next) {
DReferencePipeline.java45 import java.util.function.Predicate;
175 public final Stream<P_OUT> filter(Predicate<? super P_OUT> predicate) {
606 public final Stream<P_OUT> takeWhile(Predicate<? super P_OUT> predicate) {
611 public final Stream<P_OUT> dropWhile(Predicate<? super P_OUT> predicate) {
655 public final boolean anyMatch(Predicate<? super P_OUT> predicate) {
660 public final boolean allMatch(Predicate<? super P_OUT> predicate) {
665 public final boolean noneMatch(Predicate<? super P_OUT> predicate) {
DBaseStream.java35 import java.util.function.Predicate;
DFindOps.java33 import java.util.function.Predicate;
110 final Predicate<O> presentPredicate;
128 Predicate<O> presentPredicate, in FindOp()
DMatchOps.java32 import java.util.function.Predicate;
79 public static <T> TerminalOp<T, Boolean> makeRef(Predicate<? super T> predicate, in makeRef()
/libcore/tools/openjdk-analyzer/src/libcore/tools/analyzer/openjdk/
DSignaturesCollector.java34 import java.util.function.Predicate;
45 private Predicate<String> mClassPredicate = (c) -> true;
46 private Predicate<Field> mFieldPredicate = (f) -> true;
47 private Predicate<Method> mMethodPredicate = (m) -> true;
157 public SignaturesCollector setClassFilter(Predicate<String> predicate) { in setClassFilter()
162 public SignaturesCollector setFieldFilter(Predicate<Field> predicate) { in setFieldFilter()
167 public SignaturesCollector setMethodFilter(Predicate<Method> predicate) { in setMethodFilter()
DDependencyAnalyzer.java48 import java.util.function.Predicate;
112 Predicate<String> baseClassNamePredicate = (s) -> in analyze()
116 Predicate<SignaturesCollector.Method> baseMethodPredicate = (m) -> in analyze()
120 Predicate<SignaturesCollector.Field> baseFieldPredicate = (m) -> in analyze()
132 Predicate<String> classNamePredicate = baseClassNamePredicate in analyze()
136 Predicate<SignaturesCollector.Method> methodPredicate = baseMethodPredicate in analyze()
139 Predicate<SignaturesCollector.Field> fieldPredicate = baseFieldPredicate in analyze()
251 static class ExcludeClasspathFilter implements Predicate<MemberInfo>, Closeable {
563 static class ExpectedUpstreamFilter implements Predicate<MemberInfo> {
DMain.java48 import java.util.function.Predicate;
262 .filter(Predicate.not(Objects::isNull)) in getImpliedMethods()
594 Predicate<String> classNamePredicate; in run()
599 classNamePredicate = Predicate.not(unsupportedApis::contains); in run()
600 collector.setFieldFilter(Predicate.not(unsupportedApis::contains)); in run()
601 collector.setMethodFilter(Predicate.not(unsupportedApis::contains)); in run()
607 Predicate<String> nameTest = Pattern.compile( in run()
665 Predicate<String> classNamePredicate) throws IOException { in isClassExposed()
/libcore/ojluni/src/main/java/java/util/
DCollection.java29 import java.util.function.Predicate;
571 default boolean removeIf(Predicate<? super E> filter) { in removeIf()
DOptional.java29 import java.util.function.Predicate;
213 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()
DCollectorsTest.java46 import java.util.function.Predicate;
125 private final Predicate<T> filter;
128 public FilteringAssertion(Predicate<T> filter, CollectorAssertion<T, R> downstream) { in FilteringAssertion()
204 private final Predicate<T> predicate;
207 PartitioningByAssertion(Predicate<T> predicate, CollectorAssertion<T, D> downstream) { in PartitioningByAssertion()
597 Predicate<Integer> filteringByMod2 = i -> i % 2 == 0;
598 Predicate<Integer> filteringByUnder100 = i -> i % 2 < 100;
599 Predicate<Integer> filteringByTrue = i -> true;
600 Predicate<Integer> filteringByFalse = i -> false;
731 Predicate<Integer> classifier = i -> i % 3 == 0;
[all …]
/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()
58 @libcore.util.NonNull public java.util.function.Predicate<java.lang.@libcore.util.NonNull String> a… in asMatchPredicate()
/libcore/ojluni/src/main/java/java/util/concurrent/
DCopyOnWriteArraySet.java46 import java.util.function.Predicate;
417 public boolean removeIf(Predicate<? super E> filter) { in removeIf()
/libcore/ojluni/src/test/java/util/stream/Collectors/
DCollectorsTest.java44 import java.util.function.Predicate;
128 private final Predicate<T> filter;
131 public FilteringAssertion(Predicate<T> filter, CollectorAssertion<T, R> downstream) { in FilteringAssertion()
207 private final Predicate<T> predicate;
210 PartitioningByAssertion(Predicate<T> predicate, CollectorAssertion<T, D> downstream) { in PartitioningByAssertion()
579 Predicate<Integer> filteringByMod2 = i -> i % 2 == 0;
580 Predicate<Integer> filteringByUnder100 = i -> i % 2 < 100;
581 Predicate<Integer> filteringByTrue = i -> true;
582 Predicate<Integer> filteringByFalse = i -> false;
714 Predicate<Integer> classifier = i -> i % 3 == 0;
[all …]
/libcore/ojluni/src/test/java/util/Collection/
DCollectionDefaults.java50 import java.util.function.Predicate;
66 public static final Predicate<Integer> pEven = x -> 0 == x % 2;
67 public static final Predicate<Integer> pOdd = x -> 1 == x % 2;
/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;
83 public static final Predicate<Integer> pFalse = x -> false;
84 public static final Predicate<Integer> pTrue = x -> true;
85 public static final Predicate<Integer> pEven = x -> 0 == x % 2;
86 public static final Predicate<Integer> pOdd = x -> 1 == x % 2;
129 …public static <T, R> Function<T, R> forPredicate(Predicate<? super T> predicate, R forTrue, R forF… in forPredicate()
/libcore/ojluni/src/main/java/java/util/regex/
DPattern.java42 import java.util.function.Predicate;
5653 public Predicate<String> asPredicate() { in asPredicate()
5673 public Predicate<String> asMatchPredicate() { in asMatchPredicate()

123