Java Iterable to List iterableToList(Iterable input)

Here you can find the source of iterableToList(Iterable input)

Description

iterable To List

License

Open Source License

Declaration

public static <T> List<T> iterableToList(Iterable<T> input) 

Method Source Code


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

import java.util.ArrayList;
import java.util.List;

public class Main {
    public static <T> List<T> iterableToList(Iterable<T> input) {
        ArrayList<T> result = new ArrayList<>();
        for (T item : input) {
            result.add(item);/*  w  w  w. j a va 2  s  .  c  o  m*/
        }
        return result;
    }
}

Related

  1. iterable2List(Iterable iterable)
  2. iterableAsList(Iterable iterable)
  3. iterableToCollection(Iterable c, Collection list)
  4. iterableToCollection(Iterable c, Collection list)
  5. iterableToList(Iterable iterable)
  6. iterableToList(Iterable iterable)
  7. iterableToSSV(Iterable list, String sep)
  8. toList(Iterable i)
  9. toList(Iterable items)