Interface BooleanBinaryOperator
- All Superinterfaces:
BiFunction<Boolean,,Boolean, Boolean> BinaryOperator<@NotNull 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 BooleanBinaryOperator
extends BinaryOperator<@NotNull 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 Summary
Modifier and TypeMethodDescriptionstatic @NotNull BooleanBinaryOperatorCreates a binary operator which always returnsfalse.static @NotNull BooleanBinaryOperatorCreates a binary operator which always returnstrue.static @NotNull BooleanBinaryOperatorand()Creates a binary operator which returns the result of logical AND operation on its operands.default @NotNull BooleanbooleanapplyAsBoolean(boolean left, boolean right) Applies this operator to the given operands.static @NotNull BooleanBinaryOperatoror()Creates a binary operator which returns the result of logical OR operation on its operands.static @NotNull BooleanBinaryOperatorxor()Creates a binary operator which returns the result of logical OR operation on its operands.Methods inherited from interface java.util.function.BiFunction
andThen
-
Method Details
-
applyAsBoolean
boolean applyAsBoolean(boolean left, boolean right) Applies this operator to the given operands.- Parameters:
left- the first operandright- the second operand- Returns:
- result of applying this operation to the operands
-
apply
@Contract("null, _ -> fail; _, null -> fail; _ -> _") @NotNull default @NotNull Boolean apply(@NotNull @NotNull Boolean left, @NotNull @NotNull Boolean right) - Specified by:
applyin interfaceBiFunction<Boolean,Boolean, Boolean>
-
alwaysTrue
Creates a binary operator which always returnstrue.- Returns:
- binary operator which always returns
true
-
alwaysFalse
Creates a binary operator which always returnsfalse.- Returns:
- binary operator which always returns
false
-
and
Creates a binary operator which returns the result of logical AND operation on its operands.- Returns:
- binary AND-operator
-
or
Creates a binary operator which returns the result of logical OR operation on its operands.- Returns:
- binary OR-operator
-
xor
Creates a binary operator which returns the result of logical OR operation on its operands.- Returns:
- OR-operator
-