T - the type of elements returned by this IOSpliterator.public interface IOSpliterator<T>
Spliterator but throws IOException.| Modifier and Type | Method and Description |
|---|---|
static <E> IOSpliterator<E> |
adapt(Spliterator<E> iterator)
Adapts the given Spliterator as an IOSpliterator.
|
default Spliterator<T> |
asSpliterator()
|
default int |
characteristics()
|
default long |
estimateSize()
|
default void |
forEachRemaining(IOConsumer<? super T> action)
|
default IOComparator<? super T> |
getComparator()
|
default long |
getExactSizeIfKnown()
|
default boolean |
hasCharacteristics(int characteristics)
|
default boolean |
tryAdvance(IOConsumer<? super T> action)
|
default IOSpliterator<T> |
trySplit()
Like
Spliterator.trySplit(). |
Spliterator<T> |
unwrap()
Unwraps this instance and returns the underlying
Spliterator. |
static <E> IOSpliterator<E> adapt(Spliterator<E> iterator)
E - the type of the stream elements.iterator - The iterator to adaptdefault Spliterator<T> asSpliterator()
UncheckedIOException Spliterator.default int characteristics()
default long estimateSize()
Long.MAX_VALUE if infinite, unknown, or too expensive to compute.default void forEachRemaining(IOConsumer<? super T> action)
action - The actionNullPointerException - if the specified action is nulldefault IOComparator<? super T> getComparator()
null if the elements are sorted in the natural order.IllegalStateException - if the spliterator does not report a characteristic of SORTED.default long getExactSizeIfKnown()
-1.default boolean hasCharacteristics(int characteristics)
characteristics - the characteristics to check fortrue if all the specified characteristics are present, else falsedefault boolean tryAdvance(IOConsumer<? super T> action)
action - The actionfalse if no remaining elements existed upon entry to this method, else true.NullPointerException - if the specified action is nulldefault IOSpliterator<T> trySplit()
Spliterator.trySplit().Spliterator covering some portion of the elements, or null if this spliterator cannot be
splitSpliterator<T> unwrap()
Spliterator.
Implementations may not have anything to unwrap and that behavior is undefined for now.
Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.