Create List<T> instance from Iterator<T>

collections, iterator, java

Solution

I tend towards Guava's `Lists.newArrayList(Iterator)` because I generally have Guava as a dependency, and it already exists.

Problem

Anyone know if there is a standard way to create a List from an Iterator instance?

Original source