This post shows how to create and use Lists in Kotlin. It will also briefly touch on mutable and immutable lists.
The Composite Design Pattern In Rust
This post shows how to use the Composite design pattern in Rust. Also, it offers a sample implementation with two levels of composition. For instance, we have a group of lists of products. The Composite Design Pattern Use Case Our
Sort Lists in Java 8 using Comparator
This post demonstrates how to use Java 8 Comparator by examples.
How to find objects with specific properties in a List using Apache Commons Collections
You overridden your JavaBean class’ hashCode and equals methods so you can easily find (and manipulate) objects in a list. Now most properties are used in those methods. But what if you want to search for a list of objects by one or two properties only? Surely, you do not need to create a “search” object and set all its properties with values. Will you resort to loop and conditional statements? Will you modify the hashCode and equals methods? To introduce the least possible codes and/or not modify existing JavaBeans, we could use Predicate interface in conjunction with ListUtils from Apache Commons Collection.