src/share/tools/ProjectCreator/Util.java

Print this page
rev 3265 : 0000000: Updated projectcreator
Summary: Refactoring
Reviewed-by:
Contributed-by: nils.eliasson@oracle.com

*** 24,59 **** import java.util.*; import java.io.File; public class Util { ! static String join(String padder, Vector v) { return join(padder, v, false); } ! static String join(String padder, Vector v, boolean quoted) { StringBuffer sb = new StringBuffer(); ! for (Iterator iter = v.iterator(); iter.hasNext(); ) { if (quoted) { sb.append('"'); } ! sb.append((String)iter.next()); if (quoted) { sb.append('"'); } if (iter.hasNext()) sb.append(padder); } return sb.toString(); } ! static String prefixed_join(String padder, Vector v, boolean quoted) { StringBuffer sb = new StringBuffer(); ! for (Iterator iter = v.iterator(); iter.hasNext(); ) { sb.append(padder); if (quoted) { sb.append('"'); } --- 24,60 ---- import java.util.*; import java.io.File; public class Util { ! ! static String join(String padder, Vector<String> v) { return join(padder, v, false); } ! static String join(String padder, Vector<String> v, boolean quoted) { StringBuffer sb = new StringBuffer(); ! for (Iterator<String> iter = v.iterator(); iter.hasNext(); ) { if (quoted) { sb.append('"'); } ! sb.append(iter.next()); if (quoted) { sb.append('"'); } if (iter.hasNext()) sb.append(padder); } return sb.toString(); } ! static String prefixed_join(String padder, Vector<String> v, boolean quoted) { StringBuffer sb = new StringBuffer(); ! for (Iterator<String> iter = v.iterator(); iter.hasNext(); ) { sb.append(padder); if (quoted) { sb.append('"'); }