Add functional java