Return to site

JAVA STREAM MADE SIMPLE by Java Champion Tagir Valeev

· java

Here an animation made by Java Champion Tagir Valeev

, which illustrates Java Stream API processing:

AtomicLong cnt = new AtomicLong();
source .stream()
	.map(x -> x.squash())
	.peek(x -> cnt.incrementAndGet())
	.filter(x -> x.getColor() != YELLOW)
	.forEach(System.out::println);
Section image