public class Password
extends Object
Represents a text-based password, and includes a built-in mechanism for securely
clearing the value.
-
Constructor Summary 
Constructors
-
Method Summary 
void
Securely clears the password value.
boolean
char[]
Determines the password value.
Methods inherited from class java.lang.Object 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details 
-
Password 
public Password(char[] value)
Constructor
- Parameters:
value
- The password value
- Throws:
NullPointerException
- Value is null
-
Password 
Constructor
- Parameters:
value
- The password value
- Throws:
NullPointerException
- Value is null
-
Method Details 
-
getValue 
public char[] getValue()
Determines the password value.
- Returns:
- The password value, empty array if cleared.
-
clear 
public void clear()
Securely clears the password value.
-
compareTo 
public boolean compareTo(String password)