org.jclouds.util
Enum PasswordGenerator

java.lang.Object
  extended by java.lang.Enum<PasswordGenerator>
      extended by org.jclouds.util.PasswordGenerator
All Implemented Interfaces:
com.google.common.base.Supplier<String>, Serializable, Comparable<PasswordGenerator>

public enum PasswordGenerator
extends Enum<PasswordGenerator>
implements com.google.common.base.Supplier<String>

Cheap, lightweight, low-security password generator.

See Also:

Enum Constant Summary
INSTANCE
           
 
Field Summary
static char[] goodChar
           
static int MIN_LENGTH
          Minimum length for a decent password
protected static SecureRandom r
          The random number generator.
 
Method Summary
 String get()
           
static PasswordGenerator valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PasswordGenerator[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INSTANCE

public static final PasswordGenerator INSTANCE
Field Detail

MIN_LENGTH

public static final int MIN_LENGTH
Minimum length for a decent password

See Also:
Constant Field Values

r

protected static final SecureRandom r
The random number generator.


goodChar

public static final char[] goodChar
Method Detail

values

public static PasswordGenerator[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PasswordGenerator c : PasswordGenerator.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PasswordGenerator valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

get

public String get()
Specified by:
get in interface com.google.common.base.Supplier<String>


Copyright © 2009-2012 jclouds. All Rights Reserved.