private String clean ( final Collection < String > values ) { if ( values == null || values . size ( ) == 0 ) { return "" ; } final List < String > strs = Lists . newArrayList ( ) ; for ( String v : values ) { final String tmp = v . replaceAll ( "\\{.*\\}" , "" ) ; final int ix = tmp . lastIndexOf ( ' ' ) ; if ( ix < 0 ) { strs . add ( tmp ) ; } else { strs . add ( tmp . substring ( ix + 1 ) ) ; } } return DOUBLE_COMMA_JOINER . join ( strs ) ; }
Helper to clean out some characters