public class Note extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Note.State
Note state
|
Modifier and Type | Field and Description |
---|---|
private java.util.Date |
closedAt |
private java.util.List<NoteComment> |
comments |
private java.util.Date |
createdAt |
private long |
id |
private LatLon |
latLon |
private Note.State |
state |
Constructor and Description |
---|
Note(LatLon latLon)
Create a note with a given location
|
Modifier and Type | Method and Description |
---|---|
void |
addComment(NoteComment comment)
Adds a comment.
|
boolean |
equals(java.lang.Object obj) |
java.util.Date |
getClosedAt() |
java.util.List<NoteComment> |
getComments() |
java.util.Date |
getCreatedAt() |
NoteComment |
getFirstComment()
Returns the comment that was submitted by the user when creating the note
|
long |
getId() |
LatLon |
getLatLon() |
Note.State |
getState() |
int |
hashCode() |
void |
setClosedAt(java.util.Date closedAt)
Sets date at which this note has been closed.
|
void |
setCreatedAt(java.util.Date createdAt)
Sets date at which this note has been created.
|
void |
setId(long id)
Sets note id.
|
void |
setState(Note.State state)
Sets the note state.
|
java.lang.String |
toString() |
void |
updateWith(Note note)
Copies values from a new note into an existing one.
|
private long id
private java.util.Date createdAt
private java.util.Date closedAt
private Note.State state
private java.util.List<NoteComment> comments
public long getId()
public void setId(long id)
id
- OSM ID of this notepublic java.util.Date getCreatedAt()
public void setCreatedAt(java.util.Date createdAt)
createdAt
- date at which this note has been createdpublic java.util.Date getClosedAt()
public void setClosedAt(java.util.Date closedAt)
closedAt
- date at which this note has been closedpublic Note.State getState()
public void setState(Note.State state)
state
- note state (open or closed)public java.util.List<NoteComment> getComments()
public void addComment(NoteComment comment)
comment
- note commentpublic NoteComment getFirstComment()
public void updateWith(Note note)
note
- New values to copypublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object