Interface IOIntPredicate

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface IOIntPredicate
    Represents a predicate (boolean-valued function) of one int-valued argument. This is the int-consuming primitive type specialization of IOPredicate.

    This interface is similar to IntPredicate except that it is allowed to throw an IOException.

    Author:
    Magno N A Cruz
    See Also:
    IOPredicate
    • Method Detail

      • test

        boolean test​(int value)
              throws java.io.IOException

        This method is the same as IntPredicate.test(int), but with a support for IOException.

        Parameters:
        value - The input argument.
        Returns:
        true if the input argument matches the predicate, false if not.
        Throws:
        java.io.IOException - if there is an I/O error performing the operation.
      • and

        default IOIntPredicate and​(@Nonnull
                                   IOIntPredicate other)
                            throws java.io.IOException

        This method is the same as IntPredicate.and(IntPredicate), but with a support for IOException.

        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:
        java.io.IOException - if there is an I/O error performing the operation.
      • negate

        default IOIntPredicate negate()
                               throws java.io.IOException

        This method is the same as IntPredicate.negate(), but with a support for IOException.

        Returns:
        A predicate that represents the logical negation of this predicate.
        Throws:
        java.io.IOException - if there is an I/O error performing the operation.
      • or

        default IOIntPredicate or​(@Nonnull
                                  IOIntPredicate other)
                           throws java.io.IOException

        This method is the same as IntPredicate.or(IntPredicate), but with a support for IOException.

        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:
        java.io.IOException - if there is an I/O error performing the operation.