Here you can find the source of createCommaSeparatedListOfFullTypeNames(ListIterator
private static String createCommaSeparatedListOfFullTypeNames(ListIterator<String> strIt)
//package com.java2s; /******************************************************************************* * <copyright>/*from w w w .j a va 2s. com*/ * * Copyright (c) 2005, 2012 SAP AG 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: * Stefan Dimov - initial API, implementation and documentation * * </copyright> * *******************************************************************************/ import java.util.ListIterator; public class Main { private static String createCommaSeparatedListOfFullTypeNames(ListIterator<String> strIt) { if ((strIt == null) || !strIt.hasNext()) return null; StringBuilder res = new StringBuilder(strIt.next()); while (strIt.hasNext()) { res.append(", "); //$NON-NLS-1$ res.append(strIt.next()); } return res.toString(); } }