Uses of Interface
java.util.function.Predicate
Package
Description
Provides a simple high-level Http server API, which can be used to build
embedded HTTP servers.
Provides for system input and output through data streams,
serialization and the file system.
Provides classfile parsing, generation, and transformation library.
Contains the collections framework, some internationalization support classes,
a service loader, properties, random number generation, string parsing
and scanning classes, base64 encoding and decoding, a bit array, and
several miscellaneous utility classes.
Utility classes commonly useful in concurrent programming.
Functional interfaces provide target types for lambda expressions
and method references.
Classes for matching character sequences against patterns specified
by regular expressions.
Classes to support functional-style operations on streams of elements, such
as map-reduce transformations on collections.
This package contains classes for consuming Flight Recorder data.
-
Uses of Predicate in com.sun.net.httpserver
Modifier and TypeMethodDescriptionstatic HttpHandler
HttpHandlers.handleOrElse
(Predicate<Request> handlerTest, HttpHandler handler, HttpHandler fallbackHandler) Complements a conditionalHttpHandler
with another handler. -
Uses of Predicate in java.io
Modifier and TypeMethodDescriptionstatic ObjectInputFilter
ObjectInputFilter.allowFilter
(Predicate<Class<?>> predicate, ObjectInputFilter.Status otherStatus) Returns a filter that returnsStatus.ALLOWED
if the predicate on the class istrue
.static ObjectInputFilter
ObjectInputFilter.rejectFilter
(Predicate<Class<?>> predicate, ObjectInputFilter.Status otherStatus) Returns a filter that returnsStatus.REJECTED
if the predicate on the class istrue
. -
Uses of Predicate in java.lang.classfilePREVIEW
Modifier and TypeMethodDescriptionstatic ClassTransformPREVIEW
ClassTransform.dropping
(Predicate<ClassElementPREVIEW> filter) Create a class transform that passes each element through to the builder, except for those that the suppliedPredicate
is true for.static FieldTransformPREVIEW
FieldTransform.dropping
(Predicate<FieldElementPREVIEW> filter) Create a field transform that passes each element through to the builder, except for those that the suppliedPredicate
is true for.static MethodTransformPREVIEW
MethodTransform.dropping
(Predicate<MethodElementPREVIEW> filter) Create a method transform that passes each element through to the builder, except for those that the suppliedPredicate
is true for.static ClassTransformPREVIEW
ClassTransform.transformingMethodBodies
(Predicate<MethodModelPREVIEW> filter, CodeTransformPREVIEW xform) Create a class transform that transforms theCodeAttribute
PREVIEW (method body) ofMethodModel
PREVIEW elements with the supplied code transform.static ClassTransformPREVIEW
ClassTransform.transformingMethods
(Predicate<MethodModelPREVIEW> filter, MethodTransformPREVIEW xform) Create a class transform that transformsMethodModel
PREVIEW elements with the supplied method transform. -
Uses of Predicate in java.util
Modifier and TypeMethodDescriptionIf a value is present, and the value matches the given predicate, returns anOptional
describing the value, otherwise returns an emptyOptional
.boolean
boolean
default boolean
Removes all of the elements of this collection that satisfy the given predicate (optional operation).boolean
boolean
-
Uses of Predicate in java.util.concurrent
Modifier and TypeMethodDescriptionboolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
ModifierConstructorDescriptionForkJoinPool
(int parallelism, ForkJoinPool.ForkJoinWorkerThreadFactory factory, Thread.UncaughtExceptionHandler handler, boolean asyncMode, int corePoolSize, int maximumPoolSize, int minimumRunnable, Predicate<? super ForkJoinPool> saturate, long keepAliveTime, TimeUnit unit) Creates aForkJoinPool
with the given parameters. -
Uses of Predicate in java.util.function
Modifier and TypeMethodDescriptionReturns a composed predicate that represents a short-circuiting logical AND of this predicate and another.static <T> Predicate
<T> Returns a predicate that tests if two arguments are equal according toObjects.equals(Object, Object)
.Predicate.negate()
Returns a predicate that represents the logical negation of this predicate.static <T> Predicate
<T> Returns a predicate that is the negation of the supplied predicate.Returns a composed predicate that represents a short-circuiting logical OR of this predicate and another.Modifier and TypeMethodDescriptionReturns a composed predicate that represents a short-circuiting logical AND of this predicate and another.static <T> Predicate
<T> Returns a predicate that is the negation of the supplied predicate.Returns a composed predicate that represents a short-circuiting logical OR of this predicate and another. -
Uses of Predicate in java.util.regex
Modifier and TypeMethodDescriptionPattern.asMatchPredicate()
Creates a predicate that tests if this pattern matches a given input string.Pattern.asPredicate()
Creates a predicate that tests if this pattern is found in a given input string. -
Uses of Predicate in java.util.stream
Modifier and TypeMethodDescriptionboolean
Returns whether all elements of this stream match the provided predicate.boolean
Returns whether any elements of this stream match the provided predicate.Returns, if this stream is ordered, a stream consisting of the remaining elements of this stream after dropping the longest prefix of elements that match the given predicate.Returns a stream consisting of the elements of this stream that match the given predicate.static <T,
A, R> Collector <T, ?, R> Adapts aCollector
to one accepting elements of the same typeT
by applying the predicate to each input element and only accumulating if the predicate returnstrue
.static <T> Stream
<T> Stream.iterate
(T seed, Predicate<? super T> hasNext, UnaryOperator<T> next) Returns a sequential orderedStream
produced by iterative application of the givennext
function to an initial element, conditioned on satisfying the givenhasNext
predicate.boolean
Returns whether no elements of this stream match the provided predicate.Collectors.partitioningBy
(Predicate<? super T> predicate) Returns aCollector
which partitions the input elements according to aPredicate
, and organizes them into aMap<Boolean, List<T>>
.Collectors.partitioningBy
(Predicate<? super T> predicate, Collector<? super T, A, D> downstream) Returns aCollector
which partitions the input elements according to aPredicate
, reduces the values in each partition according to anotherCollector
, and organizes them into aMap<Boolean, D>
whose values are the result of the downstream reduction.Returns, if this stream is ordered, a stream consisting of the longest prefix of elements taken from this stream that match the given predicate. -
Uses of Predicate in jdk.jfr.consumer
Modifier and TypeMethodDescriptionvoid
RecordingFile.write
(Path destination, Predicate<RecordedEvent> filter) Filter out events and write them to a new file.