@ Override public HolidayMap getHolidays ( final int nYear , @ Nullable final String ... aArgs ) { final HolidayMap aHolidays = super . getHolidays ( nYear , aArgs ) ; final HolidayMap aAdditionalHolidays = new HolidayMap ( ) ; for ( final Map . Entry < LocalDate , ISingleHoliday > aEntry : aHolidays . getMap ( ) . entrySet ( ) ) { final LocalDate aTwoDaysLater = aEntry . getKey ( ) . plusDays ( 2 ) ; if ( aHolidays . containsHolidayForDate ( aTwoDaysLater ) ) { final LocalDate aBridgingDate = aTwoDaysLater . minusDays ( 1 ) ; aAdditionalHolidays . add ( aBridgingDate , new ResourceBundleHoliday ( EHolidayType . OFFICIAL_HOLIDAY , BRIDGING_HOLIDAY_PROPERTIES_KEY ) ) ; } } aHolidays . addAll ( aAdditionalHolidays ) ; return aHolidays ; }
Implements the rule which requests if two holidays have one non holiday between each other than this day is also a holiday .