Interface PersistentFlavor<T extends PersistentData>

Type Parameters:
T - a subclass of PersistentData
All Known Subinterfaces:
FlavorContainer<T>
All Known Implementing Classes:
DefaultFlavorContainer, DefaultPersistentFlavor

public sealed interface PersistentFlavor<T extends PersistentData> permits DefaultPersistentFlavor<T>, FlavorContainer<T>
Interface representing the flavor of a PersistentData instance.
  • Method Details

    • signature

      String signature()
      Returns a unique signature for this flavor.
      Returns:
      a String representing the flavor's signature
    • description

      LocalizedString description()
      Returns a localized description of this flavor.
      Returns:
      a LocalizedString providing a description
    • serializer

      PersistentSerializer<T,?> serializer()
      Returns a serializer suitable for this flavor.
      Returns:
      a GenericDeserializer capable of handling T instances
    • systemType

      Optional<SystemIdentifier> systemType()
      Returns the system type identifier for this flavor, if available.
      Returns:
      an Optional containing the SystemIdentifier, or empty if not applicable
    • dataClass

      Class<T> dataClass()
      Returns the T PersistentData class that this flavor is associated with.
      Returns:
      the PersistentData class that is associated with this flavor