Module io.netty5.buffer
Package io.netty5.buffer.api.internal
Class SingleComponentIterator<T extends ComponentIterator.Next>
- java.lang.Object
-
- io.netty5.buffer.api.internal.SingleComponentIterator<T>
-
- All Implemented Interfaces:
ComponentIterator<T>,io.netty5.util.SafeCloseable,AutoCloseable
public final class SingleComponentIterator<T extends ComponentIterator.Next> extends Object implements ComponentIterator<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty5.buffer.api.ComponentIterator
ComponentIterator.Next
-
-
Constructor Summary
Constructors Constructor Description SingleComponentIterator(io.netty5.util.Resource<?> lifecycle, Object singleComponent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Tfirst()Get the first component of the iteration, ornullif there are no components.
-
-
-
Constructor Detail
-
SingleComponentIterator
public SingleComponentIterator(io.netty5.util.Resource<?> lifecycle, Object singleComponent)
-
-
Method Detail
-
first
public T first()
Description copied from interface:ComponentIteratorGet the first component of the iteration, ornullif there are no components.The object returned will implement both
ComponentIterator.Next, and one of theReadableComponentorWritableComponentinterfaces.- Specified by:
firstin interfaceComponentIterator<T extends ComponentIterator.Next>- Returns:
- The first component of the iteration, or
nullif there are no components.
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceio.netty5.util.SafeCloseable
-
-