Package org.instancio.generators
Class TextGenerators
java.lang.Object
org.instancio.generators.TextGenerators
Contains built-in text generators.
- Since:
- 1.1.9
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGenerates "Lorem ipsum" text.Generates a random string based on the specified pattern template.uuid()
Generates aUUID
value as a string.
-
Constructor Details
-
TextGenerators
-
-
Method Details
-
loremIpsum
Generates "Lorem ipsum" text.- Returns:
- lorem ipsum text generator
- Since:
- 1.5.3
-
pattern
Generates a random string based on the specified pattern template. The template supports the following hashtags:#a
- alphanumeric character[a-z, A-Z, 0-9]
#c
- lower case character[a-z]
#C
- upper case character[A-Z]
#d
- digit[0-9]
##
- hash symbol escape
Examples:
"#a#a#a" -> "k4W" "#d#d#d-#d#d#d-#d#d#d" -> "123-45-67" "Foo: #C#c#c" -> "Foo: Xyz" "###d#d#d" -> "#123"
- Parameters:
pattern
- to generate- Returns:
- string pattern generator
- Since:
- 1.1.9
-
uuid
Generates aUUID
value as a string. By default, the generated string is formatted asUUID.toString()
.- Returns:
UUID
string generator- Since:
- 1.5.0
-