Class CommentElement

    • Constructor Detail

      • CommentElement

        public CommentElement()
        Default constructor
      • CommentElement

        public CommentElement​(CommentElement template)
        Copy/clone constructor
        Parameters:
        template - object to copy
    • Method Detail

      • setElementHeader

        public void setElementHeader​(ElementHeader elementHeader)
        Set up the element header associated with the properties.
        Specified by:
        setElementHeader in interface MetadataElement
        Parameters:
        elementHeader - element header object
      • getProperties

        public CommentProperties getProperties()
        Return the properties of the comment.
        Returns:
        properties
      • setProperties

        public void setProperties​(CommentProperties properties)
        Set up the comment properties.
        Parameters:
        properties - properties
      • getAnsweredBy

        public List<ElementStub> getAnsweredBy()
        Return the list of comments that answer a question posed in this comment.
        Returns:
        list of related comments
      • setAnsweredBy

        public void setAnsweredBy​(List<ElementStub> answeredBy)
        Set up the list of comments that answer a question posed in this comment.
        Parameters:
        answeredBy - list of related comments
      • getAnswers

        public List<ElementStub> getAnswers()
        Return the list of unique identifiers (guids) for comments that contain a question that this comment answers.
        Returns:
        list of related comments
      • setAnswers

        public void setAnswers​(List<ElementStub> answers)
        Set up the list of comments that contain a question that this comment answers.
        Parameters:
        answers - list of related comments
      • toString

        public String toString()
        JSON-style toString
        Overrides:
        toString in class Object
        Returns:
        return string containing the property names and values
      • equals

        public boolean equals​(Object objectToCompare)
        Return comparison result based on the content of the properties.
        Overrides:
        equals in class Object
        Parameters:
        objectToCompare - test object
        Returns:
        result of comparison
      • hashCode

        public int hashCode()
        Return hash code for this object
        Overrides:
        hashCode in class Object
        Returns:
        int hash code