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 Predicate<T> |
asPredicate()
|
static <T> IOPredicate<T> |
isEqual(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(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
predicateNullPointerException
- if other is nulldefault Predicate<T> asPredicate()
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
predicateNullPointerException
- if other is nullboolean test(T t) throws IOException
t
- the input argumenttrue
if the input argument matches the predicate, otherwise false
IOException
- if an I/O error occurs.Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.