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

📄 passwordentry.java

📁 <Apress.The.Definitive.Guide.to.SWT.and.JFace.eBook-LiB>书籍配套源代码
💻 JAVA
字号:
package examples.ch9.password.data;

/**
 * This class contains the data for a single password entry
 */
public class PasswordEntry {
  private String category;
  private String name;
  private String userId;
  private String password;

  /**
   * Constructs a PasswordEntry
   */
  public PasswordEntry() {
    this(null, null, null, null);
  }

  /**
   * Constructs a PasswordEntry
   */
  public PasswordEntry(String newCategory, String newName, String newUserId,
      String newPassword) {
    setCategory(newCategory);
    setName(newName);
    setUserId(newUserId);
    setPassword(newPassword);
  }

  /**
   * Returns the category.
   * 
   * @return String
   */
  public String getCategory() {
    return category;
  }

  /**
   * Sets the category
   * 
   * @param category The category to set.
   */
  public void setCategory(String category) {
    this.category = category;
  }

  /**
   * Returns the name.
   * 
   * @return String
   */
  public String getName() {
    return name;
  }

  /**
   * Sets the name
   * 
   * @param name The name to set.
   */
  public void setName(String name) {
    this.name = name;
  }

  /**
   * Returns the password.
   * 
   * @return String
   */
  public String getPassword() {
    return password;
  }

  /**
   * Sets the password
   * 
   * @param password The password to set.
   */
  public void setPassword(String password) {
    this.password = password;
  }

  /**
   * Returns the userId.
   * 
   * @return String
   */
  public String getUserId() {
    return userId;
  }

  /**
   * Sets the userId
   * 
   * @param userId The userId to set.
   */
  public void setUserId(String userId) {
    this.userId = userId;
  }

  /**
   * Clones an entry
   * 
   * @param entry
   */
  public void clone(PasswordEntry entry) {
    setCategory(entry.getCategory());
    setName(entry.getName());
    setUserId(entry.getUserId());
    setPassword(entry.getPassword());
  }
}

⌨️ 快捷键说明

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