Class AbstractBooleanCondition

    • Constructor Detail

      • AbstractBooleanCondition

        public AbstractBooleanCondition()
    • Method Detail

      • accepts

        public abstract Class[] accepts()
        Returns the class that the consumer accepts.
        Specified by:
        accepts in interface BooleanCondition
        Returns:
        adams.flow.core.Unknown.class
      • setUp

        public String setUp​(Actor owner)
        Configures the condition.
        Specified by:
        setUp in interface BooleanCondition
        Parameters:
        owner - the actor this condition belongs to
        Returns:
        null if everything is fine, otherwise error message
      • preEvaluate

        protected String preEvaluate​(Actor owner,
                                     Token token)
        Uses the token to determine the evaluation.
        Parameters:
        owner - the owning actor
        token - the current token passing through
        Returns:
        null if OK, otherwise error message
      • doEvaluate

        protected abstract boolean doEvaluate​(Actor owner,
                                              Token token)
        Performs the actual evaluation.
        Parameters:
        owner - the owning actor
        token - the current token passing through
        Returns:
        the result of the evaluation
      • evaluate

        public boolean evaluate​(Actor owner,
                                Token token)
        Uses the token to determine the evaluation.
        Specified by:
        evaluate in interface BooleanCondition
        Parameters:
        owner - the owning actor
        token - the current token passing through the actor
        Returns:
        the result of the evaluation