Class BigDecimalTypeAdapter

java.lang.Object
ca.spottedleaf.yamlconfig.adapter.TypeAdapter<BigDecimal, String>
ca.spottedleaf.yamlconfig.adapter.type.BigDecimalTypeAdapter

public final class BigDecimalTypeAdapter extends TypeAdapter<BigDecimal, String>
  • Field Details

  • Constructor Details

    • BigDecimalTypeAdapter

      public BigDecimalTypeAdapter()
  • Method Details

    • parseFloat

      public static Number parseFloat(String input)
    • parseFloat

      public static Number parseFloat(String input, boolean asBigDecimal)
    • deserialize

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