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>
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> -
Field Summary
Fields inherited from interface io.datarouter.bytes.Codec
IDENTITY_INSTANCE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.datarouter.bytes.Codec.FunctionalCodec
decode, encodeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.datarouter.bytes.Codec
encodeAndDecode
-
Constructor Details
-
NullPassthroughCodec
-
-
Method Details
-
of
public static <A,B> Codec.NullPassthroughCodec<A,B> of(Function<A, B> encodeFunction, Function<B, A> decodeFunction)
-