Use this tag for questions related to the use of the Stream API.
In JDK 8 with lambda b93 there was a class java.util.stream.Streams.zip in b93 which could be used …
lambda functional-programming java-8 lazy-evaluation java-streamI was asked this at an interview and I'm not convinced I gave the best answer I could have. I …
java loops java-8 java-streamI understand that with .stream(), I can use chain operations like .filter() or use parallel stream. But what is difference …
java collections java-8 java-streamIs there a Java 8 stream operation that limits a (potentially infinite) Stream until the first element fails to match a …
java java-8 java-streamIs there a differnce in using the following contstructs, other than slightly better readability in the latter? someList.stream().map(…
java lambda java-8 java-stream method-referenceI have two (or more) Map<String, Integer> objects. I'd like to merge them with Java 8 Stream API …
java merge java-8 java-streamI have the following Stream: Stream<T> stream = stream(); T result = stream.filter(t -> { double x = …
java java-8 java-stream optionalI have the following expression: scheduleIntervalContainers.stream() .filter(sic -> ((ScheduleIntervalContainer) sic).getStartTime() != ((ScheduleIntervalContainer)sic).getEndTime()) .collect(Collectors.toList()); ...…
java java-8 java-stream instanceofSuppose I have a map of given name, surname pairs and I want to find the given name of the …
java lambda java-8 java-stream optionalCurrently whenever I need to create stream from an array, I do String[] array = {"x1", "x2"}; Arrays.asList(array).stream(); …
java arrays java-8 java-stream