Class WordFile

java.lang.Object
  extended by WordFile

public class WordFile
extends java.lang.Object

A wrapper class for dealing with text files of words

Version:
2013.10.31
Author:
Joel

Constructor Summary
WordFile()
          Creates a new word file from the default file ("words1500.txt");
WordFile(java.lang.String filename)
          Creates a new word file from the given file
 
Method Summary
 java.lang.String[] getWordArray()
          Gets the words from the WordFile as an array
 java.util.ArrayList<java.lang.String> getWordArrayList()
          Gets the words from the WordFile as an ArrayList
 
Methods inherited from class
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordFile

public WordFile()
Creates a new word file from the default file ("words1500.txt");


WordFile

public WordFile(java.lang.String filename)
Creates a new word file from the given file

Parameters:
filename - The name of a local file (in the same directory) with a list of words.
Method Detail

getWordArray

public java.lang.String[] getWordArray()
Gets the words from the WordFile as an array

Returns:
an array of the words (each represented as a String)

getWordArrayList

public java.util.ArrayList<java.lang.String> getWordArrayList()
Gets the words from the WordFile as an ArrayList

Returns:
an ArrayList of the words (each represented as a String)