⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 response.java

📁 JAVA Servlet2.3外文书籍源码
💻 JAVA
字号:
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;
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -