Java List to String asString(List commandLine)

Here you can find the source of asString(List commandLine)

Description

as String

License

Open Source License

Declaration

private static String asString(List<String> commandLine) 

Method Source Code

//package com.java2s;
/*/* w  ww .j a  v  a  2s  .  c o m*/
 * ====================================================================
 * Copyright (c) 2008 JavaGit Project.  All rights reserved.
 *
 * This software is licensed using the GNU LGPL v2.1 license.  A copy
 * of the license is included with the distribution of this source
 * code in the LICENSE.txt file.  The text of the license can also
 * be obtained at:
 *
 *   http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
 *
 * For more information on the JavaGit project, see:
 *
 *   http://www.javagit.com
 * ====================================================================
 */

import java.util.List;

public class Main {
    private static String asString(List<String> commandLine) {
        String s = "";
        for (String cmd : commandLine)
            s += (s.equals("") ? "" : " ") + cmd;

        return s;
    }
}

Related

  1. asString(List list)
  2. asStringList( Collection objects)
  3. asStringList(Collection list)
  4. asStringList(Collection objects)
  5. asStringList(List coll)