FileDocCategorySizeDatePackage
PasswordChecker.javaAPI DocExample809Tue Nov 13 14:17:06 GMT 2001darwin

PasswordChecker

public class PasswordChecker extends Object implements Serializable
Simple Password Checker Javabean. Does not implement get methods, only set.
version
$Id: PasswordChecker.java,v 1.1 2001/11/13 19:17:06 ian Exp $

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 booleanisValidPassword()
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 voidsetLogin(java.lang.String s)
Set the login name

		login = s;
	
public voidsetPassword(java.lang.String s)
Set the password

		password = s;