edu.vt.middleware.password
Class Password

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

public class Password
extends java.lang.Object

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

Version:
$Revision: 1647 $ $Date: 2010-10-10 21:48:10 -0400 (Sun, 10 Oct 2010) $
Author:
Middleware Services

Constructor Summary
Password(java.lang.String text)
          This will create a new Password with the supplied password text.
 
Method Summary
 boolean containsAlphabetical()
          This returns whether or not this Password contains alphabetical characters.
 boolean containsAlphanumeric()
          This returns whether or not this Password contains alphanumeric characters.
 boolean containsDigits()
          This returns whether or not this Password contains digits.
 boolean containsLowercase()
          This returns whether or not this Password contains lowercase characters.
 boolean containsNonAlphabetical()
          This returns whether or not this Password contains non-alphabetical characters.
 boolean containsNonAlphanumeric()
          This returns whether or not this Password contains non-alphanumeric characters.
 boolean containsNonDigits()
          This returns whether or not this Password contains non-digits.
 boolean containsUppercase()
          This returns whether or not this Password contains uppercase characters.
 boolean containsWhitespace()
          This returns whether or not this Password contains whitespace characters.
 char[] getAlphabetical()
          This returns the alphabetical characters in this Password.
 char[] getAlphanumeric()
          This returns the alphanumeric characters in this Password.
 char[] getDigits()
          This returns the digits in this Password.
 char[] getLowercase()
          This returns the lowercase characters in this Password.
 char[] getNonAlphabetical()
          This returns the non-alphabetical characters in this Password.
 char[] getNonAlphanumeric()
          This returns the non-alphanumeric characters in this Password.
 char[] getNonDigits()
          This returns the non-digits in this Password.
 int getNumberOfAlphabetical()
          This returns the number of alphabetical characters in this Password.
 int getNumberOfAlphanumeric()
          This returns the number of alphanumeric characters in this Password.
 int getNumberOfDigits()
          This returns the number of digits in this Password.
 int getNumberOfLowercase()
          This returns the number of lowercase characters in this Password.
 int getNumberOfNonAlphabetical()
          This returns the number of non-alphabetical characters in this Password.
 int getNumberOfNonAlphanumeric()
          This returns the number of non-alphanumeric characters in this Password.
 int getNumberOfNonDigits()
          This returns the number of non-digits in this Password.
 int getNumberOfUppercase()
          This returns the number of uppercase characters in this Password.
 int getNumberOfWhitespace()
          This returns the number of whitespace characters in this Password.
 java.lang.String getText()
          This returns the text of this Password.
 char[] getUppercase()
          This returns the uppercase characters in this Password.
 char[] getWhitespace()
          This returns the whitespace characters in this Password.
 int length()
          This returns the length of this Password.
 java.lang.String toString()
          This 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(java.lang.String text)
This will create a new Password with the supplied password text.

Parameters:
text - String password
Method Detail

getText

public java.lang.String getText()
This returns the text of this Password.

Returns:
String - password

length

public int length()
This returns the length of this Password.

Returns:
int - password length

containsDigits

public boolean containsDigits()
This returns whether or not this Password contains digits.

Returns:
boolean - whether or not the password contains digits

getNumberOfDigits

public int getNumberOfDigits()
This returns the number of digits in this Password.

Returns:
int - number of digits in the password

getDigits

public char[] getDigits()
This returns the digits in this Password.

Returns:
char[] - digits in this password

containsNonDigits

public boolean containsNonDigits()
This returns whether or not this Password contains non-digits.

Returns:
boolean - whether or not the password contains non-digits

getNumberOfNonDigits

public int getNumberOfNonDigits()
This returns the number of non-digits in this Password.

Returns:
int - number of non-digits in this password

getNonDigits

public char[] getNonDigits()
This returns the non-digits in this Password.

Returns:
char[] - non-digits in this password

containsAlphabetical

public boolean containsAlphabetical()
This returns whether or not this Password contains alphabetical characters.

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

getNumberOfAlphabetical

public int getNumberOfAlphabetical()
This returns the number of alphabetical characters in this Password.

Returns:
int - number of alphabetical characters in this password

getAlphabetical

public char[] getAlphabetical()
This returns the alphabetical characters in this Password.

Returns:
char[] - alphabetical characters in this password

containsNonAlphabetical

public boolean containsNonAlphabetical()
This returns whether or not this Password contains non-alphabetical characters.

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

getNumberOfNonAlphabetical

public int getNumberOfNonAlphabetical()
This returns the number of non-alphabetical characters in this Password.

Returns:
int - number of non-alphabetical characters in this password

getNonAlphabetical

public char[] getNonAlphabetical()
This returns the non-alphabetical characters in this Password.

Returns:
char[] - non-alphabetical characters in this password

containsAlphanumeric

public boolean containsAlphanumeric()
This returns whether or not this Password contains alphanumeric characters.

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

getNumberOfAlphanumeric

public int getNumberOfAlphanumeric()
This returns the number of alphanumeric characters in this Password.

Returns:
int - number of alphanumeric characters in this password

getAlphanumeric

public char[] getAlphanumeric()
This returns the alphanumeric characters in this Password.

Returns:
char[] - alphanumeric characters in this password

containsNonAlphanumeric

public boolean containsNonAlphanumeric()
This returns whether or not this Password contains non-alphanumeric characters.

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

getNumberOfNonAlphanumeric

public int getNumberOfNonAlphanumeric()
This returns the number of non-alphanumeric characters in this Password.

Returns:
int - number of non-alphanumeric characters in this password

getNonAlphanumeric

public char[] getNonAlphanumeric()
This returns the non-alphanumeric characters in this Password.

Returns:
char[] - non-alphanumeric characters in this password

containsUppercase

public boolean containsUppercase()
This returns whether or not this Password contains uppercase characters.

Returns:
boolean - whether or not the password contains uppercase characters

getNumberOfUppercase

public int getNumberOfUppercase()
This returns the number of uppercase characters in this Password.

Returns:
int - number of uppercase characters in this password

getUppercase

public char[] getUppercase()
This returns the uppercase characters in this Password.

Returns:
char[] - uppercase characters in this password

containsLowercase

public boolean containsLowercase()
This returns whether or not this Password contains lowercase characters.

Returns:
boolean - whether or not the password contains uppercase characters

getNumberOfLowercase

public int getNumberOfLowercase()
This returns the number of lowercase characters in this Password.

Returns:
int - number of lowercase characters in this password

getLowercase

public char[] getLowercase()
This returns the lowercase characters in this Password.

Returns:
char[] - lowercase characters in this password

containsWhitespace

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

Returns:
boolean - whether or not the password contains whitespace characters

getNumberOfWhitespace

public int getNumberOfWhitespace()
This returns the number of whitespace characters in this Password.

Returns:
int - number of whitespace characters in this password

getWhitespace

public char[] getWhitespace()
This returns the whitespace characters in this Password.

Returns:
char[] - whitespace characters in this password

toString

public java.lang.String toString()
This returns a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
String


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