Java Array to ArrayList toArrayList( Iterable iterable)

Here you can find the source of toArrayList( Iterable iterable)

Description

to Array List

License

Open Source License

Declaration

public static <T> ArrayList<T> toArrayList(
            Iterable<? extends T> iterable) 

Method Source Code

//package com.java2s;

import java.util.ArrayList;

public class Main {
    public static <T> ArrayList<T> toArrayList(
            Iterable<? extends T> iterable) {
        ArrayList<T> list = new ArrayList<>();
        for (T t : iterable)
            list.add(t);/* w  w w  .j  ava  2 s.  com*/
        return list;
    }
}

Related

  1. asArrayList(T... elements)
  2. asArrayList(T[] tArray)
  3. asArrayList(T[] values)
  4. byteArrayToArrayList(byte[] byteArray)
  5. byteArrayToShortArrayList(byte[] byteArray)
  6. toArrayList(Collection collection)
  7. toArrayList(Collection from)
  8. toArrayList(double[] dd)
  9. toArrayList(final T... array)