Class Comment

  • All Implemented Interfaces:
    IAttributeAccess

    public class Comment
    extends ConstraintSyntaxTree
    Represents a comment in a parse tree. This can be placed before any other CST node.
    Author:
    Holger Eichelberger
    • Field Detail

      • comment

        private java.lang.String comment
    • Constructor Detail

      • Comment

        public Comment​(ConstraintSyntaxTree expr,
                       java.lang.String comment)
        Creates a new comment node.
        Parameters:
        expr - the commented expression
        comment - the comment text
    • Method Detail

      • getExpr

        public ConstraintSyntaxTree getExpr()
        Returns the commented expression.
        Returns:
        the commented expression
      • getComment

        public java.lang.String getComment()
        Returns the comment text.
        Returns:
        the comment text
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object