Use in Comparing Objects

Ralph Lecessi · Apress eBooks · 2019

Functional interfaces have changed the way data is compared in Java. This is due to the enhancements to the Comparator interface, and the addition of several methods that utilize it in the Java API. Comparator is a functional interface that is used to compare two objects. Its functional method, called compare, takes two arguments of type T and returns an integer. Chains of comparators can be built using the Comparator interface’s default thenComparing methods.

Read the paper · More papers on PaperTik