I need to iterate through a text and take each word of it, store it in a structure (as TreeMap
) and next to each word the lines in which they appear, to generate an index.
My big question has been how to structure this, because using TreeMap
I can put the word, but only a Integer
for each word?