this should also be mentioned in the scaladoc for this method, pointing out that using Java8 lambda with it will not work