public class IndexMaker
extends java.lang.Object
| Constructor | Description |
|---|---|
IndexMaker() |
| Modifier and Type | Method | Description |
|---|---|---|
static DocumentIndex |
createIndex(java.lang.String inputName) |
The createIndex method checks if the file given by inputName exists, and, if it does,
uses that file to generate a DocumentIndex that it then returns.
|
static void |
main(java.lang.String[] args) |
The main method takes in the run arguments, and accounts for if some are missing.
|
static void |
writeIndexToFile(java.lang.String outputName,
DocumentIndex index) |
The writeIndexToFile method will write the index provided to the file with name
outputName or will generate that file with name outputName and then write the index
to it.
|
public static void main(java.lang.String[] args)
args - run arguments provided in a String[]public static DocumentIndex createIndex(java.lang.String inputName)
inputName - the name of the input file used to generate the DocumentIndexpublic static void writeIndexToFile(java.lang.String outputName,
DocumentIndex index)
throws java.io.IOException
outputName - the String value representing the name of the output file to be
written to or created then written toindex - the DocumentIndex that holds the index to be written to the output filejava.io.IOException - if an error occurs with the PrintWriter