public class RandomTextGenerator extends Object implements TextGenerator, org.springframework.beans.factory.InitializingBean
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_LINE_WIDTH |
static int |
DEFAULT_NAME_SIZE |
static int |
DEFAULT_TOTAL_CHARACTERS |
static String |
FILTER_NON_STANDARD_REGEX |
| Constructor and Description |
|---|
RandomTextGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
int |
generateHTMLFile(String outputFile,
int minParagraphs,
int maxParagraphs,
int minParagraphLength,
int maxParagraphLength,
int lineWidth) |
String |
generateHTMLString(int minParagraphs,
int maxParagraphs,
int minParagraphLength,
int maxParagraphLength,
int lineWidth) |
String |
generateName() |
String |
generateName(int totalCharacters,
boolean enforceFullWord) |
String |
generateSentence() |
String |
generateSentence(int totalCharacters,
boolean enforceFullWord) |
String |
generateText() |
String |
generateText(int totalCharacters,
int lineWidth,
boolean enforceFullWord) |
int |
generateTextFile(String outputFile,
int minParagraphs,
int maxParagraphs,
int minParagraphLength,
int maxParagraphLength,
int lineWidth) |
String |
generateTextString(int minParagraphs,
int maxParagraphs,
int minParagraphLength,
int maxParagraphLength,
int lineWidth) |
void |
setPrefixLength(int prefixLength) |
void |
setSourceTextLocation(String sourceTextLocation) |
public static final String FILTER_NON_STANDARD_REGEX
public static final int DEFAULT_LINE_WIDTH
public static final int DEFAULT_TOTAL_CHARACTERS
public static final int DEFAULT_NAME_SIZE
public int generateHTMLFile(String outputFile, int minParagraphs, int maxParagraphs, int minParagraphLength, int maxParagraphLength, int lineWidth)
public String generateHTMLString(int minParagraphs, int maxParagraphs, int minParagraphLength, int maxParagraphLength, int lineWidth)
minParagraphs - maxParagraphs - minParagraphLength - maxParagraphLength - lineWidth - public String generateTextString(int minParagraphs, int maxParagraphs, int minParagraphLength, int maxParagraphLength, int lineWidth)
minParagraphs - maxParagraphs - minParagraphLength - maxParagraphLength - lineWidth - public int generateTextFile(String outputFile, int minParagraphs, int maxParagraphs, int minParagraphLength, int maxParagraphLength, int lineWidth)
outputFile - minParagraphs - maxParagraphs - minParagraphLength - maxParagraphLength - lineWidth - public String generateSentence()
public String generateSentence(int totalCharacters, boolean enforceFullWord)
totalCharacters - public String generateName()
generateName in interface TextGeneratorpublic String generateName(int totalCharacters, boolean enforceFullWord)
totalCharacters - public String generateText()
public String generateText(int totalCharacters, int lineWidth, boolean enforceFullWord)
totalCharacters - lineWidth - public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void setPrefixLength(int prefixLength)
prefixLength - the prefixLength to setpublic void setSourceTextLocation(String sourceTextLocation)
sourceTextLocation - the sourceTextLocation to setCopyright © 2005–2014 Alfresco Software. All rights reserved.