Here you can find the source of singleQuoatanizeStringList(List
Parameter | Description |
---|---|
entries | a parameter |
public static List<String> singleQuoatanizeStringList(List<String> entries)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class Main { /**/* ww w . j ava 2 s. co m*/ * Place single quotes around the individual entries in a List of Strings * @param entries * @return */ public static List<String> singleQuoatanizeStringList(List<String> entries) { List<String> quotedEntries = new ArrayList<String>(entries == null ? 0 : entries.size()); if (entries != null) { for (Iterator<String> iterator = entries.iterator(); iterator.hasNext();) { String entry = (String) iterator.next(); quotedEntries.add("'" + entry + "'"); } } return quotedEntries; } }