Package cs2110

Class IndexerApp

java.lang.Object
cs2110.IndexerApp

public class IndexerApp extends Object
Indexes words found in text files specified via program arguments, printing the index to `System.out`. Implemented using the `Indexer` interface.
  • Constructor Details

    • IndexerApp

      public IndexerApp()
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Print an index of the words found in the files whose paths are provided in `args`. The index keys are the distinct words, after converting to upper case, in lexicographic order. The index entries are the paths to the files in which that word is found, deduplicated (by the exact path provided in `args`) and in lexicographic order, each followed by the list of distinct line numbers on which that word occurs (separated by spaces). Each entry line is indented with a tab character.
      Throws:
      IOException