comparison src/share/tools/ProjectCreator/Util.java @ 6948:e522a00b91aa

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author Doug Simon <doug.simon@oracle.com>
date Mon, 12 Nov 2012 23:14:12 +0100
parents 0654ee04b214 b9a9ed0f8eeb
children
comparison
equal deleted inserted replaced
6711:ae13cc658b80 6948:e522a00b91aa
1 /* 1 /*
2 * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
24 24
25 import java.util.*; 25 import java.util.*;
26 import java.io.File; 26 import java.io.File;
27 27
28 public class Util { 28 public class Util {
29 static String join(String padder, Vector v) { 29
30 static String join(String padder, Vector<String> v) {
30 return join(padder, v, false); 31 return join(padder, v, false);
31 } 32 }
32 33
33 static String join(String padder, Vector v, boolean quoted) { 34 static String join(String padder, Vector<String> v, boolean quoted) {
34 StringBuffer sb = new StringBuffer(); 35 StringBuffer sb = new StringBuffer();
35 36
36 for (Iterator iter = v.iterator(); iter.hasNext(); ) { 37 for (Iterator<String> iter = v.iterator(); iter.hasNext(); ) {
37 if (quoted) { 38 if (quoted) {
38 sb.append('"'); 39 sb.append('"');
39 } 40 }
40 sb.append((String)iter.next()); 41 sb.append(iter.next());
41 if (quoted) { 42 if (quoted) {
42 sb.append('"'); 43 sb.append('"');
43 } 44 }
44 if (iter.hasNext()) sb.append(padder); 45 if (iter.hasNext()) sb.append(padder);
45 } 46 }
46 47
47 return sb.toString(); 48 return sb.toString();
48 } 49 }
49 50
50 51
51 static String prefixed_join(String padder, Vector v, boolean quoted) { 52 static String prefixed_join(String padder, Vector<String> v, boolean quoted) {
52 StringBuffer sb = new StringBuffer(); 53 StringBuffer sb = new StringBuffer();
53 54
54 for (Iterator iter = v.iterator(); iter.hasNext(); ) { 55 for (Iterator<String> iter = v.iterator(); iter.hasNext(); ) {
55 sb.append(padder); 56 sb.append(padder);
56 57
57 if (quoted) { 58 if (quoted) {
58 sb.append('"'); 59 sb.append('"');
59 } 60 }