Package jadex.bdiv3x.features
Class BDIXAgentFeature.LifecycleStateCondition
- java.lang.Object
-
- jadex.bdiv3x.features.BDIXAgentFeature.LifecycleStateCondition
-
- All Implemented Interfaces:
ICondition
- Enclosing class:
- BDIXAgentFeature
public static class BDIXAgentFeature.LifecycleStateCondition extends java.lang.Object implements ICondition
Condition for checking the lifecycle state of a goal.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
allowed
The flag if state is allowed or disallowed.protected java.util.Set<IGoal.GoalLifecycleState>
states
The allowed states.-
Fields inherited from interface jadex.rules.eca.ICondition
FALSE, TRUE, TRUE_CONDITION
-
-
Constructor Summary
Constructors Constructor Description LifecycleStateCondition(IGoal.GoalLifecycleState state)
Create a new condition.LifecycleStateCondition(IGoal.GoalLifecycleState state, boolean allowed)
Create a new condition.LifecycleStateCondition(java.util.Set<IGoal.GoalLifecycleState> states)
Create a new condition.LifecycleStateCondition(java.util.Set<IGoal.GoalLifecycleState> states, boolean allowed)
Create a new condition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<Tuple2<java.lang.Boolean,java.lang.Object>>
evaluate(IEvent event)
Evaluate the condition.
-
-
-
Field Detail
-
states
protected java.util.Set<IGoal.GoalLifecycleState> states
The allowed states.
-
allowed
protected boolean allowed
The flag if state is allowed or disallowed.
-
-
Constructor Detail
-
LifecycleStateCondition
public LifecycleStateCondition(IGoal.GoalLifecycleState state)
Create a new condition.
-
LifecycleStateCondition
public LifecycleStateCondition(java.util.Set<IGoal.GoalLifecycleState> states)
Create a new condition.
-
LifecycleStateCondition
public LifecycleStateCondition(IGoal.GoalLifecycleState state, boolean allowed)
Create a new condition.
-
LifecycleStateCondition
public LifecycleStateCondition(java.util.Set<IGoal.GoalLifecycleState> states, boolean allowed)
Create a new condition.
-
-
Method Detail
-
evaluate
public IFuture<Tuple2<java.lang.Boolean,java.lang.Object>> evaluate(IEvent event)
Evaluate the condition.- Specified by:
evaluate
in interfaceICondition
- Parameters:
event
- The event.- Returns:
- True, if condition is met (plus additional user data).
-
-