Record Class DefaultPersistentFlavor<T extends PersistentData>

java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.gateway.storeforward.flavor.DefaultPersistentFlavor<T>
Type Parameters:
T - a subclass of PersistentData that is relevant to this flavor
Record Components:
signature - the unique signature for the flavor of persistent data
description - a localized string providing a description of the flavor
serializer - a PersistentSerializer suitable for serializing instances of type T
systemType - an optional SystemIdentifier if a system type is associated with this flavor
All Implemented Interfaces:
PersistentFlavor<T>

public record DefaultPersistentFlavor<T extends PersistentData>(@NotNull String signature, @NotNull LocalizedString description, @NotNull PersistentSerializer<T extends PersistentData,?> serializer, @NotNull Optional<SystemIdentifier> systemType, @NotNull Class<T extends PersistentData> dataClass) extends Record implements PersistentFlavor<T>
Default implementation of PersistentFlavor.

This record encapsulates signature, description of the persistent data flavor, a serializer to be used with the flavor, and an optional system type identifier.

  • Constructor Details

  • Method Details

    • equals

      public boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • signature

      @NotNull public @NotNull String signature()
      Returns the value of the signature record component.
      Specified by:
      signature in interface PersistentFlavor<T extends PersistentData>
      Returns:
      the value of the signature record component
    • description

      @NotNull public @NotNull LocalizedString description()
      Returns the value of the description record component.
      Specified by:
      description in interface PersistentFlavor<T extends PersistentData>
      Returns:
      the value of the description record component
    • serializer

      @NotNull public @NotNull PersistentSerializer<T,?> serializer()
      Returns the value of the serializer record component.
      Specified by:
      serializer in interface PersistentFlavor<T extends PersistentData>
      Returns:
      the value of the serializer record component
    • systemType

      @NotNull public @NotNull Optional<SystemIdentifier> systemType()
      Returns the value of the systemType record component.
      Specified by:
      systemType in interface PersistentFlavor<T extends PersistentData>
      Returns:
      the value of the systemType record component
    • dataClass

      @NotNull public @NotNull Class<T> dataClass()
      Returns the value of the dataClass record component.
      Specified by:
      dataClass in interface PersistentFlavor<T extends PersistentData>
      Returns:
      the value of the dataClass record component