Hi. Say I have a Hashtable<String, Object>
with such keys and values:
apple => 1
orange => 2
mossberg => 3
I can use the standard get
method to get 1 by "apple", but what I want is getting the same value (or a list of values) by a part of the key, for example "ppl". Of course it may yield several results, in this case I want to be able to process each key-value pair. So basically similar to the LIKE '%ppl%'
SQL statement, but I don't want to use a (in-memory) database just because I don't want to add unnecessary complexity. What would you recommend?
Update: Storing data in a Hashtable isn't a requirement. I'm seeking for a kind of a general approach to solve this.