Here you can find the source of prepend(String start, List
public static List<String> prepend(String start, List<String> suggestions)
//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; } }