|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.bluebones.boggle.Dictionary
public class Dictionary
Represents a dictionary in which words can be checked for validity.
Constructor Summary | |
---|---|
Dictionary(File f)
Initialises a Dictionary using the specified file. |
|
Dictionary(InputStream is)
Initialises a Dictionary using the specified
InputStream . |
Method Summary | |
---|---|
boolean |
isValid(String word)
Determines if the specified word is valid (in the dictionary). |
static void |
main(String[] args)
Simple commandline test of Dictionary. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Dictionary(File f) throws FileNotFoundException, IOException
f
- File to use for the dictionary.
FileNotFoundException
- If the file cannot be found.
IOException
- If there is any problem reading the
dictionary.public Dictionary(InputStream is) throws IOException
Dictionary
using the specified
InputStream
.
is
- InputStream to initialise the dictionary from.
IOException
- If there is any problem reading the dictionary.Method Detail |
---|
public boolean isValid(String word)
word
- Word to check.
boolean
, true
if the word is
in the dictionary.public static void main(String[] args) throws FileNotFoundException, IOException
args
- Commandline arguments.
FileNotFoundException
- If the file cannot be found.
IOException
- If there is any problem reading the
dictionary.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |