Interface FieldDecoder<F>
- All Known Subinterfaces:
FieldCodec<T,F>
public interface FieldDecoder<F>
-
Method Summary
Modifier and TypeMethodDescriptionstatic <F> @NotNull FieldDecoder<F> create(@NotNull String fieldName, @NotNull Decoder<F> decoder, @NotNull Supplier<dev.siroshun.jfun.result.Result<F, DecodeError>> onNotDecoded) @NotNull dev.siroshun.jfun.result.Result<F, DecodeError> decodeFieldValue(@NotNull In in) @NotNull String@NotNull dev.siroshun.jfun.result.Result<F, DecodeError> static <F> @NotNull FieldDecoder<F> optional(@NotNull String fieldName, @NotNull Decoder<F> decoder, @UnknownNullability F defaultValue) static <F> @NotNull FieldDecoder<F> static <F> @NotNull FieldDecoder<F> supplying(@NotNull String fieldName, @NotNull Decoder<F> decoder, @NotNull Supplier<F> defaultValueSupplier)
-
Method Details
-
create
@NotNull static <F> @NotNull FieldDecoder<F> create(@NotNull @NotNull String fieldName, @NotNull @NotNull Decoder<F> decoder, @NotNull @NotNull Supplier<dev.siroshun.jfun.result.Result<F, DecodeError>> onNotDecoded) -
required
@NotNull static <F> @NotNull FieldDecoder<F> required(@NotNull @NotNull String fieldName, @NotNull @NotNull Decoder<F> decoder) -
optional
@NotNull static <F> @NotNull FieldDecoder<F> optional(@NotNull @NotNull String fieldName, @NotNull @NotNull Decoder<F> decoder, @UnknownNullability F defaultValue) -
supplying
@NotNull static <F> @NotNull FieldDecoder<F> supplying(@NotNull @NotNull String fieldName, @NotNull @NotNull Decoder<F> decoder, @NotNull @NotNull Supplier<F> defaultValueSupplier) -
fieldName
-
decodeFieldValue
@NotNull @NotNull dev.siroshun.jfun.result.Result<F,DecodeError> decodeFieldValue(@NotNull @NotNull In in) -
onNotDecoded
-