001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.data.osm; 003 004import java.util.Date; 005 006/** 007 * A comment in a public changeset discussion. 008 * @since 7704 009 */ 010public class ChangesetDiscussionComment { 011 012 /** date this comment was posted at */ 013 private final Date date; 014 /** the user who posted the comment */ 015 private final User user; 016 /** comment text */ 017 private String text; 018 019 /** 020 * Constructs a new {@code ChangesetDiscussionComment}. 021 * @param date date this comment was posted at 022 * @param user the user who posted the comment 023 */ 024 public ChangesetDiscussionComment(Date date, User user) { 025 this.date = date; 026 this.user = user; 027 } 028 029 /** 030 * Replies comment text. 031 * @return comment text 032 */ 033 public final String getText() { 034 return text; 035 } 036 037 /** 038 * Sets comment text. 039 * @param text comment text 040 */ 041 public final void setText(String text) { 042 this.text = text; 043 } 044 045 /** 046 * Replies date this comment was posted at. 047 * @return date this comment was posted at 048 */ 049 public final Date getDate() { 050 return date; 051 } 052 053 /** 054 * Replies the user who posted the comment. 055 * @return the user who posted the comment 056 */ 057 public final User getUser() { 058 return user; 059 } 060 061 @Override 062 public String toString() { 063 return "ChangesetDiscussionComment [date=" + date + ", user=" + user + ", text='" + text + "']"; 064 } 065}