Package org.exoplatform.services.bench
Class LoremIpsum4J
java.lang.Object
org.exoplatform.services.bench.LoremIpsum4J
Simple lorem ipsum text generator.
Suitable for creating sample data for test cases and performance tests.
- Version:
- 1.0
- Author:
- Sven Jacobs
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns two paragraphs of lorem ipsum.getParagraphs(int amount) Returns paragraphs of lorem ipsum.getWords()Returns one sentence (50 words) of the lorem ipsum text.getWords(int amount) Returns words from the lorem ipsum text.getWords(int amount, int startIndex) Returns words from the lorem ipsum text.
-
Field Details
-
LOREM_IPSUM
-
-
Constructor Details
-
LoremIpsum4J
public LoremIpsum4J()
-
-
Method Details
-
getWords
Returns one sentence (50 words) of the lorem ipsum text.- Returns:
- 50 words of lorem ipsum text
-
getWords
Returns words from the lorem ipsum text.- Parameters:
amount- Amount of words- Returns:
- Lorem ipsum text
-
getWords
Returns words from the lorem ipsum text.- Parameters:
amount- Amount of wordsstartIndex- Start index of word to begin with (must be >= 0 and < 50)- Returns:
- Lorem ipsum text
- Throws:
IndexOutOfBoundsException- If startIndex is < 0 or > 49
-
getParagraphs
Returns two paragraphs of lorem ipsum.- Returns:
- Lorem ipsum paragraphs
-
getParagraphs
Returns paragraphs of lorem ipsum.- Parameters:
amount- Amount of paragraphs- Returns:
- Lorem ipsum paragraphs
-