Class SetTypeAdapter

java.lang.Object
ca.spottedleaf.yamlconfig.adapter.TypeAdapter<Set<Object>, List<Object>>
ca.spottedleaf.yamlconfig.adapter.collection.SetTypeAdapter

public final class SetTypeAdapter extends TypeAdapter<Set<Object>, List<Object>>
  • Field Details

  • Constructor Details

    • SetTypeAdapter

      public SetTypeAdapter()
  • Method Details

    • deserialize

      public Set<Object> deserialize(TypeAdapterRegistry registry, Object input, Type type)
      Description copied from class: TypeAdapter
      Deserializes the value from YAML.
      Specified by:
      deserialize in class TypeAdapter<Set<Object>, 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, Set<Object> value, Type type)
      Description copied from class: TypeAdapter
      Serializes the value to YAML.
      Specified by:
      serialize in class TypeAdapter<Set<Object>, 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.