I have a HashSet of Strings in the format: something_something_name="value"
Set<String> name= new HashSet<String>();
Farther down in my code I want to check if a String "name"
is included in the HashSet. In this little example, if I'm checking to see if "name"
is a substring of any of the values in the HashSet, I'd like it to return true.
I know that .contains()
won't work since that works using .equals()
. Any suggestions on the best way to handle this would be great.