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
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
closeIterator
(Iterator<T> iterator) Closes anIterator
as returned byIterable.iterator()
of theIterable
that is wrapped by thisAbstractCloseableIterable
.iterator()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
AbstractCloseableIterable
New instance.- Parameters:
original
-Iterable
that is wrapped by thisAbstractCloseableIterable
.
-
-
Method Details
-
iterator
-
closeIterator
Closes anIterator
as returned byIterable.iterator()
of theIterable
that is wrapped by thisAbstractCloseableIterable
.
-