Package org.jboss.weld.util.collections
Class Iterators
- java.lang.Object
-
- org.jboss.weld.util.collections.Iterators
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> boolean
addAll(Collection<T> target, Iterator<? extends T> iterator)
Add all elements in the iterator to the collection.static <T> Iterator<T>
concat(Iterator<? extends Iterator<? extends T>> iterators)
Combine the iterators into a single one.static <T,R>
Iterator<R>transform(Iterator<T> iterator, Function<? super T,? extends R> function)
-
-
-
Method Detail
-
addAll
public static <T> boolean addAll(Collection<T> target, Iterator<? extends T> iterator)
Add all elements in the iterator to the collection.- Parameters:
target
-iterator
-- Returns:
- true if the target was modified, false otherwise
-
concat
public static <T> Iterator<T> concat(Iterator<? extends Iterator<? extends T>> iterators)
Combine the iterators into a single one.- Parameters:
iterators
- An iterator of iterators- Returns:
- a single combined iterator
-
-