public interface Condition
| Modifier and Type | Method and Description |
|---|---|
default Condition |
and(Condition other)
Logicaly OR current
Condition with the other Condition. |
Condition |
and(Supplier<Boolean> clause)
Logically AND combine the current
Condition with the clause. |
default Condition |
andNot(Supplier<Boolean> clause)
Deprecated.
use
not() |
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(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. |
default Condition |
orNot(Supplier<Boolean> clause)
Deprecated.
use
not() |
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)
Deprecated.
use
not() |
static Condition where(boolean clause)
Condition for the clause.clause - the condition to test@Deprecated static Condition whereNot(boolean clause)
not()Condition for the boolean opposite of 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 Condition@Deprecated default Condition andNot(Supplier<Boolean> clause)
not()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 or(Condition other)
Condition with the other Condition.other - the other Condition@Deprecated default Condition orNot(Supplier<Boolean> clause)
not()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 exceptionvoid otherwiseThrow(Exception exception) throws Exception
Condition is false.exception - the Exception to throwException - the exceptionCopyright © 2015–2018. All rights reserved.