All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.thisptr.jackson.jq.internal.misc.Lists Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version
package net.thisptr.jackson.jq.internal.misc;

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

public class Lists {

	public static  List newArrayList(final Iterator iter) {
		final List result = new ArrayList<>();
		while (iter.hasNext())
			result.add(iter.next());
		return result;
	}

	public static  List newArrayList(final Iterable iter) {
		return newArrayList(iter.iterator());
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy