it.amattioli.workstate.actions
Class AbstractGuard
java.lang.Object
it.amattioli.workstate.actions.AbstractGuard
- All Implemented Interfaces:
- Guard
- Direct Known Subclasses:
- BeanShellGuard, NullGuard
public abstract class AbstractGuard
- extends Object
- implements Guard
| Methods inherited from interface it.amattioli.workstate.actions.Guard |
check |
USER_PRIORITY
public static final Integer USER_PRIORITY
AbstractGuard
public AbstractGuard()
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
getPriority
public Integer getPriority()
- Description copied from interface:
Guard
- Return the priority level for the guard evaluation.
To choose the right transition to trigger all the guards must be evaluated
to know which is true. Normally all the guards should be indipendent
one each other and the evaluation order should not be important. But
to implement an "else" mechanism a priority has been associated to the guards.
The null guard has a very low priority while all user defined guards have
a high priority. In this way the null guard is always evaluated as the last
guard and, as it always returns true, it works like an "else" branch.
The priority should not be used for other purposes like forcing the evaluation
order of user defined guards.
- Specified by:
getPriority in interface Guard
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2011. All Rights Reserved.