Java List Join join(List a_quotedArgs)

Here you can find the source of join(List a_quotedArgs)

Description

join

License

Open Source License

Parameter

Parameter Description
a_quotedArgs a parameter

Return

The strings in the list joined with spaces.

Declaration

public static String join(List a_quotedArgs) 

Method Source Code

//package com.java2s;
/*/*w  w  w .j  av a 2s. c  o  m*/
 * @(#) StringUtils.java Jul 20, 2005
 * Copyright 2005 Frequency Marketing, Inc. All rights reserved.
 * Frequency Marketing, Inc. PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

import java.util.List;

public class Main {
    /**
     * @param a_quotedArgs
     * @return The strings in the list joined with spaces.
     */
    public static String join(List a_quotedArgs) {
        StringBuffer joined = new StringBuffer();

        int quotedSize = a_quotedArgs.size();
        for (int index = 0; index < quotedSize; index++) {
            if (index > 0) {
                joined.append(' ');
            }
            joined.append(a_quotedArgs.get(index));
        }

        return joined.toString();
    }
}

Related

  1. join(final String separator, final List list)
  2. join(final String with, final List array)
  3. join(Iterable list)
  4. join(Iterable list, String delimiter)
  5. join(List a, List b)
  6. join(List array, String separator)
  7. join(List elements, String joinWith)
  8. join(List elements, String sep)
  9. join(List items, String separator)