|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.toy.anagrams.lib.WordLibrary
public abstract class WordLibrary
Interface defining logic for the Anagram Game application.
| Constructor Summary | |
|---|---|
protected |
WordLibrary()
Constructor for subclasses. |
| Method Summary | |
|---|---|
static WordLibrary |
getDefault()
Getter for the default implementation of the WordLibrary. |
abstract java.lang.String |
getScrambledWord(int idx)
Gets the word at a given index in its scrambled form. |
abstract int |
getSize()
Gets the number of words in the library. |
abstract java.lang.String |
getWord(int idx)
Gets the word at a given index. |
abstract boolean |
isCorrect(int idx,
java.lang.String userGuess)
Checks whether a user's guess for a word at the given index is correct. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected WordLibrary()
| Method Detail |
|---|
public static WordLibrary getDefault()
public abstract java.lang.String getWord(int idx)
idx - index of required word
public abstract java.lang.String getScrambledWord(int idx)
idx - index of required word
public abstract int getSize()
public abstract boolean isCorrect(int idx,
java.lang.String userGuess)
idx - index of the word guesseduserGuess - the user's guess for the actual word
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||