One function and java 8