Class Expression

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.QuickInfoSupporter, adams.core.SizeOfHandler, Serializable

    public class Expression
    extends AbstractPredictionCheck
    Evaluates the specified boolean expression. The expression makes all numeric evaluation values available as symbols for the calculation.
    Adds a new boolean evaluation with suffix .passed to the container with the result of the expression and one with the suffix .expression with the expanded expression, using the specified evaluation name.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
        min-user-mode: Expert
     
    -expression <adams.parser.BooleanExpressionText> (property: expression)
        The boolean expression to evaluate; all evaluations are available as symbols.
        default: true
     
    -evaluation <java.lang.String> (property: evaluation)
        The name of the evaluation to store the result under.
        default:
     
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected String m_Evaluation
      the evaluation to check.
      protected adams.parser.BooleanExpressionText m_Expression
      the expression to evaluate.
      static String SUFFIX_EXPRESSION
      the suffix for the expression.
      static String SUFFIX_PASSED
      the suffix for the expression.
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Constructor Summary

      Constructors 
      Constructor Description
      Expression()  
    • Field Detail

      • m_Expression

        protected adams.parser.BooleanExpressionText m_Expression
        the expression to evaluate.
      • m_Evaluation

        protected String m_Evaluation
        the evaluation to check.
    • Constructor Detail

      • Expression

        public Expression()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.core.option.AbstractOptionHandler
      • setExpression

        public void setExpression​(adams.parser.BooleanExpressionText value)
        Sets the boolean expression to evaluate.
        Parameters:
        value - the expression
      • getExpression

        public adams.parser.BooleanExpressionText getExpression()
        Returns the boolean expression to evaluate.
        Returns:
        the expression
      • expressionTipText

        public String expressionTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setEvaluation

        public void setEvaluation​(String value)
        Sets the evaluation name to store the result under.
        Parameters:
        value - the evaluation
      • getEvaluation

        public String getEvaluation()
        Returns the evaluation name to store the result under.
        Returns:
        the evaluation
      • evaluationTipText

        public String evaluationTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getQuickInfo

        public String getQuickInfo()
        Returns a quick info about the object, which can be displayed in the GUI.
        Specified by:
        getQuickInfo in interface adams.core.QuickInfoSupporter
        Overrides:
        getQuickInfo in class AbstractPredictionCheck
        Returns:
        null if no info available, otherwise short string