de.svenjacobs.loremipsum
Class LoremIpsum

java.lang.Object
  extended by de.svenjacobs.loremipsum.LoremIpsum

public class LoremIpsum
extends java.lang.Object

Simple lorem ipsum text generator.

Suitable for creating sample data for test cases and performance tests.

Version:
1.0
Author:
Sven Jacobs

Field Summary
static java.lang.String LOREM_IPSUM
           
 
Constructor Summary
LoremIpsum()
           
 
Method Summary
 java.lang.String getParagraphs()
          Returns two paragraphs of lorem ipsum.
 java.lang.String getParagraphs(int amount)
          Returns paragraphs of lorem ipsum.
 java.lang.String getWords()
          Returns one sentence (50 words) of the lorem ipsum text.
 java.lang.String getWords(int amount)
          Returns words from the lorem ipsum text.
 java.lang.String getWords(int amount, int startIndex)
          Returns words from the lorem ipsum text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOREM_IPSUM

public static final java.lang.String LOREM_IPSUM
See Also:
Constant Field Values
Constructor Detail

LoremIpsum

public LoremIpsum()
Method Detail

getWords

public java.lang.String getWords()
Returns one sentence (50 words) of the lorem ipsum text.

Returns:
50 words of lorem ipsum text

getWords

public java.lang.String getWords(int amount)
Returns words from the lorem ipsum text.

Parameters:
amount - Amount of words
Returns:
Lorem ipsum text

getWords

public java.lang.String getWords(int amount,
                                 int startIndex)
Returns words from the lorem ipsum text.

Parameters:
amount - Amount of words
startIndex - Start index of word to begin with (must be >= 0 and < 50)
Returns:
Lorem ipsum text
Throws:
java.lang.IndexOutOfBoundsException - If startIndex is < 0 or > 49

getParagraphs

public java.lang.String getParagraphs()
Returns two paragraphs of lorem ipsum.

Returns:
Lorem ipsum paragraphs

getParagraphs

public java.lang.String getParagraphs(int amount)
Returns paragraphs of lorem ipsum.

Parameters:
amount - Amount of paragraphs
Returns:
Lorem ipsum paragraphs


Copyright 2008. All Rights Reserved.