Lorem Ipsum for Java is a simple, light-weight Java class (100% pure Java) for generating lorem ipsum placehoder text.
Lorem ipsum text can be used in applications to create sample data for design evaluation, test cases or performance tests.
Why not use static text like "dummydummydummy"?
Lorem ipsum text is similar to the natural typeface (of English) and thus more likely to uncover flaws in the design of desktop/web applications or web sites regarding word wrapping etc.
Licence
Lorem Ipsum for Java is licenced under the MIT licence. Feel free to use it in your projects!
Usage
Usage of Lorem Ipsum for Java is pretty simple:
package mypackage;
import de.svenjacobs.loremipsum.LoremIpsum;
public class MyClass {
private LoremIpsum loremIpsum;
public MyClass() {
this.loremIpsum = new LoremIpsum();
}
public MyData createDummyData() {
MyData data = new MyData();
// returns 50 words of lorem ipsum text
data.setText( loremIpsum.getWords( 50 ) );
// returns 150 words of lorem ipsum text starting with
// the third word (text will not begin with "Lorem ipsum")
data.setAnotherText( loremIpsum.getWords( 150, 2 ) );
// returns two paragraphs of lorem ipsum
data.setYetAnotherText( loremIpsum.getParagraphs( 2 ) );
return data;
}
}
For more details see JavaDoc of Lorem Ipsum for Java.
Downloads
Downloads can be found on the SourceForge.net project website of Lorem Ipsum for Java.
About the author / Contact
I, Sven Jacobs, am a software architect living near Cologne, Germany with interests in modern high level programming languages (Java, C#), web projects and open source software.
If you like this little piece of software and are using it in your project please drop me a note about it. Thank you!
Email: | sven.jacobs@web.de |
Private website: | sven-jacobs.de |
Other projects
Also check out invertm3u, a M3U playlist generator.