I would suggest against naming this method filter, as it hashes against the Scala collections filter method.