Here you can find the source of concatSynopsises( List
private static List<StringBuilder> concatSynopsises( List<StringBuilder> prefixes, List<StringBuilder> ss)
//package com.java2s; /******************************************************************************* * Copyright (c) 2008 xored software, Inc. * * 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://from w ww . j a v a2s. c om * xored software, Inc. - initial API and Implementation (Andrei Sobolev) *******************************************************************************/ import java.util.ArrayList; import java.util.List; public class Main { private static List<StringBuilder> concatSynopsises( List<StringBuilder> prefixes, List<StringBuilder> ss) { List<StringBuilder> newList = new ArrayList<StringBuilder>(); if (prefixes.size() == 0) return ss; for (StringBuilder prefix : prefixes) { for (StringBuilder s : ss) { newList.add(new StringBuilder(prefix.length() + s.length() + 1).append(prefix).append(" ").append(s)); //$NON-NLS-1$ } } return newList; } }