Class ATreeNode

  • All Implemented Interfaces:
    it.unibo.alchemist.model.sapere.dsl.ITreeNode , java.io.Serializable

    
    public abstract class ATreeNode<T>
     implements ITreeNode<T>
                        
    • Constructor Detail

      • ATreeNode

        ATreeNode(T dat, ITreeNode<out Object> l, ITreeNode<out Object> r)
        Builds the internals of a tree node.
        Parameters:
        dat - the data contained within the node
        l - the left child
        r - the right child
    • Method Detail

      • getData

         T getData()
        Returns:

        the object embedded in this node

      • getValue

         abstract T getValue(Map<HashString, ITreeNode<out Object>> mp)
        Parameters:
        mp - the matches map.
        Returns:

        the value of the Node. (Double if it's a Num or a Var of type Num, String if it's a Const or a Var of type Const) the method return null if there are some variable not yet allocated in the expression.

      • toHashString

         HashString toHashString()

        Similar to toString(), but returns a HashString.

        Returns:

        a HashString representation of this Object