public interface CloseableSpliterator<T> extends Spliterator<T>, AutoCloseable
Spliterator and AutoCloseable interfaces. This is
useful when you have data that can be splitted and may hold resources in the underlying implementation that
must be closed.
A spliterator split from this is not closeable. Only the original CloseableSpliterator is
required to be closed
Some implementations may close resources automatically when the spliterator is exhausted however
this is an implementation detail and all callers should call AutoCloseable.close() method to be
sure all resources are freed properly.
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS,T_SPLITR extends Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED| Modifier and Type | Method and Description |
|---|---|
void |
close() |
characteristics, estimateSize, forEachRemaining, getComparator, getExactSizeIfKnown, hasCharacteristics, tryAdvance, trySplitvoid close()
close in interface AutoCloseableCopyright © 2017 JBoss, a division of Red Hat. All rights reserved.