Interface Serializer<T,S>

Type Parameters:
T - the type of the source domain object
S - the type of the serialized representation
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Serializer<T,S>
Defines a functional contract for transforming domain objects into their serialized representations.

Note: This is an experimental feature and is currently considered unstable. Implementations are responsible for converting strongly-typed objects into formats suitable for storage, caching, or network transmission (e.g., transforming a POJO into a Map<String, Object>).

Since:
0.3
Author:
a8kj7sea
  • Method Summary

    Modifier and Type
    Method
    Description
    serialize(T object)
    Serializes the provided domain object into its encoded form.
  • Method Details

    • serialize

      @Nullable S serialize(@Nullable T object)
      Serializes the provided domain object into its encoded form.
      Parameters:
      object - the object to serialize, may be null
      Returns:
      the serialized representation of type S, or null if serialization fails or input is null