Interface BooleanUnaryOperator

All Superinterfaces:
BooleanFunction<Boolean>, 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 BooleanFunction<Boolean>, UnaryOperator<Boolean>
Represents an operation on a single boolean operand that produces a boolean} result. This is the primitive type specialization of UnaryOperator for boolean.
See Also:
  • Method Details

    • applyAsBoolean

      boolean applyAsBoolean(boolean operand)
      Applies this operator to the given operand.
      Parameters:
      operand - the operand to which to apply this operation
      Returns:
      result of applying this operation to the operand
    • apply

      @NotNull default @NotNull Boolean apply(boolean argument)
      Description copied from interface: BooleanFunction
      Applies this function to the given argument.
      Specified by:
      apply in interface BooleanFunction<Boolean>
      Parameters:
      argument - the function argument
      Returns:
      the function result
    • compose

      @NotNull default <V> @NotNull Function<V,Boolean> compose(@NonNull @NonNull Function<? super V,? extends Boolean> before)
      Specified by:
      compose in interface Function<Boolean,Boolean>
    • composePrimitive

      @Contract(value="null -> fail; _ -> _", pure=true) @NotNull default @NotNull BooleanUnaryOperator composePrimitive(@NonNull @NonNull BooleanUnaryOperator before)
      Returns a composed operator that first applies the before operator to its input and then applies this operator to the result.
      Parameters:
      before - the operator to provide the value to this operator
      Returns:
      a composed operator that first applies the provided operator and then this one
      Throws:
      NullPointerException - if before is null
      See Also:
    • andThen

      @NotNull default <V> @NotNull Function<Boolean,V> andThen(@NonNull @NonNull Function<? super Boolean,? extends V> after)
      Specified by:
      andThen in interface Function<Boolean,Boolean>
    • andThenPrimitive

      @Contract(value="null -> fail; _ -> _", pure=true) @NotNull default @NotNull BooleanUnaryOperator andThenPrimitive(@NonNull @NonNull BooleanUnaryOperator after)
      Returns a composed operator that first applies this operator to its input and then applies the after operator to the result.
      Parameters:
      after - the operator to operate on the value provided by this operator
      Returns:
      a composed operator that first applies this operator and then the provided one
      Throws:
      NullPointerException - if after is null
      See Also:
    • invert

      @NotNull default @NotNull BooleanUnaryOperator invert()
      Returns a composed operator that first applies this operator and and then inverts the result.
      Returns:
      a composed operator that first applies this operator and then inverts the result
    • identity

      @Contract(value="-> _", pure=true) @NotNull static @NotNull BooleanUnaryOperator identity()
      Returns an unary operator that always returns its input argument.
      Returns:
      an unary operator that always returns its input argument
    • inversion

      @Contract(value="-> _", pure=true) @NotNull static @NotNull BooleanUnaryOperator inversion()
      Returns an unary operator that always returns inverted input argument.
      Returns:
      an unary operator that always returns inverted input argument