<p>
newArrayList.
</p>

@param c a {@link java.util.Collection} object.
@param <E> a E object.
@return a {@link java.util.List} object.
500430
public static <E> List<E> newArrayList(Collection<? extends E> c) {
    return new ArrayList<E>(c);
  }
142096
public static <T> C.List<T> toList(Collection<? extends T> col) {
        if (col.size() == 0) {
            return Nil.list();
        }
        if (col instanceof C.List) {
            C.List<T> list = $.cast(col);
            if (list.is(C.Feature.IMMUTABLE)) {
                return list;
            }
        }
        return new ListBuilder<T>(col).toList();
    }
73595
public static <T> ArrayList<T> newArrayList(Iterable<T> iterable) {
		return (ArrayList<T>) list(false, iterable);
	}
893494
public static boolean[] toBooleanArray(Collection<Boolean> c){
        boolean arr[] = new boolean[c.size()];
        int i=0;
        for(Boolean item: c)
            arr[i++] = item;
        return arr;
    }
291240
public static final <E extends Enum<E>> E[] createTypeArray(Class<E> c)
   {
      return createTypeArray(c, 0);
   }
488731
@SuppressWarnings("unchecked")
    public static <E> E[] toArray(final Iterable<E> iterable) {
        return (E[]) newArrayList(iterable).toArray();
    }
928601
@Override
	public boolean addAll(Collection<? extends Integer> c) {
		Iterator<? extends Integer> iter=c.iterator();
		boolean didOne=false;
		while(iter.hasNext()) {
			add(iter.next().intValue());
			didOne=true;
		}
		return didOne;
	}
591934
public static <T extends Comparable<T>> void bucketSort(final List<T> c) {
        Array.bucketSort(c);
    }
846050
public static <E extends Comparable> List<E> toSortedListKeyComparable(Counter<E> c) {
    List<E> l = new ArrayList<E>(c.keySet());
    Collections.sort(l, toComparatorWithKeys(c));
    Collections.reverse(l);
    return l;
  }
395478
public static <T> List<T> toList(T[] array) {
        return new ArrayList<T>(Arrays.asList(array));
    }
945387
public static <T> List<T> repeatEach(final Collection<T> c, final int n) {
        N.checkArgNotNegative(n, "n");

        if (n == 0 || isNullOrEmpty(c)) {
            return new ArrayList<T>();
        }

        final List<T> result = new ArrayList<>(c.size() * n);

        for (T e : c) {
            for (int i = 0; i < n; i++) {
                result.add(e);
            }
        }

        return result;
    }
38267
static <T extends Comparable<T>> void bucketSort(final List<T> c) {
        if (N.isNullOrEmpty(c)) {
            return;
        }

        bucketSort(c, 0, c.size());
    }
474570
public static <E> ArrayList<E> newArrayList(Iterator<? extends E> elements) {
		ArrayList<E> list = newArrayList();
		while (elements.hasNext()) {
			list.add(elements.next());
		}
		return list;
	}
91431
private <T> ArrayList<T> list(T item)
	{
		return new ArrayList<T>(Collections.singletonList(item));
	}
1173718
public static <F> FullList<F> newList(final F... elements) {
		final FullList<F> l = new FullList<F>(null, FullList.DEFAULT_CAPACITY);
		l.addAll(Arrays.asList(elements));
		return l;
	}
1232157
public static List<int[]> createList( int N )
    {
        int data[] = new int[ N ];
        for( int i = 0; i < data.length; i++ ) {
            data[i] = -1;
        }

        List<int[]> ret = new ArrayList<int[]>();

        createList(data,0,-1,ret);

        return ret;
    }
268110
public ArrayList<E> toArrayList () {
        ArrayList<E> list = new ArrayList<E>(size());
        for (E elem : this) list.add(elem);
        return list;
    }