PasswordCheckerpublic class PasswordChecker extends Object implements SerializableSimple Password Checker Javabean.
Does not implement get methods, only set. |
Fields Summary |
---|
protected String | login | protected String | password |
Constructors Summary |
---|
public PasswordChecker()A public no-argument constructor is required of a javabean.
|
Methods Summary |
---|
public boolean | isValidPassword()Return true if a valid name and password have been set.
Obviously trivial: real version would look in a database.
return login!=null && password !=null &&
login.equals("ian") &&
password.equals("topSecret");
| public void | setLogin(java.lang.String s)Set the login name
login = s;
| public void | setPassword(java.lang.String s)Set the password
password = s;
|
|