public class NoteComment extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
NoteComment.Action
Every comment has an associated action.
|
Modifier and Type | Field and Description |
---|---|
private NoteComment.Action |
action |
private java.util.Date |
commentTimestamp |
static java.util.Comparator<NoteComment> |
DATE_COMPARATOR
Sorts note comments strictly by creation date
|
private boolean |
isNew |
private java.lang.String |
text |
private User |
user |
Constructor and Description |
---|
NoteComment(java.util.Date createDate,
User user,
java.lang.String commentText,
NoteComment.Action action,
boolean isNew) |
Modifier and Type | Method and Description |
---|---|
java.util.Date |
getCommentTimestamp()
Returns the time at which this comment was created.
|
NoteComment.Action |
getNoteAction()
Returns the action associated with this note.
|
java.lang.String |
getText()
Returns Plain text of user's comment.
|
User |
getUser()
Returns the user who made this comment.
|
boolean |
isNew()
Determines if this is a new comment/action and needs to be uploaded to the API
|
void |
setNew(boolean isNew)
Sets whether this is a new comment/action and needs to be uploaded to the API
|
java.lang.String |
toString() |
private final java.lang.String text
private final java.util.Date commentTimestamp
private final NoteComment.Action action
private boolean isNew
public static final java.util.Comparator<NoteComment> DATE_COMPARATOR
public NoteComment(java.util.Date createDate, User user, java.lang.String commentText, NoteComment.Action action, boolean isNew)
createDate
- The time at which this comment was addeduser
- JOSM User object of the user who created the commentcommentText
- The text left by the user. Is sometimes blankaction
- The action associated with this commentisNew
- Whether or not this comment is new and needs to be uploadedpublic java.lang.String getText()
public User getUser()
public java.util.Date getCommentTimestamp()
public NoteComment.Action getNoteAction()
public void setNew(boolean isNew)
isNew
- true
if this is a new comment/action and needs to be uploaded to the APIpublic boolean isNew()
public java.lang.String toString()
toString
in class java.lang.Object