public static < T , U > List < U > map ( Collection < T > inputs , Mapper < T , U > mapper ) { if ( inputs == null ) { return null ; } List < U > outputs = new ArrayList <> ( inputs . size ( ) ) ; for ( T input : inputs ) { outputs . add ( mapper . apply ( input ) ) ; } return outputs ; }
Map input values to output values .