Java List to Array convertToArray(final List> list)

Here you can find the source of convertToArray(final List> list)

Description

convert To Array

License

Apache License

Parameter

Parameter Description
list a parameter

Declaration

public static <Entity> Object[][] convertToArray(final List<List<Object>> list) 

Method Source Code

//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;
    }
}

Related

  1. asBooleanArray(List list)
  2. asByteArray(final List l)
  3. asClassArray(List> list)
  4. convertStringListToArray(List list)
  5. convertStringListToArray(List list)
  6. convertToArray(List list)
  7. convertToArray(List args)
  8. listToArray(final List list)
  9. listToArray(final List a)