public interface Condition
| Modifier and Type | Interface and Description |
|---|---|
static class |
Condition.FalseCondition
A
Condition that has evaluated to false. |
static class |
Condition.TrueCondition
A
Condition that has evaluated to true. |
| Modifier and Type | Field and Description |
|---|---|
static Map<Boolean,Condition> |
CONDITIONS |
static Condition |
FALSE |
static Condition |
TRUE |
| Modifier and Type | Method and Description |
|---|---|
Condition |
and(boolean clause)
Logically AND combine the current
Condition with the clause. |
default Condition |
andNot(boolean clause)
Logically AND combine the current
Condition with boolean opposite of the clause. |
Condition |
or(boolean clause)
Logically OR combine the current
Condition with the clause. |
default Condition |
orNot(boolean clause)
Logically OR combine the current
Condition with the boolean opposite of the clause. |
default Condition |
otherwise(boolean clause)
Create a new
Condition for the clause as a continuation to an existing Condition. |
void |
otherwise(Runnable response)
Perform this response if the
Condition is false. |
Condition |
then(Runnable response)
Perform this response 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(boolean clause)
Condition with the clause.clause - the condition to testdefault Condition andNot(boolean clause)
Condition with boolean opposite of the clause.clause - the condition to testCondition or(boolean clause)
Condition with the clause.clause - the condition to testdefault Condition orNot(boolean clause)
Condition with the boolean opposite of the clause.clause - the condition to testCondition then(Runnable response)
Condition is true.response - the response to performvoid otherwise(Runnable response)
Condition is false.response - the response to performdefault Condition otherwise(boolean clause)
Condition for the clause as a continuation to an existing Condition.clause - the condition to testCopyright © 2015–2017. All rights reserved.