Class GeneratorRecipe

java.lang.Object
com.sanctionco.opconnect.model.GeneratorRecipe

public class GeneratorRecipe extends Object
Represents a recipe for generating a password.
  • Method Details

    • getLength

      public Integer getLength()
      Get the length of the recipe.
      Returns:
      the length
    • getCharacterSets

      public List<CharacterSet> getCharacterSets()
      Get the list of allowed characters.
      Returns:
      the list of allowed characters
    • withAllowedCharacters

      public static GeneratorRecipe.Builder withAllowedCharacters(List<CharacterSet> characters)
      Create a new GeneratorRecipe.Builder with the given list of characters.
      Parameters:
      characters - the characters to include in generated passwords
      Returns:
      the new Builder
    • letters

      public static GeneratorRecipe.Builder letters()
      Create a new GeneratorRecipe.Builder with only letter characters allowed.
      Returns:
      the new Builder
    • digits

      public static GeneratorRecipe.Builder digits()
      Create a new GeneratorRecipe.Builder with only digit characters allowed.
      Returns:
      the new Builder
    • symbols

      public static GeneratorRecipe.Builder symbols()
      Create a new GeneratorRecipe.Builder with only symbol characters allowed.
      Returns:
      the new Builder
    • lettersAndDigits

      public static GeneratorRecipe.Builder lettersAndDigits()
      Create a new GeneratorRecipe.Builder with letters and digits allowed.
      Returns:
      the new Builder
    • lettersAndSymbols

      public static GeneratorRecipe.Builder lettersAndSymbols()
      Create a new GeneratorRecipe.Builder with letters and symbols allowed.
      Returns:
      the new Builder
    • digitsAndSymbols

      public static GeneratorRecipe.Builder digitsAndSymbols()
      Create a new GeneratorRecipe.Builder with digits and symbols allowed.
      Returns:
      the new Builder
    • allCharacters

      public static GeneratorRecipe.Builder allCharacters()
      Create a new GeneratorRecipe.Builder with all characters allowed.
      Returns:
      the new Builder
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object