Class LoremIpsumGenerator
java.lang.Object
org.instancio.internal.generator.AbstractGenerator<String>
org.instancio.internal.generator.text.LoremIpsumGenerator
- All Implemented Interfaces:
Generator<String>
,GeneratorSpec<String>
,LoremIpsumGeneratorSpec
,LoremIpsumSpec
,NullableGeneratorSpec<String>
,ValueSpec<String>
-
Field Summary
Fields inherited from interface org.instancio.generator.specs.LoremIpsumGeneratorSpec
DEFAULT_PARAGRAPHS, DEFAULT_WORDS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the public API method name of the generator spec.Returns a generated value.paragraphs
(int paragraphs) Number of paragraphs to generate.words
(int words) Number of words to generate.Methods inherited from class org.instancio.internal.generator.AbstractGenerator
getContext, hints, isNullable, nullable, nullable
-
Constructor Details
-
LoremIpsumGenerator
public LoremIpsumGenerator() -
LoremIpsumGenerator
-
-
Method Details
-
apiMethod
Description copied from class:AbstractGenerator
Returns the public API method name of the generator spec. The returned name is used for reporting validation errors.- Specified by:
apiMethod
in classAbstractGenerator<String>
- Returns:
- spec name if defined, or
null
otherwise
-
words
Description copied from interface:LoremIpsumGeneratorSpec
Number of words to generate. Default isLoremIpsumGeneratorSpec.DEFAULT_WORDS
.- Specified by:
words
in interfaceLoremIpsumGeneratorSpec
- Specified by:
words
in interfaceLoremIpsumSpec
- Returns:
- spec builder
-
paragraphs
Description copied from interface:LoremIpsumGeneratorSpec
Number of paragraphs to generate. Default isLoremIpsumGeneratorSpec.DEFAULT_PARAGRAPHS
.- Specified by:
paragraphs
in interfaceLoremIpsumGeneratorSpec
- Specified by:
paragraphs
in interfaceLoremIpsumSpec
- Returns:
- spec builder
-
generate
Description copied from interface:Generator
Returns a generated value.If this method produces random data, the data needs to be generated using the provided
Random
instance. This ensures generated values are reproducible for a given seed value.
-