A Concordance
A concordance is an alphabetical listing of words in a text that indicates the line numbers on which each word occurs.
Data values are maintained in the concordance by a map, indexed by strings and holding sets of integers.
A set is employed for the value stored under each key because the same word often appears on multiple difference line.