Class AbstractCloseableIterable<T>
java.lang.Object
io.servicetalk.concurrent.internal.AbstractCloseableIterable<T>
- Type Parameters:
T- the type of elements returned by theCloseableIterator.
- All Implemented Interfaces:
CloseableIterable<T>,Iterable<T>
An abstract implementation of
CloseableIterable that wraps an Iterable.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidcloseIterator(Iterator<T> iterator) Closes anIteratoras returned byIterable.iterator()of theIterablethat is wrapped by thisAbstractCloseableIterable.iterator()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
AbstractCloseableIterable
New instance.- Parameters:
original-Iterablethat is wrapped by thisAbstractCloseableIterable.
-
-
Method Details
-
iterator
-
closeIterator
Closes anIteratoras returned byIterable.iterator()of theIterablethat is wrapped by thisAbstractCloseableIterable.
-