Package io.datarouter.bytes
Class Codec.NullPassthroughCodec<A,B>
java.lang.Object
io.datarouter.bytes.Codec.FunctionalCodec<A,B>
io.datarouter.bytes.Codec.NullPassthroughCodec<A,B>
- All Implemented Interfaces:
Codec<A,B>
public static class Codec.NullPassthroughCodec<A,B> extends Codec.FunctionalCodec<A,B>
Skips the inner codecs when provided values are null, directly returning null.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.datarouter.bytes.Codec
Codec.FunctionalCodec<A,B>, Codec.NullPassthroughCodec<A,B> -
Method Summary
Modifier and Type Method Description static <A, B> Codec.NullPassthroughCodec<A,B>of(Function<A,B> encodeFunction, Function<B,A> decodeFunction)Methods inherited from class io.datarouter.bytes.Codec.FunctionalCodec
decode, encode
-
Method Details
-
of
public static <A, B> Codec.NullPassthroughCodec<A,B> of(Function<A,B> encodeFunction, Function<B,A> decodeFunction)
-