I agree with a previous answer that Google Guava is probably helping a lot here, readability-wise:
final Iterables.removeIf(list, new Predicate<String>() {
@Override
public boolean apply(String input) {
if(input.contains("How")) { //or more complex pattern matching
return true;
}
return false;
}
});
Please note that this is basically a duplicate of Guava - How to remove from a list, based on a predicate, keeping track of what was removed?