With the java.time API it is possible to compare two dates using the following syntax:
All you're trying to do here is to compare the date to just one of your "3 or more" dates: you just have to work out which one that is, and then compare two dates.
Comparable<Date>, you can use
Collections.max to find the earliest and latest of them:
Date earliest = Collections.min(Arrays.asList(date1, date2, date3)); Date latest = Collections.max(Arrays.asList(date1, date2, date3));
boolean beforeEarliest = date.before(earliest); boolean afterLatest = date.after(latest);