Class EzText

Object
  extended by EzText

public class EzText
extends Object


Constructor Summary
EzText(String filename)
          Construct an EzText object by reading in the words of a file.
 
Method Summary
 Integer getLength()
          Get the number of words in this text.
 String getWord(Integer i)
          Get a specified numbered word in this text.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EzText

public EzText(String filename)
Construct an EzText object by reading in the words of a file.

Parameters:
filename - the name of the file.
Method Detail

getWord

public String getWord(Integer i)
Get a specified numbered word in this text.

Parameters:
i - the word number sought. (Note: first word is #0)
Returns:
the ith word in this text.

getLength

public Integer getLength()
Get the number of words in this text. Note: last word is #(length-1).

Returns:
the number of words in this text.