is there any way to check if a collection contain a value or more with better performance than looping twice with contains?
in other meaning something that would loo
You can also use regex as follows:
person.toString().matches(".*\\b(Joe|Jasha)\\b.*");
You will get a boolean value indicating whether it is present or not.