Here you can find the source of clone(List> doc)
public static List<List<String>> clone(List<List<String>> doc)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { public static List<List<String>> clone(List<List<String>> doc) { List<List<String>> docClone = new ArrayList<List<String>>(); for (List<String> tokens : doc) { List<String> tokensClone = new ArrayList<String>(); for (String token : tokens) { tokensClone.add(token);//www. jav a 2s .c om } docClone.add(tokensClone); } return docClone; } }