C - Contextpublic final class ExpressionGuard<E,C> extends Object implements Guard<E,C>, Serializable
| Constructor and Description |
|---|
ExpressionGuard(String expression)
Create a condition with an MVEL expression as guard.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
boolean |
evaluate(E event,
C context)
Determines whether the guarded transition is eligible or not.
|
Serializable |
getCompiledExpression() |
String |
getExpression() |
int |
hashCode() |
String |
toString() |
public ExpressionGuard(String expression) throws InvalidExpressionException, IllegalArgumentException
expression - The expression. You can use the variables e,
event, c, and context to
refer to the event of type E and the context of type
C.InvalidExpressionException - If the expression failed to compile.IllegalArgumentException - If the given expression is null.public boolean evaluate(E event, C context)
Guard@NonNull @Generated(value="lombok") public String getExpression()
@NonNull @Generated(value="lombok") public Serializable getCompiledExpression()
@Generated(value="lombok") public boolean equals(Object o)
@Generated(value="lombok") public int hashCode()
Copyright © 2015. All rights reserved.