userimpl.java

来自「动态代理实例源代码」· Java 代码 · 共 53 行

JAVA
53
字号
package com.lakeviewtech;

/**
 * Implementation of the User interface.
 */
public class UserImpl implements User {

    /**
     * The username of this User.
     */
    private String username = null;

    /**
     * The password of this User.
     */
    private String password = null;

    /**
     * Gets the username of the User.
     */
    public String getUsername() {
        return username;
    }

    /**
     * Sets the username of the User.
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * Gets the password of the User.
     */
    public String getPassword() {
        return password;
    }

    /**
     * Sets the password of the User.
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * String representing the username and password of this User.
     */
    public String toString() {
        return "username: " + username + ", password: " + password;
    }
}

⌨️ 快捷键说明

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