Java List Concatenate concatSynopsises( List prefixes, List ss)

Here you can find the source of concatSynopsises( List prefixes, List ss)

Description

concat Synopsises

License

Open Source License

Declaration

private static List<StringBuilder> concatSynopsises(
            List<StringBuilder> prefixes, List<StringBuilder> ss) 

Method Source Code

//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;
    }
}

Related

  1. concatPathTokens(String root, List tokens)
  2. concatRefs(List refs)
  3. concatString(List args)
  4. concatStrings(List values, String separator)
  5. concatSuper(List collection1, List collection2)
  6. concatTwoList(List fromList, List toList)
  7. concatValues(List stringValues, boolean spaceSeparated)
  8. concatWithSeparator(List list, Object delimiter)
  9. concatWithSeparator(List missingParameters, String separator)