@ Nonnull @ ReturnsMutableCopy private HolidayMap _getHolidays ( final int nYear , @ Nonnull final Configuration aConfig , @ Nullable final String ... aArgs ) { if ( LOGGER . isDebugEnabled ( ) ) LOGGER . debug ( "Adding holidays for " + aConfig . getDescription ( ) ) ; final HolidayMap aHolidayMap = new HolidayMap ( ) ; for ( final IHolidayParser aParser : _getParsers ( aConfig . getHolidays ( ) ) ) aParser . parse ( nYear , aHolidayMap , aConfig . getHolidays ( ) ) ; if ( ArrayHelper . isNotEmpty ( aArgs ) ) { final String sHierarchy = aArgs [ 0 ] ; for ( final Configuration aSubConfig : aConfig . getSubConfigurations ( ) ) { if ( sHierarchy . equalsIgnoreCase ( aSubConfig . getHierarchy ( ) ) ) { // Recursive call final HolidayMap aSubHolidays = _getHolidays ( nYear , aSubConfig , ArrayHelper . getCopy ( aArgs , 1 , aArgs . length - 1 ) ) ; aHolidayMap . addAll ( aSubHolidays ) ; break ; } } } return aHolidayMap ; }
Parses the provided configuration for the provided year and fills the list of holidays .