Package jadex.rules.eca
Class Rule<T>
- java.lang.Object
-
- jadex.rules.eca.Rule<T>
-
-
Constructor Summary
Constructors Constructor Description Rule(java.lang.String name)Create a new rule.Rule(java.lang.String name, ICondition condition)Create a new rule.Rule(java.lang.String name, ICondition condition, IAction<T> action)Create a new rule.Rule(java.lang.String name, ICondition condition, IAction<T> action, EventType[] events)Create a new rule.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEvent(EventType event)Set the event types.IAction<T>getAction()Get the action.IConditiongetCondition()Get the condition.java.util.List<EventType>getEvents()Get the event types.java.lang.StringgetName()Get the rule name.voidsetAction(IAction<T> action)Set the action.voidsetCondition(ICondition condition)Set the condition.voidsetEventNames(java.util.List<java.lang.String> events)Set the event types.voidsetEvents(java.util.List<EventType> events)Set the event types.voidsetName(java.lang.String name)Set the name.java.lang.StringtoString()
-
-
-
Field Detail
-
name
protected java.lang.String name
The rule name.
-
events
protected java.util.List<EventType> events
The event types.
-
condition
protected ICondition condition
The condition.
-
-
Constructor Detail
-
Rule
public Rule(java.lang.String name)
Create a new rule.
-
Rule
public Rule(java.lang.String name, ICondition condition)Create a new rule.
-
Rule
public Rule(java.lang.String name, ICondition condition, IAction<T> action)Create a new rule.
-
Rule
public Rule(java.lang.String name, ICondition condition, IAction<T> action, EventType[] events)Create a new rule.
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the rule name.
-
setName
public void setName(java.lang.String name)
Set the name.- Parameters:
name- The name to set.
-
getCondition
public ICondition getCondition()
Get the condition.- Specified by:
getConditionin interfaceIRule<T>- Returns:
- The condition.
-
setCondition
public void setCondition(ICondition condition)
Set the condition.- Parameters:
condition- The condition to set.
-
setAction
public void setAction(IAction<T> action)
Set the action.- Parameters:
action- The action to set.
-
setEvents
public void setEvents(java.util.List<EventType> events)
Set the event types.- Parameters:
events- The event types.
-
setEventNames
public void setEventNames(java.util.List<java.lang.String> events)
Set the event types.- Parameters:
events- The event types.
-
getEvents
public java.util.List<EventType> getEvents()
Get the event types.
-
addEvent
public void addEvent(EventType event)
Set the event types.- Parameters:
events- The event types.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-