Package net.datafaker.providers.base
Class Lorem
- Since:
- 0.8.0
-
Field Summary
Fields inherited from class net.datafaker.providers.base.AbstractProvider
faker
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionchar
char
character
(boolean includeUppercase) characters
(boolean includeUppercase) characters
(int fixedNumberOfCharacters) characters
(int fixedNumberOfCharacters, boolean includeUppercase) characters
(int fixedNumberOfCharacters, boolean includeUppercase, boolean includeDigit) characters
(int fixedNumberOfCharacters, boolean includeUppercase, boolean includeSpecial, boolean includeDigit) characters
(int minimumLength, int maximumLength) characters
(int minimumLength, int maximumLength, boolean includeUppercase) characters
(int minimumLength, int maximumLength, boolean includeUppercase, boolean includeDigit) characters
(int minimumLength, int maximumLength, boolean includeUppercase, boolean includeSpecial, boolean includeDigit) fixedString
(int numberOfLetters) Create a string with a fixed size.maxLengthSentence
(int fixedLength) Create a Lorem Ipsum sentence with fixed length.paragraph
(int sentenceCount) Creates a paragraph with a range (sentenceCount)...(<sentenceCount+3)paragraphs
(int paragraphCount) sentence()
Create a sentence with a random number of words within the range 4..10.sentence
(int wordCount) Create a sentence with a random number of words within the range (wordCount+1)..(wordCount+6).sentence
(int wordCount, int randomWordsToAdd) Create a sentence with a random number of words within the range (wordCount+1)..(wordCount+randomWordsToAdd).sentences
(int sentenceCount) word()
words()
words
(int num)
-
Constructor Details
-
Lorem
-
-
Method Details
-
character
public char character() -
character
public char character(boolean includeUppercase) -
characters
-
characters
-
characters
-
characters
-
characters
public String characters(int minimumLength, int maximumLength, boolean includeUppercase, boolean includeDigit) -
characters
-
characters
-
characters
public String characters(int minimumLength, int maximumLength, boolean includeUppercase, boolean includeSpecial, boolean includeDigit) -
characters
public String characters(int fixedNumberOfCharacters, boolean includeUppercase, boolean includeDigit) -
characters
public String characters(int fixedNumberOfCharacters, boolean includeUppercase, boolean includeSpecial, boolean includeDigit) -
words
-
words
-
word
-
sentence
Create a sentence with a random number of words within the range 4..10.- Returns:
- a random sentence
-
sentence
Create a sentence with a random number of words within the range (wordCount+1)..(wordCount+6).- Returns:
- a random sentence
-
sentence
Create a sentence with a random number of words within the range (wordCount+1)..(wordCount+randomWordsToAdd).Set
randomWordsToAdd
to 0 to generate sentences with a fixed number of words.- Returns:
- a random sentence
-
sentences
-
paragraph
Creates a paragraph with a range (sentenceCount)...(<sentenceCount+3) -
paragraph
-
paragraphs
-
fixedString
Create a string with a fixed size. Can be useful for testing validator based on length string for example- Parameters:
numberOfLetters
- size of the expected String- Returns:
- a string with a fixed size
-
maxLengthSentence
Create a Lorem Ipsum sentence with fixed length.- Parameters:
fixedLength
- size of the expected Lorem Ipsum sentence.- Returns:
- a string with a fixed size. Return empty string if input size is 0 or negative.
-