Interface ElementEncoder.EncodeProcessor<E,C>
- Type Parameters:
E- the type of elementC- the type of collection
- Enclosing interface:
ElementEncoder<E,T>
public static interface ElementEncoder.EncodeProcessor<E,C>
An interface for processing elements of the collection.
-
Method Summary
Modifier and TypeMethodDescription<O> @NotNull dev.siroshun.jfun.result.Result<O, EncodeError> encodeElement(@NotNull Out<O> out, @UnknownNullability E element) Encodes an element to the providedOut.toIterator(@UnknownNullability C input) Creates anIteratorfromElementEncoder.EncodeProcessorfor encoding elements.
-
Method Details
-
encodeElement
@NotNull <O> @NotNull dev.siroshun.jfun.result.Result<O,EncodeError> encodeElement(@NotNull @NotNull Out<O> out, @UnknownNullability E element) Encodes an element to the providedOut.- Type Parameters:
O- the type of the output destination- Parameters:
out- theOutfor writing the encoded elementelement- the element to encode to theOut- Returns:
- a result containing
nullif the operation succeeded, or aEncodeErrorif the operation failed
-
toIterator
Creates anIteratorfromElementEncoder.EncodeProcessorfor encoding elements.- Parameters:
input- the object to encode- Returns:
- the
Iteratorof elements
-