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(java.util.Spliterator<E> iterator)
Adapts the given Spliterator as an IOSpliterator.
|
default java.util.Spliterator<T> |
asSpliterator()
Creates a
Spliterator for this instance that throws UncheckedIOException instead of
IOException. |
default int |
characteristics()
Like
Spliterator.characteristics(). |
default long |
estimateSize()
Like
Spliterator.estimateSize(). |
default void |
forEachRemaining(IOConsumer<? super T> action)
Like
Spliterator.forEachRemaining(Consumer). |
default IOComparator<? super T> |
getComparator()
Like
Spliterator.getComparator(). |
default long |
getExactSizeIfKnown()
Like
Spliterator.getExactSizeIfKnown(). |
default boolean |
hasCharacteristics(int characteristics)
Like
Spliterator.hasCharacteristics(int). |
default boolean |
tryAdvance(IOConsumer<? super T> action)
Like
Spliterator.tryAdvance(Consumer). |
default IOSpliterator<T> |
trySplit()
Like
Spliterator.trySplit(). |
java.util.Spliterator<T> |
unwrap()
Unwraps this instance and returns the underlying
Spliterator. |
static <E> IOSpliterator<E> adapt(java.util.Spliterator<E> iterator)
E - the type of the stream elements.iterator - The iterator to adaptdefault java.util.Spliterator<T> asSpliterator()
Spliterator for this instance that throws UncheckedIOException instead of
IOException.UncheckedIOException Spliterator.default int characteristics()
Spliterator.characteristics().default long estimateSize()
Spliterator.estimateSize().Long.MAX_VALUE if infinite, unknown, or too expensive to compute.default void forEachRemaining(IOConsumer<? super T> action)
Spliterator.forEachRemaining(Consumer).action - The actionjava.lang.NullPointerException - if the specified action is nulldefault IOComparator<? super T> getComparator()
Spliterator.getComparator().null if the elements are sorted in the natural order.java.lang.IllegalStateException - if the spliterator does not report a characteristic of SORTED.default long getExactSizeIfKnown()
Spliterator.getExactSizeIfKnown().-1.default boolean hasCharacteristics(int characteristics)
Spliterator.hasCharacteristics(int).characteristics - the characteristics to check fortrue if all the specified characteristics are present, else falsedefault boolean tryAdvance(IOConsumer<? super T> action)
Spliterator.tryAdvance(Consumer).action - The actionfalse if no remaining elements existed upon entry to this method, else true.java.lang.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
splitjava.util.Spliterator<T> unwrap()
Spliterator.
Implementations may not have anything to unwrap and that behavior is undefined for now.
Copyright © 2010 - 2023 Adobe. All Rights Reserved