Enum Class PasswordUtils.Rule

java.lang.Object
java.lang.Enum<PasswordUtils.Rule>
rs.baselib.util.PasswordUtils.Rule
All Implemented Interfaces:
Serializable, Comparable<PasswordUtils.Rule>, Constable
Enclosing class:
PasswordUtils

public static enum PasswordUtils.Rule extends Enum<PasswordUtils.Rule>
Passord pattern rules (minimum occurrance of a type of character).
Author:
ralph
  • Enum Constant Details

    • DIGIT

      public static final PasswordUtils.Rule DIGIT
      Must contain at least one digit
    • LOWER_CASE

      public static final PasswordUtils.Rule LOWER_CASE
      Must contain at least one lower-case letter
    • UPPER_CASE

      public static final PasswordUtils.Rule UPPER_CASE
      Must contain at least one upper-case letter
    • SPECIAL_CHAR

      public static final PasswordUtils.Rule SPECIAL_CHAR
      Must contain at least one special char of: @ # $ % ^ & + = : ; , . &gt; &lt; " ' / ( ) [ ] { } * ~ - _
  • Field Details

    • COMPLEX

      public static EnumSet<PasswordUtils.Rule> COMPLEX
      Complex rule set: at least 1 digit, 1 lower-case letter, 1 upper-case letter, 1 special char
  • Method Details

    • values

      public static PasswordUtils.Rule[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PasswordUtils.Rule valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getRegex

      public String getRegex()
      Returns the regular expression to verify the rule.
      Returns:
      the regular expression