Java Weekly, Issue 184
Lots of interesting writeups on Java 9 this week. Here we go… 1. Spring and Java >> Are Java 8 Streams Truly Lazy? Not Completely! [blog.jooq.org] It turns out that the Java 8 Streams API is not...
View ArticleConsumer Driven Contracts with Pact
1. Overview In this quick article, we’ll be looking at the concept of Consumer-Driven Contracts. We will be testing integration with some external REST service through a contract using the Pact...
View ArticleData Classes in Kotlin
1. Overview The Kotlin language introduces the concept of Data Classes, which represent simple classes used as data containers and do not encapsulate any additional logic. Simply put, Kotlin’s...
View ArticleConverting a List to Map in Kotlin
1. Introduction In this quick tutorial, we’ll see how we can convert a List to a Map in Kotlin. 2. Implementation Kotlin offers the convenient toMap method which, given a list of complex objects, will...
View ArticleWhat is the serialVersionUID?
1. Overview Simply put, the serialVersionUID is a unique identifier for Serializable classes. This is used during the deserialization of an object, to ensure that a loaded class is compatible with the...
View ArticleQuick Guide to the Guava RateLimiter
1. Overview In this article, we’ll be looking at the RateLimiter class from the Guava library. The RateLimiter class is a construct that allows us to regulate the rate at which some processing...
View ArticleApache Commons Collections BidiMap
1. Overview In this short article, we’ll be looking at an interesting data structure in the Apache Commons Collections library – the BidiMap. The BidiMap adds a possibility of looking up the key using...
View ArticleZipping Collections in Java
1. Introduction In this tutorial, we’ll illustrate how to zip two collections into one logical collection. The “zip” operation is slightly different from the standard “concat” or “merge”. While the...
View ArticleBloom Filter in Java using Guava
1. Overview In this article, we’ll be looking at the Bloom filter construct from the Guava library. A Bloom filter is a memory-efficient, probabilistic data structure that we can use to answer the...
View ArticleTemporalAdjuster in Java
1. Overview In this tutorial, we’ll have a quick look at the TemporalAdjuster and use it in a few practical scenarios. Java 8 introduced a new library for working with dates and times – java.time and...
View ArticleA Guide to Apache Commons DbUtils
1. Overview Apache Commons DbUtils is a small library that makes working with JDBC a lot easier. In this article, we’ll implement examples to showcase its features and capabilities. 2. Setup 2.1....
View ArticleSpring Remoting with RMI
1. Overview Java Remote Method Invocation allows invoking an object residing in a different Java Virtual Machine. It is a well-established technology yet a little cumbersome to use, as we can see in...
View ArticleIntro to Security and WebSockets
1. Introduction In a previous article, we showed how to add WebSockets to a Spring MVC project. Here, we’ll describe how to add security to Spring WebSockets in Spring MVC. Before continuing, make...
View ArticleA Guide to Apache Commons Collections CollectionUtils
1. Overview Simply put, the Apache CollectionUtils provides utility methods for common operations which cover a wide range of use cases and helps in avoiding writing boilerplate code. The library...
View ArticleIntroduction to Minimax Algorithm
1. Overview In this article, we’re going to discuss Minimax algorithm and its applications in AI. As it’s a game theory algorithm, we’ll implement a simple game using it. We’ll also discuss the...
View ArticleIntroduction to Vavr’s Either
1. Overview Vavr is an open source object-functional language extension library for Java 8+. It helps to reduce the amount of code and to increase the robustness. In this article, we’ll learn about...
View ArticleOverview of Kotlin Collections API
1. Overview In this quick tutorial, we’ll introduce the Kotlin’s Collections API, and we’ll discuss the different collection types in Kotlin and some common operations on collections. 2. Collection...
View ArticleA Guide to JUnit 5 Extensions
1. Overview In this article, we’re going to take a look at the extension model in the JUnit 5 testing library. As the name suggests, the purpose of Junit 5 extensions is to extend the behavior of test...
View ArticleDrools Spring Integration
1. Introduction In this quick tutorial, we’re going to integrate Drools with Spring. If you’re just getting started with Drools, check out this intro article. 2. Maven Dependencies Let’s start by...
View ArticleLazy Initialization in Kotlin
1. Overview In this article, we’ll be looking at one of the most interesting features in the Kotlin syntax – which is the lazy keyword – used for creating lazy-initialized objects. We will be also...
View Article