source: josm/trunk/src/org/openstreetmap/josm/data/osm/ChangesetDiscussionComment.java@ 13430

Last change on this file since 13430 was 11878, checked in by Don-vip, 7 years ago

findbugs - EI_EXPOSE_REP2 + javadoc

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