|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectthings.data.language.LanguageGenerator_Basic
public class LanguageGenerator_Basic
Basic implementation of the language interface.
THIS PACKAGE WAS ABANDONED IN FAVOR OF ANOTHER PROJECT
Version History
EPG - Initial - 10 MAY 06
| Field Summary | |
|---|---|
static java.lang.String |
LINE_WRAP
|
static java.lang.String |
SENTENCE_SEPERATOR
|
| Constructor Summary | |
|---|---|
LanguageGenerator_Basic()
|
|
| Method Summary | |
|---|---|
void |
initialize(WordDictionary dictionary)
Initialize it with a dictionary. |
void |
page(AText target,
int size,
int wrap,
java.lang.String wrapPrepend)
Get a page of paragraphs. |
java.lang.String |
page(int size,
int wrap,
java.lang.String wrapPrepend)
Get a page of paragraphs. |
void |
paragraph(AText target,
int size,
int wrap,
java.lang.String wrapPrepend)
Get a paragraph of specified size. |
java.lang.String |
paragraph(int size,
int wrap,
java.lang.String wrapPrepend)
Get a paragraph of specified size. |
void |
sentence(AText target,
int size,
int wrap,
java.lang.String wrapPrepend)
Get a sentence of specified size. |
java.lang.String |
sentence(int size,
int wrap,
java.lang.String wrapPrepend)
Get a sentence of specified size. |
java.lang.String |
word()
Get a word of random size. |
java.lang.String |
word(int size)
Get a word of specified size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String LINE_WRAP
public static final java.lang.String SENTENCE_SEPERATOR
| Constructor Detail |
|---|
public LanguageGenerator_Basic()
| Method Detail |
|---|
public void initialize(WordDictionary dictionary)
throws java.lang.Throwable
initialize in interface LanguageGeneratordictionary -
java.lang.Throwable
public java.lang.String word()
throws java.lang.Throwable
word in interface LanguageGeneratorjava.lang.Throwable
public java.lang.String word(int size)
throws java.lang.Throwable
word in interface LanguageGeneratorsize - In character count(not byte count). It must be more than 0.
java.lang.Throwable
public java.lang.String sentence(int size,
int wrap,
java.lang.String wrapPrepend)
throws java.lang.Throwable
sentence in interface LanguageGeneratorsize - In character count(not byte count), including whitespace. It must be more than 2.wrap - Line wrap size. It must be more than 3.wrapPrepend - if not null, prepend this after each line wrap.
java.lang.Throwable
public void sentence(AText target,
int size,
int wrap,
java.lang.String wrapPrepend)
throws java.lang.Throwable
sentence in interface LanguageGeneratortarget - The sentence will be added to this.size - In character count(not byte count), including whitespace. It must be more than 2.wrap - Line wrap size. It must be more than 3.wrapPrepend - if not null, prepend this after each line wrap.
java.lang.Throwable
public java.lang.String paragraph(int size,
int wrap,
java.lang.String wrapPrepend)
throws java.lang.Throwable
paragraph in interface LanguageGeneratorsize - In character count(not byte count). It must be more than PARAGRAPH_MIN_SIZE.wrap - Line wrap size. It must be more than 3.wrapPrepend - if not null, prepend this after each line wrap.
java.lang.Throwable
public void paragraph(AText target,
int size,
int wrap,
java.lang.String wrapPrepend)
throws java.lang.Throwable
paragraph in interface LanguageGeneratorsize - In character count(not byte count). It must be more than PARAGRAPH_MIN_SIZE.target - The sentence will be added to this.wrap - Line wrap size. It must be more than 3.wrapPrepend - if not null, prepend this after each line wrap.
java.lang.Throwable
public java.lang.String page(int size,
int wrap,
java.lang.String wrapPrepend)
throws java.lang.Throwable
page in interface LanguageGeneratorsize - In character count(not byte count). It must be more than PARAGRAPH_MIN_SIZE.wrap - Line wrap size. It must be more than 3.wrapPrepend - if not null, prepend this after each line wrap.
java.lang.Throwable
public void page(AText target,
int size,
int wrap,
java.lang.String wrapPrepend)
throws java.lang.Throwable
page in interface LanguageGeneratorsize - In character count(not byte count). It must be more than PARAGRAPH_MIN_SIZE.target - The sentence will be added to this.wrap - Line wrap size. It must be more than 3.wrapPrepend - if not null, prepend this after each line wrap.
java.lang.Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||