public enum PasswordScore extends Enum<PasswordScore>
PasswordScoreService
.Enum Constant and Description |
---|
FAIR |
GOOD |
STRONG |
UNKNOWN |
VERY_STRONG |
WEAK |
Modifier and Type | Method and Description |
---|---|
static PasswordScore |
fromRanking(long ranking) |
long |
getRanking() |
boolean |
isAtLeast(PasswordScore minimumScore)
Uses an internal ranking to compare the scores and determine if it is 'just as strong'.
|
static PasswordScore |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PasswordScore[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PasswordScore UNKNOWN
public static final PasswordScore WEAK
public static final PasswordScore FAIR
public static final PasswordScore GOOD
public static final PasswordScore STRONG
public static final PasswordScore VERY_STRONG
public static PasswordScore[] values()
for (PasswordScore c : PasswordScore.values()) System.out.println(c);
public static PasswordScore valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static PasswordScore fromRanking(long ranking)
public boolean isAtLeast(PasswordScore minimumScore)
minimumScore
- the score to compare topublic long getRanking()
Copyright © 2020 Atlassian. All rights reserved.