JAVA Servlet2.3外文书籍源码

源代码在线查看: response.java

软件大小: 458 K
上传用户: haowoainime
关键词: Servlet JAVA 2.3 书籍
下载地址: 免注册下载 普通下载 VIP

相关代码

				package forum;
				
				/**
				 * Represents a response to a topic.
				 *
				 * @author    Simon Brown
				 */
				public class Response extends Posting {
				
				  /** the Topic to which this response is associated */
				  private Topic topic;
				
				  /** a flag indicating whether this repsonse has been deleted */
				  private boolean deleted = false;
				
				  /**
				   * Creates a new response with the specified information.
				   *
				   * @param user    the User that posted the response
				   * @param text    the text of the response
				   */
				  public Response(User user, String text) {
				    super(user, text);
				  }
				
				  /**
				   * Determines whether this response has been deleted from the topic.
				   *
				   * @return  true if it has been deleted,
				   *          false otherwise (if it is still visible)
				   */
				  public boolean isDeleted() {
				    return this.deleted;
				  }
				
				  /**
				   * Sets whether this response has been deleted from the topic.
				   *
				   * @param b   true if this response is to be deleted, false otherwise
				   */
				  public void setDeleted(boolean b) {
				    this.deleted = b;
				  }
				
				  /**
				   * Setter for the topic property.
				   *
				   * @param topic   the Topic instance
				   */
				  public void setTopic(Topic topic) {
				    this.topic = topic;
				  }
				
				  /**
				   * Getter for the topic property.
				   *
				   * @return  the Topic instance
				   */
				  public Topic getTopic() {
				    return this.topic;
				  }
				
				}			

相关资源