Here you can find the source of convertToArray(final List> list)
Parameter | Description |
---|---|
list | a parameter |
public static <Entity> Object[][] convertToArray(final List<List<Object>> list)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { /**//from www .j ava 2 s .co m * @param list * @return */ public static <Entity> Object[][] convertToArray(final List<List<Object>> list) { final Object[][] array = new Object[list.size()][]; int i = 0; for (List<Object> nestedList : list) { array[i++] = nestedList.toArray(new Object[nestedList.size()]); } return array; } }