Use this tag for questions related to the use of the Stream API.
I have generated a Stream in Java 8 with Files.walk() method from java.nio library. The problem is that the …
java filter functional-programming java-stream java.nio.fileI have the following objects: public class Item { String value; List<Person> owners; Person creator; } public class Person { …
java-8 java-stream collectorsWhat is the Java 8 functional interface for a method that takes nothing and returns nothing? I.e., the equivalent to …
java java-8 java-streamI can think of two ways: public static IntStream foo(List<Integer> list) { return list.stream().mapToInt(Integer::…
java collections java-8 java-stream boxingI have a method where I am traversing through a List and creating List. While doing so, I am calling …
java exception java-8 java-stream throwsAs for example, there are two lists: List<Double> list1 = Arrays.asList(1.0, 2.0); List<String> list2 = Arrays.…
java-8 java-stream collectorsI have the following collection type: Map<String, Collection<String>> map; I would like to create …
java java-8 java-stream cartesian-productI know there a similar questions asked in the forum but none of them seem to be addressing my problem …
lambda java-8 java-stream chaining collectorsI have a List<Valuta> which can be represented (simplified) JSON-style: [ { codice=EUR, description=Euro, ratio=1 }, { codice=USD, …
java java-8 grouping java-stream collectorsFor example I have class Person with name and surname fields. I want to collect a List of String (names …
java java-8 java-stream collectors