Java 8のStream APIについての紹介です。Stream APIではラムダ式を使うのでラムダ式を合わせて説明します。 ラムダ式(Lambda)Javaのラムダ式(Lambda)は、クロージャ(Closure)とも呼ばれています。ラムダ式は「関数型インターフェイス」の実装で使います。 @FunctionalInterface public interface IntFunc { public abstract void func(int x); } IntFunc intFunc1 = new IntFunc() { @Override public int func(int x) { return x + x; } }
![Java 8のStream API入門](https://cdn-ak-scissors.b.st-hatena.com/image/square/c2ea7e72d0d7f3ba6c237909f321e67ffbdaa24e/height=288;version=1;width=512/https%3A%2F%2Fmorizyun.github.io%2Fimg%2Fog_image.png)