Package rs.baselib.util
Enum Class PasswordUtils.Rule
- All Implemented Interfaces:
Serializable
,Comparable<PasswordUtils.Rule>
,Constable
- Enclosing class:
- PasswordUtils
Passord pattern rules (minimum occurrance of a type of character).
- Author:
- ralph
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionMust contain at least one digitMust contain at least one lower-case letterMust contain at least one special char of:@ # $ % ^ & + = : ; , . > < " ' / ( ) [ ] { } * ~ - _
Must contain at least one upper-case letter -
Field Summary
Modifier and TypeFieldDescriptionstatic EnumSet<PasswordUtils.Rule>
Complex rule set: at least 1 digit, 1 lower-case letter, 1 upper-case letter, 1 special char -
Method Summary
Modifier and TypeMethodDescriptiongetRegex()
Returns the regular expression to verify the rule.static PasswordUtils.Rule
Returns the enum constant of this class with the specified name.static PasswordUtils.Rule[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DIGIT
Must contain at least one digit -
LOWER_CASE
Must contain at least one lower-case letter -
UPPER_CASE
Must contain at least one upper-case letter -
SPECIAL_CHAR
Must contain at least one special char of:@ # $ % ^ & + = : ; , . > < " ' / ( ) [ ] { } * ~ - _
-
-
Field Details
-
COMPLEX
Complex rule set: at least 1 digit, 1 lower-case letter, 1 upper-case letter, 1 special char
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getRegex
Returns the regular expression to verify the rule.- Returns:
- the regular expression
-