Java StreamsTag ArchiveSubscribe
java-stream-skip-vs-limit
Java 8 Stream skip() vs limit() 1. Introduction In this short article, we’ll talk about the skip() and limit() methods of the Java Stream API and highlight their similarities and differences. Even though these two operations may look quite similar at first, they actually behave very differently and are not… Continue Reading java-stream-skip-vs-limit
java-8-parallel-streams-custom-threadpool
Custom Thread Pools In Java 8 Parallel Streams 1. Overview Java 8 introduced the concept of Streams as an efficient way of carrying out bulk operations on data. And parallel Streams can be obtained in environments that support concurrency. These streams can come with improved performance – at the cost… Continue Reading java-8-parallel-streams-custom-threadpool
java-groupingby-collector
Guide to Java 8 groupingBy Collector 1. Introduction In this article, we’ll see how the groupingBy collector works using various examples. To understand the material covered in this article, a basic knowledge of Java 8 features is needed. You can have a look at the intro to Java 8 Streams… Continue Reading java-groupingby-collector
java-streams-distinct-by
DistinctBy in the Java Stream API 1. Overview Searching for different elements in a list is one of the common tasks that we as programmers usually face. From Java 8 on with the inclusion of Streams we have a new API to process data using functional approach. In this article,… Continue Reading java-streams-distinct-by
java-protonpack
Introduction to Protonpack 1. Overview In this tutorial, we’ll look at the major features of Protonpack which is a library that expands the standard Stream API by adding some complimentary functionality. Refer to this write-up here to discover the fundamentals of the Java Stream API. 2. Maven Dependency To use the Protonpack… Continue Reading java-protonpack
java-null-safe-streams-from-collections
Java Null-Safe Streams from Collections Java Java Collections Java Streams 1. Overview In this tutorial, we’ll see how to create null-safe streams from Java collections. To start with, some familiarity with Java 8’s Method References, Lambda Expressions, Optional and Stream API is required to fully understand this material. If you are… Continue Reading java-null-safe-streams-from-collections
java-stream-ordering
Stream Ordering in Java 1. Overview In this tutorial, we’ll dive into how different uses of the Java Stream API affect the order in which a stream generates, processes, and collects data. We’ll also look at how ordering influences performance. 2. Encounter Order Simply put, encounter order is the order in which a… Continue Reading java-stream-ordering
java-string-to-stream
Converting String to Stream of chars 1. Overview Java 8 introduced the Stream API, with functional-like operations for processing sequences. If you want to read more about it, have a look at this article. In this quick article, we’ll see how to convert a String to a Stream of single… Continue Reading java-string-to-stream