Package jodd.util
Class CollectionUtil
java.lang.Object
jodd.util.CollectionUtil
Some collection utilities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> Enumeration<E> asEnumeration(Iterator<E> iter) Adapt the specifiedIteratorto theEnumerationinterface.static <E> Iterator<E> asIterator(Enumeration<E> e) Adapt the specifiedEnumerationto theIteratorinterface.static <T> Collection<T> collectionOf(Iterator<? extends T> iterator) Returns a collection containing all elements of the iterator.static <T> Stream<T> parallelStreamOf(Iterable<T> iterable) Wraps an iterator as a stream.static <T> Stream<T> parallelStreamOf(Iterator<T> iterator) Wraps an iterator as a stream.static <T> Stream<T> Converts interable to a non-parallel stream.static <T> Stream<T> Converts iterator to a stream.
-
Constructor Details
-
CollectionUtil
public CollectionUtil()
-
-
Method Details
-
asEnumeration
Adapt the specifiedIteratorto theEnumerationinterface. -
asIterator
Adapt the specifiedEnumerationto theIteratorinterface. -
collectionOf
Returns a collection containing all elements of the iterator. -
streamOf
Converts iterator to a stream. -
streamOf
Converts interable to a non-parallel stream. -
parallelStreamOf
Wraps an iterator as a stream. -
parallelStreamOf
Wraps an iterator as a stream.
-