Class ConfigurationOptions

java.lang.Object
space.arim.dazzleconf.ConfigurationOptions

public final class ConfigurationOptions extends Object
Options for loading, validating, and writing configuration values
Author:
A248
  • Method Details

    • defaults

      public static ConfigurationOptions defaults()
      Returns the default configuration options
      Returns:
      the default config options
    • getSerialisers

      public ValueSerialiserMap getSerialisers()
      Gets the configuration value serialisers. Serialisers can also be specified by ConfSerialisers, which are not included here
      Returns:
      the value serialisers, never null
    • getValidators

      public Map<String,ValueValidator> getValidators()
      Gets an immutable map of value validators, keyed by the configuration key to which they apply. Validators can also be specified ConfValidator, which are not included here
      Returns:
      the map of value validators, never null
    • getSorter

      @Deprecated public ConfigurationSorter getSorter()
      Deprecated.
      Gets the ConfigurationSorter, or null for none
      Returns:
      the sorter or null if there is none
    • getConfigurationSorter

      public Optional<ConfigurationSorter> getConfigurationSorter()
      Gets the configuration sorter
      Returns:
      the sorter, or an empty optional if there is none
    • strictParseEnums

      public boolean strictParseEnums()
      Whether enums are strictly parsed. See ConfigurationOptions.Builder.setStrictParseEnums(boolean)
      Returns:
      true if strictly parsed, false otherwise
    • createSingleElementCollections

      public boolean createSingleElementCollections()
      Whether single element collections are created for config values which were not originally collections
      Returns:
      true to create single element collections, false otherwise
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object