edu.vt.middleware.password
Class Password

java.lang.Object
  extended by edu.vt.middleware.password.Password

public class Password
extends Object

Class for determining what type and what quantity of characters a password contains.

Version:
$Revision: 1926 $ $Date: 2011-04-26 15:52:24 -0400 (Tue, 26 Apr 2011) $
Author:
Middleware Services

Constructor Summary
Password(String text)
          Create a new password with the supplied password text.
 
Method Summary
 boolean containsAlphabetical()
          Returns whether or not this password contains alphabetical characters.
 boolean containsAlphanumeric()
          Returns whether or not this password contains alphanumeric characters.
 boolean containsDigits()
          Returns whether or not this password contains digits.
 boolean containsLowercase()
          Returns whether or not this password contains lowercase characters.
 boolean containsNonAlphabetical()
          Returns whether or not this password contains non-alphabetical characters.
 boolean containsNonAlphanumeric()
          Returns whether or not this password contains non-alphanumeric characters.
 boolean containsNonDigits()
          Returns whether or not this password contains non-digits.
 boolean containsUppercase()
          Returns whether or not this password contains uppercase characters.
 boolean containsWhitespace()
          Returns whether or not this Password contains whitespace characters.
 char[] getAlphabetical()
          Returns the alphabetical characters in this password.
 char[] getAlphanumeric()
          Returns the alphanumeric characters in this password.
 char[] getDigits()
          Returns the digits in this password.
 char[] getLowercase()
          Returns the lowercase characters in this password.
 char[] getNonAlphabetical()
          Returns the non-alphabetical characters in this password.
 char[] getNonAlphanumeric()
          Returns the non-alphanumeric characters in this password.
 char[] getNonDigits()
          Returns the non-digits in this password.
 int getNumberOfAlphabetical()
          Returns the number of alphabetical characters in this password.
 int getNumberOfAlphanumeric()
          Returns the number of alphanumeric characters in this password.
 int getNumberOfDigits()
          Returns the number of digits in this password.
 int getNumberOfLowercase()
          Returns the number of lowercase characters in this password.
 int getNumberOfNonAlphabetical()
          Returns the number of non-alphabetical characters in this password.
 int getNumberOfNonAlphanumeric()
          Returns the number of non-alphanumeric characters in this password.
 int getNumberOfNonDigits()
          Returns the number of non-digits in this password.
 int getNumberOfUppercase()
          Returns the number of uppercase characters in this password.
 int getNumberOfWhitespace()
          Returns the number of whitespace characters in this password.
 String getText()
          Returns the text of this password.
 char[] getUppercase()
          Returns the uppercase characters in this password.
 char[] getWhitespace()
          Returns the whitespace characters in this password.
 int length()
          Returns the length of this password.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Password

public Password(String text)
Create a new password with the supplied password text.

Parameters:
text - password
Method Detail

getText

public String getText()
Returns the text of this password.

Returns:
password

length

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

Returns:
password length

containsDigits

public boolean containsDigits()
Returns whether or not this password contains digits.

Returns:
whether or not the password contains digits

getNumberOfDigits

public int getNumberOfDigits()
Returns the number of digits in this password.

Returns:
number of digits in the password

getDigits

public char[] getDigits()
Returns the digits in this password.

Returns:
digits in this password

containsNonDigits

public boolean containsNonDigits()
Returns whether or not this password contains non-digits.

Returns:
whether or not the password contains non-digits

getNumberOfNonDigits

public int getNumberOfNonDigits()
Returns the number of non-digits in this password.

Returns:
number of non-digits in this password

getNonDigits

public char[] getNonDigits()
Returns the non-digits in this password.

Returns:
non-digits in this password

containsAlphabetical

public boolean containsAlphabetical()
Returns whether or not this password contains alphabetical characters.

Returns:
whether or not the password contains alphabetical characters

getNumberOfAlphabetical

public int getNumberOfAlphabetical()
Returns the number of alphabetical characters in this password.

Returns:
number of alphabetical characters in this password

getAlphabetical

public char[] getAlphabetical()
Returns the alphabetical characters in this password.

Returns:
alphabetical characters in this password

containsNonAlphabetical

public boolean containsNonAlphabetical()
Returns whether or not this password contains non-alphabetical characters.

Returns:
whether or not the password contains non-alphabetical characters

getNumberOfNonAlphabetical

public int getNumberOfNonAlphabetical()
Returns the number of non-alphabetical characters in this password.

Returns:
number of non-alphabetical characters in this password

getNonAlphabetical

public char[] getNonAlphabetical()
Returns the non-alphabetical characters in this password.

Returns:
non-alphabetical characters in this password

containsAlphanumeric

public boolean containsAlphanumeric()
Returns whether or not this password contains alphanumeric characters.

Returns:
whether or not the password contains alphanumeric characters

getNumberOfAlphanumeric

public int getNumberOfAlphanumeric()
Returns the number of alphanumeric characters in this password.

Returns:
number of alphanumeric characters in this password

getAlphanumeric

public char[] getAlphanumeric()
Returns the alphanumeric characters in this password.

Returns:
alphanumeric characters in this password

containsNonAlphanumeric

public boolean containsNonAlphanumeric()
Returns whether or not this password contains non-alphanumeric characters.

Returns:
whether or not the password contains non-alphanumeric characters

getNumberOfNonAlphanumeric

public int getNumberOfNonAlphanumeric()
Returns the number of non-alphanumeric characters in this password.

Returns:
number of non-alphanumeric characters in this password

getNonAlphanumeric

public char[] getNonAlphanumeric()
Returns the non-alphanumeric characters in this password.

Returns:
non-alphanumeric characters in this password

containsUppercase

public boolean containsUppercase()
Returns whether or not this password contains uppercase characters.

Returns:
whether or not the password contains uppercase characters

getNumberOfUppercase

public int getNumberOfUppercase()
Returns the number of uppercase characters in this password.

Returns:
number of uppercase characters in this password

getUppercase

public char[] getUppercase()
Returns the uppercase characters in this password.

Returns:
uppercase characters in this password

containsLowercase

public boolean containsLowercase()
Returns whether or not this password contains lowercase characters.

Returns:
whether or not the password contains uppercase characters

getNumberOfLowercase

public int getNumberOfLowercase()
Returns the number of lowercase characters in this password.

Returns:
number of lowercase characters in this password

getLowercase

public char[] getLowercase()
Returns the lowercase characters in this password.

Returns:
lowercase characters in this password

containsWhitespace

public boolean containsWhitespace()
Returns whether or not this Password contains whitespace characters.

Returns:
whether or not the password contains whitespace characters

getNumberOfWhitespace

public int getNumberOfWhitespace()
Returns the number of whitespace characters in this password.

Returns:
number of whitespace characters in this password

getWhitespace

public char[] getWhitespace()
Returns the whitespace characters in this password.

Returns:
whitespace characters in this password

toString

public String toString()
Returns a string representation of this object.

Overrides:
toString in class Object
Returns:
string representation


Copyright © 2003-2011 Virginia Tech. All Rights Reserved.