Currying and java