public Cron map ( final Cron cron ) { Preconditions . checkNotNull ( cron , "Cron must not be null" ) ; final List < CronField > fields = new ArrayList <> ( ) ; for ( final CronFieldName name : CronFieldName . values ( ) ) { if ( mappings . containsKey ( name ) ) { fields . add ( mappings . get ( name ) . apply ( cron . retrieve ( name ) ) ) ; } } return cronRules . apply ( new SingleCron ( to , fields ) ) . validate ( ) ; }
Maps given cron to target cron definition .