This exercise investigates how Java handles functions
using a pair of common interfaces.
It's a good precursor to lambda expressions,
and it's a good way to explore Bloch's Item 14.
Comparator
that reverses the natural ordering
implemented by Comparable
.
Exercise your implementation in the context of a Treeset
.
Does this implementation satisfy the Comparator
contract?
Exactly what does that mean?
Can you generify your implementations?
Comparator<Integer>
that uses absolute values.