Package com.globalmentor.io.function
Interface IOPredicate<T>
- Type Parameters:
T
- the type of the input to the predicate
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a predicate (boolean-valued function) of one argument.
This interface is similar to Predicate
except that it is allowed to throw an IOException
.
- Author:
- Magno N A Cruz
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault IOPredicate<T>
and
(IOPredicate<? super T> other) This method is the same asPredicate.and(Predicate)
, but with a support forIOException
.static <T> IOPredicate<T>
This method is the same asPredicate.isEqual(Object)
, but with a support forIOException
.default IOPredicate<T>
negate()
This method is the same asPredicate.negate()
, but with a support forIOException
.default IOPredicate<T>
or
(IOPredicate<? super T> other) This method is the same asPredicate.or(Predicate)
, but with a support forIOException
.boolean
This method is the same asPredicate.test(Object)
, but with a support forIOException
.
-
Method Details
-
test
This method is the same as
Predicate.test(Object)
, but with a support forIOException
.- Parameters:
t
- The input argument.- Returns:
true
if the input argument matches the predicate,false
if not.- Throws:
IOException
- if there is an I/O error performing the operation.
-
and
This method is the same as
Predicate.and(Predicate)
, but with a support forIOException
.- Parameters:
other
- A predicate that will be logically-ANDed with this predicate.- Returns:
- A composed predicate that represents the short-circuiting logical AND of this predicate and the
other
predicate. - Throws:
IOException
- if there is an I/O error performing the operation.
-
negate
This method is the same as
Predicate.negate()
, but with a support forIOException
.- Returns:
- A predicate that represents the logical negation of this predicate.
- Throws:
IOException
- if there is an I/O error performing the operation.
-
or
This method is the same as
Predicate.or(Predicate)
, but with a support forIOException
.- Parameters:
other
- A predicate that will be logically-ORed with this predicate.- Returns:
- A composed predicate that represents the short-circuiting logical OR of this predicate and the
other
predicate. - Throws:
IOException
- if there is an I/O error performing the operation.
-
isEqual
This method is the same as
Predicate.isEqual(Object)
, but with a support forIOException
.- Type Parameters:
T
- The type of arguments to the predicate.- Parameters:
targetRef
- The object reference with which to compare for equality, which may benull
.- Returns:
- A predicate that tests if two arguments are equal according to
Objects.equals(Object, Object)
. - Throws:
IOException
- if there is an I/O error performing the operation.
-