public class CollectionUtil
extends java.lang.Object
Constructor and Description |
---|
CollectionUtil() |
Modifier and Type | Method and Description |
---|---|
static <E> java.util.Enumeration<E> |
asEnumeration(java.util.Iterator<E> iter)
Adapt the specified
Iterator to the
Enumeration interface. |
static <E> java.util.Iterator<E> |
asIterator(java.util.Enumeration<E> e)
Adapt the specified
Enumeration to the Iterator interface. |
static <T> java.util.Collection<T> |
collectionOf(java.util.Iterator<? extends T> iterator)
Returns a collection containing all elements of the iterator.
|
static <T> java.util.stream.Stream<T> |
parallelStreamOf(java.lang.Iterable<T> iterable)
Wraps an iterator as a stream.
|
static <T> java.util.stream.Stream<T> |
parallelStreamOf(java.util.Iterator<T> iterator)
Wraps an iterator as a stream.
|
static <T> java.util.stream.Stream<T> |
streamOf(java.lang.Iterable<T> iterable)
Converts interable to a non-parallel stream.
|
static <T> java.util.stream.Stream<T> |
streamOf(java.util.Iterator<T> iterator)
Converts iterator to a stream.
|
public static <E> java.util.Enumeration<E> asEnumeration(java.util.Iterator<E> iter)
Iterator
to the
Enumeration
interface.public static <E> java.util.Iterator<E> asIterator(java.util.Enumeration<E> e)
Enumeration
to the Iterator
interface.public static <T> java.util.Collection<T> collectionOf(java.util.Iterator<? extends T> iterator)
public static <T> java.util.stream.Stream<T> streamOf(java.util.Iterator<T> iterator)
public static <T> java.util.stream.Stream<T> streamOf(java.lang.Iterable<T> iterable)
public static <T> java.util.stream.Stream<T> parallelStreamOf(java.util.Iterator<T> iterator)
public static <T> java.util.stream.Stream<T> parallelStreamOf(java.lang.Iterable<T> iterable)
Copyright © 2003-present Jodd Team