Class RgxGenOption<T>
java.lang.Object
com.github.curiousoddman.rgxgen.config.RgxGenOption<T>
Enum of keys for available configuration options.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RgxGenOption<Boolean>Flag to use case-insensitive matching.static final RgxGenOption<RgxGenCharsDefinition>Choose which characters dot pattern could generate.static final RgxGenOption<Integer>For infinite patterns, such asa+,a*anda{n,}, defines limit for the repetitions.static final RgxGenOption<List<WhitespaceChar>>Choose which characters \s pattern could generate. -
Constructor Summary
ConstructorsConstructorDescriptionRgxGenOption(String key, T defaultValue) Create an option with specific key and default value -
Method Summary
Modifier and TypeMethodDescriptionGet default value associated with the optiongetFromProperties(RgxGenProperties properties) Get value from the properties object.getKey()Get unique identifier of the propertyvoidsetInProperties(RgxGenProperties properties, T value) Associatesvaluefor this option in the propertiestoString()
-
Field Details
-
INFINITE_PATTERN_REPETITION
For infinite patterns, such asa+,a*anda{n,}, defines limit for the repetitions.- Default Value:
- 100
-
CASE_INSENSITIVE
Flag to use case-insensitive matching.- Default Value:
- false
-
DOT_MATCHES_ONLY
Choose which characters dot pattern could generate.- Default Value:
- null
-
WHITESPACE_DEFINITION
Choose which characters \s pattern could generate.- Default Value:
- SPACE, TAB
-
-
Constructor Details
-
RgxGenOption
Create an option with specific key and default value- Parameters:
key- unique identifier of the optiondefaultValue- default value
-
-
Method Details
-
getKey
Get unique identifier of the property- Returns:
- unique key
-
getDefault
Get default value associated with the option- Returns:
- default value
-
getFromProperties
Get value from the properties object.- Parameters:
properties- object to get value from- Returns:
- value from properties, if present. Default otherwise.
-
setInProperties
Associatesvaluefor this option in the properties- Parameters:
properties- properties to add tovalue- a value
-
toString
-