T
- the type of the input to the predicate@FunctionalInterface
public interface IOPredicate<T>
Predicate
but throws IOException
.Modifier and Type | Method and Description |
---|---|
static <T> IOPredicate<T> |
alwaysFalse()
Always false.
|
static <T> IOPredicate<T> |
alwaysTrue()
Always true.
|
default IOPredicate<T> |
and(IOPredicate<? super T> other)
Creates a composed predicate that represents a short-circuiting logical AND of this predicate and another.
|
default java.util.function.Predicate<T> |
asPredicate()
Creates a
Predicate for this instance that throws UncheckedIOException instead of
IOException . |
static <T> IOPredicate<T> |
isEqual(java.lang.Object target)
Creates a predicate that tests if two arguments are equal using
Objects.equals(Object, Object) . |
default IOPredicate<T> |
negate()
Creates a predicate that represents the logical negation of this predicate.
|
default IOPredicate<T> |
or(IOPredicate<? super T> other)
Creates a composed predicate that represents a short-circuiting logical OR of this predicate and another.
|
boolean |
test(T t)
Evaluates this predicate on the given argument.
|
static <T> IOPredicate<T> alwaysFalse()
T
- the type of the input to the predicatestatic <T> IOPredicate<T> alwaysTrue()
T
- the type of the input to the predicatestatic <T> IOPredicate<T> isEqual(java.lang.Object target)
Objects.equals(Object, Object)
.T
- the type of arguments to the predicatetarget
- the object to compare for equality, may be null
Objects.equals(Object, Object)
default IOPredicate<T> and(IOPredicate<? super T> other)
false
, then the other
predicate is not
evaluated.
Any exceptions thrown during evaluation of either predicate are relayed to the caller; if evaluation of this
predicate throws an exception, the other
predicate will not be evaluated.
other
- a predicate that will be logically-ANDed with this predicateother
predicatejava.lang.NullPointerException
- if other is nulldefault java.util.function.Predicate<T> asPredicate()
Predicate
for this instance that throws UncheckedIOException
instead of
IOException
.default IOPredicate<T> negate()
default IOPredicate<T> or(IOPredicate<? super T> other)
true
, then the other
predicate is not
evaluated.
Any exceptions thrown during evaluation of either predicate are relayed to the caller; if evaluation of this
predicate throws an exception, the other
predicate will not be evaluated.
other
- a predicate that will be logically-ORed with this predicateother
predicatejava.lang.NullPointerException
- if other is nullboolean test(T t) throws java.io.IOException
t
- the input argumenttrue
if the input argument matches the predicate, otherwise false
java.io.IOException
- if an I/O error occurs.Copyright © 2010 - 2023 Adobe. All Rights Reserved