public interface Condition
| Modifier and Type | Method and Description |
|---|---|
default Condition |
and(boolean other)
Logically AND current
Condition with the other boolean. |
default Condition |
and(Condition other)
Logically AND current
Condition with the other Condition. |
Condition |
and(Supplier<Boolean> clause)
Logically AND combine the current
Condition with the clause. |
default Condition |
flatMap(Function<Boolean,Condition> f)
Apply the function to the Condtion, resulting an another Condition.
|
boolean |
isFalse()
Checks of the Condition is false or not.
|
boolean |
isTrue()
Checks if the Condition is true or not.
|
default Condition |
not()
Negates the Condtion.
|
default Condition |
or(boolean other)
Logically OR the current
Condition with the other boolean. |
default Condition |
or(Condition other)
Logically OR the current
Condition with the other Condition. |
Condition |
or(Supplier<Boolean> clause)
Logically OR combine the current
Condition with the clause. |
void |
otherwise(Action response)
Perform this response if the
Condition is false. |
default Condition |
otherwise(Supplier<Boolean> clause)
Create a new
Condition for the clause as a continuation to an existing Condition. |
void |
otherwiseThrow(Exception exception)
Deprecated.
|
void |
otherwiseThrow(Supplier<Exception> exceptionSupplier)
Throw then exception if the
Condition is false. |
Condition |
then(Action response)
Perform this response if the
Condition is true. |
void |
thenThrow(Exception exception)
Deprecated.
|
void |
thenThrow(Supplier<Exception> exceptionSupplier)
Throw the exception supplied if the
Condition is true. |
static Condition |
where(boolean clause)
Create a new
Condition for the clause. |
static Condition where(boolean clause)
Condition for the clause.clause - the condition to testboolean isTrue()
boolean isFalse()
default Condition not()
Condition and(Supplier<Boolean> clause)
Condition with the clause.clause - the condition to testdefault Condition and(Condition other)
Condition with the other Condition.other - the other Conditiondefault Condition and(boolean other)
Condition with the other boolean.other - the other booleanCondition or(Supplier<Boolean> clause)
Condition with the clause.clause - the condition to testdefault Condition or(Condition other)
Condition with the other Condition.other - the other Conditiondefault Condition or(boolean other)
Condition with the other boolean.other - the other booleanCondition then(Action response)
Condition is true.response - the response to performvoid otherwise(Action response)
Condition is false.response - the response to performdefault Condition otherwise(Supplier<Boolean> clause)
Condition for the clause as a continuation to an existing Condition.clause - the condition to test@Deprecated void thenThrow(Exception exception) throws Exception
thenThrow(Supplier)Condition is true.exception - the Exception to throwException - the exceptionvoid thenThrow(Supplier<Exception> exceptionSupplier) throws Exception
Condition is true.exceptionSupplier - the supplier of the Exception to throwException - the exception@Deprecated void otherwiseThrow(Exception exception) throws Exception
otherwiseThrow(Supplier)Condition is false.exception - the Exception to throwException - the exceptionvoid otherwiseThrow(Supplier<Exception> exceptionSupplier) throws Exception
Condition is false.exceptionSupplier - the supplier of the Exception to throwException - the exceptionCopyright © 2015–2019. All rights reserved.