Interface BooleanUnaryOperator

All Superinterfaces:
Function<Boolean,Boolean>, UnaryOperator<Boolean>
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 BooleanUnaryOperator extends UnaryOperator<Boolean>
A type-specific UnaryOperator; provides methods operating both on objects and on primitives.
Since:
8.5.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    apply(boolean x)
    Computes the operator on the given input.
    default Boolean
    Deprecated.
    Please use the corresponding type-specific method instead.
    Returns a UnaryOperator that always returns the input unmodified.
    Returns a UnaryOperator that always returns the logical negation of the input.

    Methods inherited from interface java.util.function.Function

    andThen, compose
  • Method Details

    • apply

      boolean apply(boolean x)
      Computes the operator on the given input.
      Parameters:
      x - the input.
      Returns:
      the output of the operator on the given input.
    • identity

      static BooleanUnaryOperator identity()
      Returns a UnaryOperator that always returns the input unmodified.
      See Also:
    • negation

      static BooleanUnaryOperator negation()
      Returns a UnaryOperator that always returns the logical negation of the input.
    • apply

      @Deprecated default Boolean apply(Boolean x)
      Deprecated.
      Please use the corresponding type-specific method instead.
      Specified by:
      apply in interface Function<Boolean,Boolean>