I don't think we should add filterWith in Java this way. It would make sense to have a new function class that has two interfaces (initialize on each partition, and process each other) rather than overriding two classes.