Java ArrayList Create createArrayList(Iterable items, int size)

Here you can find the source of createArrayList(Iterable items, int size)

Description

create Array List

License

Open Source License

Declaration

public static <T> ArrayList<T> createArrayList(Iterable<T> items, int size) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;

public class Main {
    public static <T> ArrayList<T> createArrayList(Iterable<T> items, int size) {
        ArrayList<T> al = new ArrayList<>(size);
        for (T item : items) {
            al.add(item);//  w  w w.  j  a v  a2s  .co  m
        }
        return al;
    }
}

Related

  1. createArrayList()
  2. createArrayList()
  3. createArrayList(Collection arg)
  4. createArrayList(E... array)
  5. createArrayList(final DataType first, final DataType second)
  6. createArrayList(Object[] a)
  7. createArrayList(String[] a)
  8. createArrayList(T... objects)
  9. createArrayListFilledIncrement(int count)