Class RasterDataSymbol

  • All Implemented Interfaces:
    Cloneable, Symbol
    Direct Known Subclasses:
    SingleFlagSymbol

    public class RasterDataSymbol
    extends Object
    implements Symbol, Cloneable
    Represents a read-only symbol. A symbol can be a named constant or variable. It has a return type an can be evaluated. This class is based on RasterData.

    Within an expression, a reference to a symbol is created if the parser encounters a name and this name can be resolved through the parser's current namespace. The resulting term in this case is an instance of Term.Ref.

    • Method Detail

      • getName

        public String getName()
        Description copied from interface: Symbol
        Gets the symbol's name.
        Specified by:
        getName in interface Symbol
        Returns:
        the name, should never be null
      • getRetType

        public int getRetType()
        Description copied from interface: Symbol
        Gets the symbol's return type.
        Specified by:
        getRetType in interface Symbol
        Returns:
        the type, should always be one of the TYPE_X constants defined in the Term class.
      • isConst

        public boolean isConst()
        Specified by:
        isConst in interface Symbol
        Returns:
        true, if this symbol has a constant value with respect to any EvalEnv, even null.
      • setData

        public void setData​(Object data)
      • evalB

        public boolean evalB​(EvalEnv env)
                      throws EvalException
        Description copied from interface: Symbol
        Evaluates this symbol to a boolean value.
        Specified by:
        evalB in interface Symbol
        Parameters:
        env - the application dependant environment.
        Returns:
        a boolean value
        Throws:
        EvalException - if the evaluation fails
      • evalI

        public int evalI​(EvalEnv env)
                  throws EvalException
        Description copied from interface: Symbol
        Evaluates this symbol to an int value.
        Specified by:
        evalI in interface Symbol
        Parameters:
        env - the application dependant environment.
        Returns:
        an int value
        Throws:
        EvalException - if the evaluation fails
      • evalD

        public double evalD​(EvalEnv env)
                     throws EvalException
        Description copied from interface: Symbol
        Evaluates this symbol to a double value.
        Specified by:
        evalD in interface Symbol
        Parameters:
        env - the application dependant environment.
        Returns:
        a double value
        Throws:
        EvalException - if the evaluation fails
      • evalS

        public String evalS​(EvalEnv env)
                     throws EvalException
        Description copied from interface: Symbol
        Evaluates this symbol to a String value.
        Specified by:
        evalS in interface Symbol
        Parameters:
        env - the application dependant environment.
        Returns:
        a double value
        Throws:
        EvalException - if the evaluation fails