I have an ArrayList that I\'d like to return a copy of. ArrayList has a clone method which has the following signature:
ArrayList
With Java 8 it can be cloned with a stream.
import static java.util.stream.Collectors.toList;
...
List clone = myList.stream().collect(toList());