Java List Prepend prepend(String start, List suggestions)

Here you can find the source of prepend(String start, List suggestions)

Description

prepend

License

Open Source License

Declaration

public static List<String> prepend(String start,
            List<String> suggestions) 

Method Source Code

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

import java.util.*;

public class Main {
    public static List<String> prepend(String start,
            List<String> suggestions) {
        if (start.isEmpty()) {
            return suggestions;
        }//from ww w  .  j  a  va 2s.c  o m
        suggestions = new ArrayList<>(suggestions);
        for (int i = 0; i < suggestions.size(); i++) {
            suggestions.set(i, start + suggestions.get(i));
        }
        return suggestions;
    }
}

Related

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