Last change
on this file since 8855 was 7937, checked in by bastiK, 9 years ago |
add subversion property svn:eol=native
|
-
Property svn:eol-style
set to
native
|
File size:
1.5 KB
|
Rev | Line | |
---|
[7937] | 1 | // License: GPL. For details, see LICENSE file.
|
---|
| 2 | package org.openstreetmap.josm.data.osm;
|
---|
| 3 |
|
---|
| 4 | import java.util.Date;
|
---|
| 5 |
|
---|
| 6 | /**
|
---|
| 7 | * A comment in a public changeset discussion.
|
---|
| 8 | * @since 7704
|
---|
| 9 | */
|
---|
| 10 | public class ChangesetDiscussionComment {
|
---|
| 11 |
|
---|
| 12 | /** date this comment was posted at */
|
---|
| 13 | private final Date date;
|
---|
| 14 | /** the user who posted the comment */
|
---|
| 15 | private final User user;
|
---|
| 16 | /** comment text */
|
---|
| 17 | private String text;
|
---|
| 18 |
|
---|
| 19 | /**
|
---|
| 20 | * Constructs a new {@code ChangesetDiscussionComment}.
|
---|
| 21 | * @param date date this comment was posted at
|
---|
| 22 | * @param user the user who posted the comment
|
---|
| 23 | */
|
---|
| 24 | public ChangesetDiscussionComment(Date date, User user) {
|
---|
| 25 | this.date = date;
|
---|
| 26 | this.user = user;
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | /**
|
---|
| 30 | * Replies comment text.
|
---|
| 31 | * @return comment text
|
---|
| 32 | */
|
---|
| 33 | public final String getText() {
|
---|
| 34 | return text;
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | /**
|
---|
| 38 | * Sets comment text.
|
---|
| 39 | * @param text comment text
|
---|
| 40 | */
|
---|
| 41 | public final void setText(String text) {
|
---|
| 42 | this.text = text;
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 | /**
|
---|
| 46 | * Replies date this comment was posted at.
|
---|
| 47 | * @return date this comment was posted at
|
---|
| 48 | */
|
---|
| 49 | public final Date getDate() {
|
---|
| 50 | return date;
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | /**
|
---|
| 54 | * Replies the user who posted the comment.
|
---|
| 55 | * @return the user who posted the comment
|
---|
| 56 | */
|
---|
| 57 | public final User getUser() {
|
---|
| 58 | return user;
|
---|
| 59 | }
|
---|
| 60 |
|
---|
| 61 | @Override
|
---|
| 62 | public String toString() {
|
---|
| 63 | return "ChangesetDiscussionComment [date=" + date + ", user=" + user + ", text='" + text + "']";
|
---|
| 64 | }
|
---|
| 65 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.