I am currently using the contains method belonging to the ArrayList class for making a search. Is there a way to make this search case insensitive in java? I found that in C
You can use IterableUtils and Predicate from collections4 (apache).
List pformats= Arrays.asList("Test","tEst2","tEsT3","TST4");
Predicate predicate = (s) -> StringUtils.equalsIgnoreCase(s, "TEST");
if(IterableUtils.matchesAny(pformats, predicate)) {
// do stuff
}
IterableUtils(collections4): org.apache.commons.collections4.IterableUtils.html