Translation2dSerializer

@Serializer(forClass = Translation2d::class)
class Translation2dSerializer : KSerializer<Translation2d>

Custom explicitly defined serializer for Translation2d

Author

Matthew Clark

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Describes the structure of the serializable representation of KSerializer, produced by this serializer. Knowing the structure of the descriptor is required to determine the shape of the serialized form (e.g. what elements are encoded as lists and what as primitives) along with its metadata such as alternative names.

Functions

Link copied to clipboard
open override fun deserialize(decoder: Decoder): Translation2d
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Indicates whether some other object is "equal to" this one. Implementations must fulfil the following requirements:

Link copied to clipboard
open override fun hashCode(): Int

Returns a hash code value for the object. The general contract of hashCode is:

Link copied to clipboard
open override fun serialize(encoder: Encoder, value: Translation2d)

Serializes the value of type T using the format that is represented by the given encoder. serialize method is format-agnostic and operates with a high-level structured Encoder API. Throws SerializationException if value cannot be serialized.

Link copied to clipboard
open override fun toString(): String

Returns a string representation of the object.