Use java.util.function where possible