org.fuin.objects4j
Class Password

java.lang.Object
  extended by org.fuin.objects4j.Password
All Implemented Interfaces:
java.io.Serializable

@Immutable
public final class Password
extends java.lang.Object
implements java.io.Serializable

A password with a length between 8 and 20 characters.

See Also:
Serialized Form

Constructor Summary
Password(java.lang.String password)
          Constructor with password.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 int length()
          Returns the length of the password.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Password

@Requires(value="(password!=null) && ValidPasswordValidator.isValid(password)")
public Password(java.lang.String password)
Constructor with password.

Parameters:
password - Password.
Method Detail

hashCode

public final int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public final boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

length

public final int length()
Returns the length of the password.

Returns:
Number of characters.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010 Future Invent Informationsmanagement GmbH. All Rights Reserved.