Class Option

    • Constructor Detail

      • Option

        public Option​(ITrigger trigger,
                      IAction action)
        Parameters:
        trigger - The trigger for this option.
        action - The action for this option.
      • Option

        public Option​(List<ITrigger> triggers,
                      IAction action)
        Parameters:
        triggers - The triggers for this option.
        action - The action for this option.
    • Method Detail

      • triggers

        public List<ITrigger> triggers()
        Specified by:
        triggers in interface IOption
        Returns:
        The triggers associated with this option.
      • triggers

        public void triggers​(List<ITrigger> value)
        Specified by:
        triggers in interface IOption
        Parameters:
        value - The new value of the trigger.
      • shouldTrigger

        public boolean shouldTrigger​(TriggerParameters data)
        Specified by:
        shouldTrigger in interface IOption
        Parameters:
        data - The data to test against the triggers.
        Returns:
        If this option should trigger.
      • action

        public IAction action()
        Specified by:
        action in interface IOption
        Returns:
        The action associated with this option.
      • action

        public void action​(IAction value)
        Specified by:
        action in interface IOption
        Parameters:
        value - The new value for this action.