I have a List
List
List list = new ArrayList(); list.add(\"ABCD\"); list.add(\"EFGH\"); list.add(\"IJ KL\")
Perhaps you want to put each String group into a HashSet, and by fragment, I mean don't add "IJ KL" but rather add "IJ" and "KL" separately. If you need both the list and this search capabilities, you may need to maintain two collections.