Class NoteComment


  • public class NoteComment
    extends Object
    Represents a comment made on a note. All notes have at least on comment which is the comment the note was opened with. Comments are immutable.
    Since:
    7451
    • Constructor Detail

      • NoteComment

        public NoteComment​(Instant createDate,
                           User user,
                           String commentText,
                           NoteComment.Action action,
                           boolean isNew)
        Parameters:
        createDate - The time at which this comment was added
        user - JOSM User object of the user who created the comment
        commentText - The text left by the user. Is sometimes blank
        action - The action associated with this comment
        isNew - Whether or not this comment is new and needs to be uploaded
    • Method Detail

      • getText

        public String getText()
        Returns Plain text of user's comment.
        Returns:
        Plain text of user's comment
      • getUser

        public User getUser()
        Returns the user who made this comment.
        Returns:
        JOSM's User object for the user who made this comment
      • getCommentTimestamp

        public Instant getCommentTimestamp()
        Returns the time at which this comment was created.
        Returns:
        The time at which this comment was created
      • setNew

        public void setNew​(boolean isNew)
        Sets whether this is a new comment/action and needs to be uploaded to the API
        Parameters:
        isNew - true if this is a new comment/action and needs to be uploaded to the API
      • isNew

        public boolean isNew()
        Determines if this is a new comment/action and needs to be uploaded to the API
        Returns:
        true if this is a new comment/action and needs to be uploaded to the API