Class OptionalSerializer
java.lang.Object
com.esotericsoftware.kryo.Serializer<Optional<?>>
uno.anahata.ai.internal.kryo.OptionalSerializer
A custom Kryo serializer for
Optional.
Standard Java serialization does not support Optional, and Kryo's default JavaSerializer relies on it. This serializer handles Optional by writing a boolean to indicate if a value is present, followed by the value itself if it exists.
- Author:
- Anahata
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new OptionalSerializer and marks it as immutable. -
Method Summary
Methods inherited from class com.esotericsoftware.kryo.Serializer
copy, getAcceptsNull, isImmutable, setAcceptsNull, setImmutable
-
Constructor Details
-
OptionalSerializer
public OptionalSerializer()Constructs a new OptionalSerializer and marks it as immutable.
-
-
Method Details
-
write
-
read
-
