Class Rule<T>

java.lang.Object
jadex.rules.eca.Rule<T>
All Implemented Interfaces:
IRule<T>

public class Rule<T> extends Object implements IRule<T>
Implementation of a rule. Has a - name - event types it reacts to - condition, lhs of the rule - action, rhs of the rule
  • Field Details

    • name

      protected String name
      The rule name.
    • events

      protected List<EventType> events
      The event types.
    • condition

      protected ICondition condition
      The condition.
    • action

      protected IAction<T> action
      The action.
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Get the rule name.
      Specified by:
      getName in interface IRule<T>
      Returns:
      The rule name.
    • setName

      public void setName(String name)
      Set the name.
      Parameters:
      name - The name to set.
    • getCondition

      public ICondition getCondition()
      Get the condition.
      Specified by:
      getCondition in interface IRule<T>
      Returns:
      The condition.
    • setCondition

      public void setCondition(ICondition condition)
      Set the condition.
      Parameters:
      condition - The condition to set.
    • getAction

      public IAction<T> getAction()
      Get the action.
      Specified by:
      getAction in interface IRule<T>
      Returns:
      The action.
    • setAction

      public void setAction(IAction<T> action)
      Set the action.
      Parameters:
      action - The action to set.
    • setEvents

      public void setEvents(List<EventType> events)
      Set the event types.
      Parameters:
      events - The event types.
    • getEvents

      public List<EventType> getEvents()
      Get the event types.
      Specified by:
      getEvents in interface IRule<T>
      Returns:
      The event types.
    • addEvent

      public void addEvent(EventType event)
      Set the event types.
      Parameters:
      events - The event types.
    • toString

      public String toString()
      Overrides:
      toString in class Object