Re:The Evil Within the Comparison Functions
by tpxl on Monday February 19, 2018 @05:17AM
(#16411960)
Java 8 also has `Comparator::comparing` and `Comparator::thenComparing`, so your code example above would be
This makes much more sense than your example I think, since it will use the same getter on both methods, completely eliminating this class of errors.
[ Parent
| on HN ]
There are no comments on this comment yet.