Class ConvertedConfig

All Implemented Interfaces:
Config, UnmodifiableConfig

public final class ConvertedConfig extends ConfigWrapper<C>
A Config's wrapper that converts the values that are read from and put into the config
  • Constructor Details

    • ConvertedConfig

      public ConvertedConfig(Config config, ConversionTable readTable, ConversionTable writeTable, Predicate<Class<?>> supportPredicate)
      Creates a new ConvertedConfig that uses two conversion tables.
      Parameters:
      config - the config to wrap
      readTable - the ConversionTable used for parse operations (like getValue)
      writeTable - the ConversionTable used for write operations (like setValue)
      supportPredicate - a Predicate that checks if a given class is supported by the ConvertedConfig
    • ConvertedConfig

      public ConvertedConfig(Config config, Function<Object,Object> readConversion, Function<Object,Object> writeConversion, Predicate<Class<?>> supportPredicate)
      Creates a new ConvertedConfig that uses two custom conversion functions.
      Parameters:
      config - the config to wrap
      readConversion - the Function used for parse operations (like getValue)
      writeConversion - the Function used for write operations (like setValue)
      supportPredicate - a Predicate that checks if a given class is supported by the ConvertedConfig
  • Method Details