Package adams.parser

Class AbstractSymbolEvaluator<T>

    • Field Detail

      • m_Symbols

        protected BaseString[] m_Symbols
        the symbols (key-value pairs).
    • Constructor Detail

      • AbstractSymbolEvaluator

        public AbstractSymbolEvaluator()
    • Method Detail

      • setSymbols

        public void setSymbols​(BaseString[] value)
        Sets the symbols to use for evaluation.
        Parameters:
        value - the symbols
      • getSymbols

        public BaseString[] getSymbols()
        Returns the symbols to use for evaluation.
        Returns:
        the symbols
      • symbolsTipText

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

        protected abstract Object initializeSymbol​(String name,
                                                   String value)
        Initializes the symbol.
        Parameters:
        name - the name of the symbol
        value - the string representation of the symbol
        Returns:
        the object representation of the symbol
      • initializeSymbols

        protected HashMap initializeSymbols()
        Initializes the symbols.
        Returns:
        the generated symbols
      • doEvaluate

        protected abstract T doEvaluate​(HashMap symbols)
                                 throws Exception
        Performs the actual evaluation.
        Parameters:
        symbols - the symbols to use
        Returns:
        the evaluation, or null in case of error
        Throws:
        Exception - if evaluation fails