I am writing something in java that will try to "autocomplete" what a user is typing. I have used NSPredicate on iPhone apps to do this. It was very easy and worked well. I am hoping that there is something similar in java, but not having much luck finding it.
If something does not already exist to do this in java, does anyone have any suggestions on the best approach? I'm thinking of maybe doing something like having a Map with the key being "A", "B", "C", ... and the value being a list of sorted data that starts with the corresponding letter in order to get more manageable size lists and then iterating that list to find matches as each letter is typed.
Any other suggestions would be appreciated.
Thanks