Interface Converter

All Known Implementing Classes:
BukkitConverter, DefaultConverter, SimpleConverter, StringConverter

public interface Converter
The converter for ConfigPath to convert the object to the raw value stored in the config and vice versa
  • Method Summary

    Modifier and Type
    Method
    Description
    Convert the raw value from the config file to the final value for the field
    Convert the final value from the field to the raw value for the config file
    static @NotNull Converter
    createConverterSafe(Class<? extends Converter> converterClass)
    Create a new instance of the converter
  • Method Details

    • createConverterSafe

      @NotNull static @NotNull Converter createConverterSafe(Class<? extends Converter> converterClass)
      Create a new instance of the converter
      Parameters:
      converterClass - the class of the converter
      Returns:
      the new instance
    • convert

      Object convert(Object raw)
      Convert the raw value from the config file to the final value for the field
      Parameters:
      raw - the raw value
      Returns:
      the final value
    • convertToRaw

      Object convertToRaw(Object value)
      Convert the final value from the field to the raw value for the config file
      Parameters:
      value - the final value
      Returns:
      the raw value