Modifier and Type | Field and Description |
---|---|
protected IAction<T> |
action
The action.
|
protected ICondition |
condition
The condition.
|
protected java.util.List<EventType> |
events
The event types.
|
protected java.lang.String |
name
The rule name.
|
Constructor and 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.
|
Modifier and Type | Method and 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() |
protected java.lang.String name
protected java.util.List<EventType> events
protected ICondition condition
public Rule(java.lang.String name)
public Rule(java.lang.String name, ICondition condition)
public Rule(java.lang.String name, ICondition condition, IAction<T> action)
public Rule(java.lang.String name, ICondition condition, IAction<T> action, EventType[] events)
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name to set.public ICondition getCondition()
getCondition
in interface IRule<T>
public void setCondition(ICondition condition)
condition
- The condition to set.public void setAction(IAction<T> action)
action
- The action to set.public void setEvents(java.util.List<EventType> events)
events
- The event types.public void setEventNames(java.util.List<java.lang.String> events)
events
- The event types.public java.util.List<EventType> getEvents()
public void addEvent(EventType event)
events
- The event types.public java.lang.String toString()
toString
in class java.lang.Object