public interface Condition
| Modifier and Type | Method and Description |
|---|---|
Condition |
and(Supplier<Boolean> clause)
Logically AND combine the current
Condition with the clause. |
default Condition |
andNot(Supplier<Boolean> clause)
Logically AND combine the current
Condition with boolean opposite of the clause. |
Condition |
or(Supplier<Boolean> clause)
Logically OR combine the current
Condition with the clause. |
default Condition |
orNot(Supplier<Boolean> clause)
Logically OR combine the current
Condition with the boolean opposite of 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)
Throw then exception if the
Condition is false. |
Condition |
then(Action response)
Perform this response if the
Condition is true. |
void |
thenThrow(Exception exception)
Throw then exception if the
Condition is true. |
static Condition |
where(boolean clause)
Create a new
Condition for the clause. |
static Condition |
whereNot(boolean clause)
Create a new
Condition for the boolean opposite of the clause. |
static Condition where(boolean clause)
Condition for the clause.clause - the condition to teststatic Condition whereNot(boolean clause)
Condition for the boolean opposite of the clause.clause - the condition to testCondition and(Supplier<Boolean> clause)
Condition with the clause.clause - the condition to testdefault Condition andNot(Supplier<Boolean> clause)
Condition with boolean opposite of the clause.clause - the condition to testCondition or(Supplier<Boolean> clause)
Condition with the clause.clause - the condition to testdefault Condition orNot(Supplier<Boolean> clause)
Condition with the boolean opposite of the clause.clause - the condition to testCondition 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 testvoid thenThrow(Exception exception) throws Exception
Condition is true.exception - the Exception to throwException - the exceptionCopyright © 2015–2018. All rights reserved.