Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## things.data.language
Interface LanguageGenerator

All Known Implementing Classes:
  LanguageGenerator_Basic

    public interface LanguageGenerator

Language generator interface.

THIS PACKAGE WAS ABANDONED IN FAVOR OF ANOTHER PROJECT

Version:
  1.0

  Version History

      EPG - Initial - 10 MAY 06

Author:
  Erich P. Gatejen

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

Method Detail

### initialize

    void initialize(WordDictionary dictionary)
                    throws java.lang.Throwable

  Initialize it with a dictionary.

  Parameters:
    `dictionary` -
  Throws:
    `java.lang.Throwable`

### word

    java.lang.String word()
                          throws java.lang.Throwable

  Get a word of random size.

  Returns:
    the word
  Throws:
    `java.lang.Throwable`

### word

    java.lang.String word(int size)
                          throws java.lang.Throwable

  Get a word of specified size

  Parameters:
    `size` - In character count(not byte count). It must be more than 0.
  Returns:
    The word.
  Throws:
    `java.lang.Throwable`

### sentence

    java.lang.String sentence(int size,
                              int wrap,
                              java.lang.String wrapPrepend)
                              throws java.lang.Throwable

  Get a sentence of specified size. It will have language appropriate punctuation and whitespace, which is included in the size count.

  Parameters:
    `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.
  Returns:
    the completed sentence
  Throws:
    `java.lang.Throwable`

### sentence

    void sentence(AText target,
                  int size,
                  int wrap,
                  java.lang.String wrapPrepend)
                  throws java.lang.Throwable

  Get a sentence of specified size. It will have language appropriate punctuation and whitespace, which is included in the size count.

  Parameters:
    `target` - 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.
  Throws:
    `java.lang.Throwable`

### paragraph

    java.lang.String paragraph(int size,
                               int wrap,
                               java.lang.String wrapPrepend)
                               throws java.lang.Throwable

  Get a paragraph of specified size. It will have language appropriate punctuation and whitespace, which is included in the size count.

  Parameters:
    `size` - 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.
  Returns:
    the completed paragraph.
  Throws:
    `java.lang.Throwable`

### paragraph

    void paragraph(AText target,
                   int size,
                   int wrap,
                   java.lang.String wrapPrepend)
                   throws java.lang.Throwable

  Get a paragraph of specified size. It will have language appropriate punctuation and whitespace, which is included in the size count.

  Parameters:
    `size` - 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.
  Throws:
    `java.lang.Throwable`

### page

    java.lang.String page(int size,
                          int wrap,
                          java.lang.String wrapPrepend)
                          throws java.lang.Throwable

  Get a page of paragraphs. It will have language appropriate punctuation and whitespace, which is included in the size count. Single or double CRLF will be put between paragraphs, but not at the end!

  Parameters:
    `size` - 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.
  Returns:
    the completed paragraph.
  Throws:
    `java.lang.Throwable`

### page

    void page(AText target,
              int size,
              int wrap,
              java.lang.String wrapPrepend)
              throws java.lang.Throwable

  Get a page of paragraphs. It will have language appropriate punctuation and whitespace, which is included in the size count. Single or double CRLF will be put between paragraphs, but not at the end!

  Parameters:
    `size` - 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.
  Throws:
    `java.lang.Throwable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Things.