List of utility methods to do Iterator to List Convert
void | addToList(Iterator itor, List list) add To List while (itor.hasNext()) {
list.add(itor.next());
|
List | copyIterator(Iterator Copies the iterator object into the List(ArrayList) of the specific generic type List<T> copy = new ArrayList<T>(); while (iter.hasNext()) copy.add(iter.next()); return copy; |