At most one LocalDate per month in a list
Bit late but there is Guava built-in method for that - Maps.uniqueIndex - given:

List&lt;LocalDate&gt; dates = Arrays.asList(
     new LocalDate(2012,3,25), new LocalDate(2012,4,30), new LocalDate(2013,3,26);


with JDK 8:

Maps.uniqueIndex(dates, LocalDate::getMonthOfYear);


or with JDK &lt;7:

Maps.uniqueIndex(dates, new Function&lt;LocalDate, Integer&gt;() {
    @Override
    public Integer apply(final LocalDate date) {
      return date.getMonthOfYear();
    }
});


It will throw 

java.lang.IllegalArgumentException: duplicate key: 3


in this example.