Here you can find the source of createMutableList(Collection
public static <E> List<E> createMutableList(Collection<E> collection)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Collection; import java.util.List; public class Main { public static <E> List<E> createMutableList(Collection<E> collection) { List<E> mutableList = new ArrayList<>(); if (isNotEmpty(collection)) { for (E data : collection) { mutableList.add(data);//from w w w . j a va2 s . c o m } } return mutableList; } public static <T> boolean isNotEmpty(Collection<T> collection) { return collection != null && collection.size() != 0; } }