Find element position in a Java TreeMap
问题 I am working with a TreeMap of Strings TreeMap<String, String> , and using it to implement a Dictionay of words. I then have a collection of files, and would like to create a representation of each file in the vector space (space of words) defined by the dictionary. Each file should have a vector representing it with following properties: vector should have same size as dictionary for each word contained in the file the vector should have a 1 in the position corresponding to the word position