Package com.sanctionco.opconnect.model
Class GeneratorRecipe
java.lang.Object
com.sanctionco.opconnect.model.GeneratorRecipe
Represents a recipe for generating a password.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic GeneratorRecipe.Builder
Create a newGeneratorRecipe.Builder
with all characters allowed.static GeneratorRecipe.Builder
digits()
Create a newGeneratorRecipe.Builder
with only digit characters allowed.static GeneratorRecipe.Builder
Create a newGeneratorRecipe.Builder
with digits and symbols allowed.boolean
Get the list of allowed characters.Get the length of the recipe.int
hashCode()
static GeneratorRecipe.Builder
letters()
Create a newGeneratorRecipe.Builder
with only letter characters allowed.static GeneratorRecipe.Builder
Create a newGeneratorRecipe.Builder
with letters and digits allowed.static GeneratorRecipe.Builder
Create a newGeneratorRecipe.Builder
with letters and symbols allowed.static GeneratorRecipe.Builder
symbols()
Create a newGeneratorRecipe.Builder
with only symbol characters allowed.toString()
static GeneratorRecipe.Builder
withAllowedCharacters(List<CharacterSet> characters)
Create a newGeneratorRecipe.Builder
with the given list of characters.
-
Method Details
-
getLength
Get the length of the recipe.- Returns:
- the length
-
getCharacterSets
Get the list of allowed characters.- Returns:
- the list of allowed characters
-
withAllowedCharacters
Create a newGeneratorRecipe.Builder
with the given list of characters.- Parameters:
characters
- the characters to include in generated passwords- Returns:
- the new Builder
-
letters
Create a newGeneratorRecipe.Builder
with only letter characters allowed.- Returns:
- the new Builder
-
digits
Create a newGeneratorRecipe.Builder
with only digit characters allowed.- Returns:
- the new Builder
-
symbols
Create a newGeneratorRecipe.Builder
with only symbol characters allowed.- Returns:
- the new Builder
-
lettersAndDigits
Create a newGeneratorRecipe.Builder
with letters and digits allowed.- Returns:
- the new Builder
-
lettersAndSymbols
Create a newGeneratorRecipe.Builder
with letters and symbols allowed.- Returns:
- the new Builder
-
digitsAndSymbols
Create a newGeneratorRecipe.Builder
with digits and symbols allowed.- Returns:
- the new Builder
-
allCharacters
Create a newGeneratorRecipe.Builder
with all characters allowed.- Returns:
- the new Builder
-
equals
-
hashCode
public int hashCode() -
toString
-