public static String quoteValues ( Collection < String > values ) { StringBuilder sb = new StringBuilder ( ) ; boolean first = true ; for ( String s : values ) { if ( ! first ) sb . append ( "," ) ; first = false ; sb . append ( quoteValue ( s ) ) ; } return sb . toString ( ) ; }
Quotes and escapes a list of values so that they can be used in a SimpleDB query .