net.thisptr.jackson.jq.internal.misc.Lists Maven / Gradle / Ivy
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