Java Utililty Methods Iterable to List

List of utility methods to do Iterable to List

Description

The list of methods to do Iterable to List are organized into topic(s).

Method

ListtoList(Iterable iter)
Copies the elements of Iterable into a list and returns them.
List<E> list = new ArrayList<E>();
for (E item : iter) {
    list.add(item);
return list;
ListtoList(Iterable values)
to List
return values instanceof List ? (List<R>) values : copyToList(values);
ListtoList(Iterable protocols)
to List
return toList(DEFAULT_LIST_SIZE, protocols);
ListtoList(Iterable elements)
to List
List<T2> result = new LinkedList<T2>();
for (T1 element : elements) {
    result.add(element);
return result;
java.util.ArrayListToList(Iterable inList)
To List
java.util.ArrayList<T> outList = new java.util.ArrayList<T>();
for (T item : inList) {
    outList.add(item);
return outList;
ArrayListtoList(Iterable it)
to List
if (it instanceof ArrayList)
    return (ArrayList) it;
ArrayList<T> list = new ArrayList<T>();
for (T x : it)
    list.add(x);
return list;
ListtoList(Iterable items)
Create a list out of the items in the Iterable.
List<T> list = new ArrayList<>();
addAll(list, items);
return list;
ListtoList(Iterable iter)
Returns a list with a copy of the data from the iterable.
List<T> buf = new ArrayList<>();
for (T v : iter) {
    buf.add(v);
return buf;
ListtoList(Iterable iterable)
to List
if (null == iterable)
    return Collections.emptyList();
List<T> retList = new LinkedList<>();
for (T item : iterable) {
    retList.add(item);
return retList;
ListtoList(Iterable iterable)
Convert an iterable to a list.
List<T> list = new ArrayList<>();
if (iterable instanceof Collection) {
    list.addAll((Collection<T>) iterable);
} else {
    for (T next : iterable) {
        list.add(next);
return list;