protected Collection < String > mapAliases ( Collection < String > values ) { LinkedHashSet < String > result = new LinkedHashSet < String > ( ) ; for ( String value : values ) { String alias = aliases . get ( value ) ; if ( alias != null ) { result . add ( alias ) ; } else { log . warn ( "Unsupported value " + value + " found" ) ; } } return result ; }
Method iterates all values in the input for each tries to resolve correct alias . When alias value is found it is entered into the return collection otherwise warning is logged . Values are returned in order of input with all duplicities removed .