Relative Content

Tag Archive for java8

How the Stream.filter() method works?

I know how the lambda expresion works and I know it is an argument for .filter() that establish the criteria to filter with. But I don’t get how .filter() uses the argument, in this case a lambda expression, because .filter() does’t have an implementation or at least require one at compile time. I search for this unknown implementation in the Oracle’s site but there are just a few words explaning how it works and no code at all.

How the Stream.filter() method works?

I know how the lambda expresion works and I know it is an argument for .filter() that establish the criteria to filter with. But I don’t get how .filter() uses the argument, in this case a lambda expression, because .filter() does’t have an implementation or at least require one at compile time. I search for this unknown implementation in the Oracle’s site but there are just a few words explaning how it works and no code at all.

Java Streams API Documentation

Currently learning Java so this may be a question resulting from lack of understanding of Java (while also learning Streams API)