public String describe ( final Cron cron ) { Preconditions . checkNotNull ( cron , "Cron must not be null" ) ; final Map < CronFieldName , CronField > expressions = cron . retrieveFieldsAsMap ( ) ; final Map < CronFieldName , FieldDefinition > fieldDefinitions = cron . getCronDefinition ( ) . retrieveFieldDefinitionsAsMap ( ) ; return new StringBuilder ( ) . append ( describeHHmmss ( expressions ) ) . append ( " " ) . append ( describeDayOfMonth ( expressions ) ) . append ( " " ) . append ( describeMonth ( expressions ) ) . append ( " " ) . append ( describeDayOfWeek ( expressions , fieldDefinitions ) ) . append ( " " ) . append ( describeYear ( expressions ) ) . toString ( ) . replaceAll ( "\\s+" , " " ) . trim ( ) ; }
Provide a description of given CronFieldParseResult list .