public abstract class AbstractWordPuzzle extends Object
Constructor and Description |
---|
AbstractWordPuzzle()
Constructor that creates an word puzzle whose puzzle word is
the empty string.
|
AbstractWordPuzzle(String puzzleWord)
Constructor that sets the puzzle word.
|
Modifier and Type | Method and Description |
---|---|
String |
getPuzzleWord()
Get the puzzle word
|
abstract String |
getSolution()
Get the solution word.
|
SortedSet<String> |
getSolutions()
Get a sorted set of all of the solution words.
|
void |
setPuzzleWord(String puzzleWord)
Set the puzzle word for this puzzle.
|
String |
toString()
Get the string representation of the puzzle.
|
public AbstractWordPuzzle()
public AbstractWordPuzzle(String puzzleWord)
puzzleWord
- the puzzle wordpublic abstract String getSolution()
public SortedSet<String> getSolutions()
The set returned by this method cannot be used to modify the solutions for this puzzle.
public final String getPuzzleWord()
public final void setPuzzleWord(String puzzleWord)
puzzleWord
- the puzzle wordpublic String toString()
" : "
followed by a comma separated
list of solutions words.toString
in class Object
Object.toString()