Here you can find the source of createSpaceDelimitedString(List
private static String createSpaceDelimitedString(List<String> stringList)
//package com.java2s; /******************************************************************************* * Copyright (c) 2007, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from ww w . jav a 2 s . c om*/ * IBM Corporation - initial API and implementation * yyyymmdd bug Email and other contact information * -------- -------- ----------------------------------------------------------- * 20071030 196997 pmoogk@ca.ibm.com - Peter Moogk * 20080325 222095 pmoogk@ca.ibm.com - Peter Moogk * 20080626 238635 pmoogk@ca.ibm.com - Peter Moogk, Locally added service policy nodes meta data coliding with state data. *******************************************************************************/ import java.util.List; public class Main { private static String createSpaceDelimitedString(List<String> stringList) { StringBuffer buffer = new StringBuffer(); for (int index = 0; index < stringList.size(); index++) { String id = stringList.get(index); buffer.append(id); if (index < (stringList.size() - 1)) buffer.append(' '); } return buffer.toString(); } }