Java List Concatenate concat(List words)

Here you can find the source of concat(List words)

Description

concat

License

Open Source License

Declaration

private static String concat(List<String> words) 

Method Source Code

//package com.java2s;
/**/*from ww  w.j  av  a 2s.  c om*/
 * This software is released under the University of Illinois/Research and Academic Use License. See
 * the LICENSE file in the root folder for details. Copyright (c) 2016
 *
 * Developed by: The Cognitive Computation Group University of Illinois at Urbana-Champaign
 * http://cogcomp.cs.illinois.edu/
 */

import java.util.List;

public class Main {
    private static String concat(List<String> words) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < words.size(); i++)
            sb.append(i > 0 ? "@" : "").append(words.get(i));
        return sb.toString();
    }
}

Related

  1. concat(List lista, List listb)
  2. concat(List items, String quotation, String separation)
  3. concat(List items, String separator)
  4. concat(List strings, String separator)
  5. concat(List tokens)
  6. concat(List... lists)
  7. concat(List lista, String sep, StringBuilder destino)
  8. concat(List a, List b)
  9. concat(List collection1, List collection2)