Class NodeComparator


  • public class NodeComparator
    extends java.lang.Object
    NodeComparator is a class used to differentiate nodes in an expression tree.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static boolean DEBUG  
    • Constructor Summary

      Constructors 
      Constructor Description
      NodeComparator()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean equals​(Node v, Node w)
      Determines whether or not two Nodes are equal.
      static int hashCode​(Node node)
      Computes a hash code for a given Node based upon its type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEBUG

        public static boolean DEBUG
    • Constructor Detail

      • NodeComparator

        public NodeComparator()
    • Method Detail

      • equals

        public static boolean equals​(Node v,
                                     Node w)
        Determines whether or not two Nodes are equal.
      • hashCode

        public static int hashCode​(Node node)
        Computes a hash code for a given Node based upon its type. The hash code of nodes that are composed of other nodes are based upon their composits.