Java List Prepend prepend(String prefix, List strings)

Here you can find the source of prepend(String prefix, List strings)

Description

prepend

License

Open Source License

Declaration

public static List<String> prepend(String prefix, List<String> strings) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static List<String> prepend(String prefix, List<String> strings) {
        List<String> result = new ArrayList<String>();
        for (String string : strings) {
            result.add(prefix + string);
        }//w  w  w . ja va2  s  . c  o m
        return result;
    }
}

Related

  1. prepend(final List suffix, final T... values)
  2. prepend(final T value, final List list)
  3. prepend(List list, E e)
  4. prepend(List list, int minCapacity, E... items)
  5. prepend(String clang, List args)
  6. prepend(String start, List suggestions)
  7. prependInList(T el, T[] array)
  8. prependToList(A elem, List list)