Class CharacterCharacteristicsAppender

java.lang.Object
org.passay.generate.CharacterCharacteristicsAppender
All Implemented Interfaces:
CharacterAppender

public class CharacterCharacteristicsAppender extends Object implements CharacterAppender
Character appender for CharacterCharacteristicsRule.
  • Field Details

    • numberOfCharacteristics

      private final int numberOfCharacteristics
      Number of characteristics.
    • appenders

      private final List<CharacterRuleAppender> appenders
      Character rule appenders.
    • random

      private final Random random
      To select random characters.
  • Constructor Details

    • CharacterCharacteristicsAppender

      public CharacterCharacteristicsAppender(CharacterCharacteristicsRule rule, UnicodeString allowedChars, UnicodeString illegalChars, Random rand)
      Creates a new character characteristics appender.
      Parameters:
      rule - to build appender from
      allowedChars - characters allowed in password generation
      illegalChars - characters not allowed in password generation
      rand - to randomize character selection
  • Method Details

    • getCharacters

      public UnicodeString getCharacters()
      Description copied from interface: CharacterAppender
      Returns the characters that may be used in by this appender.
      Specified by:
      getCharacters in interface CharacterAppender
      Returns:
      valid characters
    • append

      public void append(CharBuffer target, int count)
      Description copied from interface: CharacterAppender
      Fills the target buffer with at most count characters from this appender.
      Specified by:
      append in interface CharacterAppender
      Parameters:
      target - buffer to add characters to
      count - maximum number of characters to add to buffer