Apache Commons FileUtils – File Operations

Apache Commons FileUtils has utility methods for file and directory manipulation. This post is on Apache Commons FileUtils file manipulation

August 10, 2020

Collectors minBy and maxBy

Collectors minBy and maxBy return a Collector that produces the minimal and maximal element according to a given Comparator

August 3, 2020

Comparator nullsFirst and nullsLast

Comparator nullsFirst and nullsLast methods returns a null-friendly comparator. It considers null to be less than or greater than any non-null value.

July 27, 2020

Summary Statistics in Java 8

Java 8 added three Summary Statistics classes viz., IntSummaryStatistics LongSummaryStatistics and DoubleSummaryStatistics used to collect statistics.

July 20, 2020

Apache Commons IOUtils

The Apache Commons IO has utilities to help with various IO functionalities. In this post, we will see about the Apache Commons IO IOUtils class.

July 14, 2020

Priority Queue in Java

A Priority Queue is an unbounded queue based on a priority heap. The elements are ordered according to their natural ordering or by a Comparator provided.

July 6, 2020

Bridge Design Pattern

The Bridge Design Pattern decouples an abstraction from its implementation so that the two can vary independently. This pattern is also known as Handle/Body.

June 29, 2020

Collectors partitioningBy in Java

The Collectors partitioningBy method in the Collectors class groups the elements of a stream by a predicate and an optional downstream collector

June 22, 2020

Three Ways to Sum a Stream of Numbers

In this post, we will see the three ways to sum a stream of numbers (using Java streams). We use the mapToInt, reduce, and collect methods.

June 15, 2020

Composite Design Pattern

The Composite Design Pattern composes objects into tree structures to represent part-whole hierarchies and lets clients treat individual objects and compositions of objects uniformly.

June 8, 2020