Java List Create createSpaceDelimitedString(List stringList)

Here you can find the source of createSpaceDelimitedString(List stringList)

Description

create Space Delimited String

License

Open Source License

Declaration

private static String createSpaceDelimitedString(List<String> stringList) 

Method Source Code

//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();
    }
}

Related

  1. createRegion(String string, List regionList, int startIndex, int endIndex)
  2. createReleasesString(List tagsList)
  3. createResponse(String inputLabel, List imageLabels)
  4. createSingletonList(T element)
  5. createSourceExtensionList(Map sourceExtensionMap)
  6. createStringDummyList()
  7. createStringFromIntArray( List listOfNumbers)
  8. createStringFromIntegerList(List lst)
  9. CreateStringList(Collection values)