Class EnumSetTypeAdapter<T extends Enum<T>>

java.lang.Object
ca.spottedleaf.yamlconfig.adapter.TypeAdapter<EnumSet<T>, List<Object>>
ca.spottedleaf.yamlconfig.adapter.collection.EnumSetTypeAdapter<T>

public final class EnumSetTypeAdapter<T extends Enum<T>> extends TypeAdapter<EnumSet<T>, List<Object>>
  • Field Details

  • Constructor Details

    • EnumSetTypeAdapter

      public EnumSetTypeAdapter()
  • Method Details

    • deserialize

      public EnumSet<T> deserialize(TypeAdapterRegistry registry, Object input, Type type)
      Description copied from class: TypeAdapter
      Deserializes the value from YAML.
      Specified by:
      deserialize in class TypeAdapter<EnumSet<T extends Enum<T>>, List<Object>>
      Parameters:
      registry - The type adapter registry context.
      input - The object from YAML.
      type - The type information associated with the deserialized object.
      Returns:
      The deserialized form of the object.
    • serialize

      public List<Object> serialize(TypeAdapterRegistry registry, EnumSet<T> value, Type type)
      Description copied from class: TypeAdapter
      Serializes the value to YAML.
      Specified by:
      serialize in class TypeAdapter<EnumSet<T extends Enum<T>>, List<Object>>
      Parameters:
      registry - The type adapter registry context.
      value - The deserialized form of the object.
      type - The type information associated with the deserialized object.
      Returns:
      The serialized form of the object.