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 void
addEvent(EventType event)
Set the event types.IAction<T>
getAction()
Get the action.ICondition
getCondition()
Get the condition.java.util.List<EventType>
getEvents()
Get the event types.java.lang.String
getName()
Get the rule name.void
setAction(IAction<T> action)
Set the action.void
setCondition(ICondition condition)
Set the condition.void
setEventNames(java.util.List<java.lang.String> events)
Set the event types.void
setEvents(java.util.List<EventType> events)
Set the event types.void
setName(java.lang.String name)
Set the name.java.lang.String
toString()
-
-
-
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:
getCondition
in 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:
toString
in classjava.lang.Object
-
-