All objects in the abstract syntax tree must provide this interface. It allows the tree to resolve down to a single value. The tree nodes are terminal and non-terminal. Terminals are constants or variables, non-terminals are everything else. Each non-terminal is an operation which takes its left hand child and right hand child as input and produces a result. Performing evaluate() at the root of the tree results in a single Object being returned.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.