Here you can find the source of joinTokens(final List
Parameter | Description |
---|---|
tokens | a parameter |
sb | a parameter |
public final static StringBuffer joinTokens(final List<String> tokens)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { /**// ww w . j av a 2 s . com * Crudely join tokens together. * * @param tokens * @param sb * @return */ public final static StringBuffer joinTokens(final List<String> tokens) { final StringBuffer sb = new StringBuffer(); for (final String token : tokens) { sb.append(token); sb.append(" "); } return sb; } /** * Crudely join tokens together. * * @param tokens * @param sb * @return */ public final static StringBuffer joinTokens(final List<String> tokens, final StringBuffer sb) { for (final String token : tokens) { sb.append(token); sb.append(" "); } return sb; } }