Package org.opennms.core.utils
Class IteratorUtils<T>
- java.lang.Object
-
- org.opennms.core.utils.IteratorUtils<T>
-
public abstract class IteratorUtils<T> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description IteratorUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> java.lang.Iterable<T>
concatIterators(java.util.Iterator<T>... iterators)
UseStream.concat(Stream, Stream)
to combine the iterators.static <T> java.lang.Iterable<T>
concatIterators(java.util.List<java.util.Iterator<T>> iterators)
UseStream.concat(Stream, Stream)
to combine the iterators.
-
-
-
Method Detail
-
concatIterators
@SafeVarargs public static <T> java.lang.Iterable<T> concatIterators(java.util.Iterator<T>... iterators)
UseStream.concat(Stream, Stream)
to combine the iterators. CAUTION: The Iterable returned by this method is not reusable and does not supportIterator.remove()
because it is backed by aStream
.- Parameters:
iterators
- aIterator
object.
-
concatIterators
public static <T> java.lang.Iterable<T> concatIterators(java.util.List<java.util.Iterator<T>> iterators)
UseStream.concat(Stream, Stream)
to combine the iterators. CAUTION: The Iterable returned by this method is not reusable and does not supportIterator.remove()
because it is backed by aStream
.- Parameters:
iterators
- aIterator
object.
-
-