Java Stream Filter with Lambda Expression 1. Introduction In this quick tutorial, we’ll explore the use of the Stream.filter() method when we work with Streams in Java. We’ll show how to use it and how to handle special cases with checked exceptions. 2. Using Stream.filter() The filter() method is an intermediate… Continue Reading java-stream-filter-lambda

Removing Elements from Java Collections 1. Overview In this quick tutorial, we’re going to talk about four different ways to remove items from Java Collections that match certain predicates. We’ll naturally also look at some of the caveats. 2. Defining our Collection First, we’re going to illustrate two approaches that mutate the original… Continue Reading java-collection-remove-elements

Guide to Java Parallel Collectors Library 1. Introduction Parallel-collectors is a small library that provides a set of Java Stream API collectors that enable parallel processing – while at the same time circumventing main deficiencies of standard Parallel Streams. 2. Maven Dependencies If we want to start using the library,… Continue Reading java-parallel-collectors

Java 8 Stream API Analogies in Kotlin 1. Introduction Java 8 introduced the concept of Streams to the collection hierarchy. These allow for some very powerful processing of data in a very readable way, utilizing some functional programming concepts to make the process work. We will investigate how can we… Continue Reading java-8-stream-vs-kotlin