Class Tree


  • public class Tree
    extends Object
    Parsed expression, usually created by a TreeBuilder. The bind(FunctionMapper, VariableMapper) method is used to create Bindings, which are needed at evaluation time to lookup functions and variables. The tree itself does not contain such information, because it would make the tree depend on the function/variable mapper supplied at parse time.
    Author:
    Christoph Beck
    • Method Detail

      • getFunctionNodes

        public Iterable<FunctionNode> getFunctionNodes()
        Get function nodes (in no particular order)
      • getIdentifierNodes

        public Iterable<IdentifierNode> getIdentifierNodes()
        Get identifier nodes (in no particular order)
      • isDeferred

        public boolean isDeferred()
      • bind

        public Bindings bind​(FunctionMapper fnMapper,
                             VariableMapper varMapper)
        Create a bindings.
        Parameters:
        fnMapper - the function mapper to use
        varMapper - the variable mapper to use
        Returns:
        tree bindings
      • bind

        public Bindings bind​(FunctionMapper fnMapper,
                             VariableMapper varMapper,
                             TypeConverter converter)
        Create a bindings.
        Parameters:
        fnMapper - the function mapper to use
        varMapper - the variable mapper to use
        converter - custom type converter
        Returns:
        tree bindings