I have a large Set<String> that contains many words, say:
“aaa, cCc, dDD, AAA, bbB, BBB, AaA, CCc, …”
I want to group all duplicate words from the Set ignoring the case sensitivity of the words then save them in a Vector<Vector<String>> or whatever, so each Vector<String> item will contain the group of similar words, like this :
Vector<String>: aaa, AAA, AaA, …
Vector<String>: cCc, CCc, …
Vector<String>: bbB, BBB, …
I care about the performance as this Set contain many words.
I would create a
HashMap<String, Vector<String>> hashMap.Next, for each ‘string’ in your set
At the end, create a Vector of vectors if needed, or work with the hashmap.valueSet()