Skip to content

Glossary: Software Design Patterns in Java

Comparator

A Java object or lambda that says how to order two items. It is the varying rule you hand to `sort`, which makes it a strategy.

Where the book teaches it

Related terms

Strategy