Package org.passay.generate
Class CharacterCharacteristicsAppender
java.lang.Object
org.passay.generate.CharacterCharacteristicsAppender
- All Implemented Interfaces:
CharacterAppender
Character appender for
CharacterCharacteristicsRule.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<CharacterRuleAppender>Character rule appenders.private final intNumber of characteristics.private final RandomTo select random characters. -
Constructor Summary
ConstructorsConstructorDescriptionCharacterCharacteristicsAppender(CharacterCharacteristicsRule rule, UnicodeString allowedChars, UnicodeString illegalChars, Random rand) Creates a new character characteristics appender. -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(CharBuffer target, int count) Fills the target buffer with at most count characters from this appender.Returns the characters that may be used in by this appender.
-
Field Details
-
numberOfCharacteristics
private final int numberOfCharacteristicsNumber of characteristics. -
appenders
Character rule appenders. -
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 fromallowedChars- characters allowed in password generationillegalChars- characters not allowed in password generationrand- to randomize character selection
-
-
Method Details
-
getCharacters
Description copied from interface:CharacterAppenderReturns the characters that may be used in by this appender.- Specified by:
getCharactersin interfaceCharacterAppender- Returns:
- valid characters
-
append
Description copied from interface:CharacterAppenderFills the target buffer with at most count characters from this appender.- Specified by:
appendin interfaceCharacterAppender- Parameters:
target- buffer to add characters tocount- maximum number of characters to add to buffer
-