|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.examples.hangman.WordGenerator
public class WordGenerator
The word generator is responsible for reading in a list of words from a data file and serving them up in a random order. The generator keeps a state record of which words it has served and randomises them again when the last word has been served.
Constructor Summary | |
---|---|
WordGenerator()
Create the word generator, loading the words and preparing them for serving. |
|
WordGenerator(String[] words)
Create the word generator using the supplied array of words as the word source to use. |
Method Summary | |
---|---|
Word |
next()
Returns the next word from the word generator. |
int |
size()
Get the number of words that were discovered. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WordGenerator()
public WordGenerator(String[] words)
words
- The words to useMethod Detail |
---|
public Word next()
public int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |