Class DhApiConfigValue<coreType,apiType>

java.lang.Object
com.seibel.distanthorizons.api.objects.config.DhApiConfigValue<coreType,apiType>
Type Parameters:
coreType - The datatype Distant Horizons uses in the background; implementing developers can ignore this.
apiType - The datatype you, an API dev will use.
All Implemented Interfaces:
IDhApiConfigValue<apiType>

public class DhApiConfigValue<coreType,apiType> extends Object implements IDhApiConfigValue<apiType>
A wrapper used to interface with Distant Horizon's Config.

When using this object you need to explicitly define the generic types, otherwise Intellij won't do any type checking and the wrong types can be used.
For example a method returning IDhApiConfig<Integer> when the config should be a Boolean.
Since:
API 1.0.0
  • Constructor Details

    • DhApiConfigValue

      public DhApiConfigValue(IConfigEntry<coreType> newConfigEntry)
      This constructor should only be called internally.
      There is no reason for API users to create this object.

      Uses the default object converter, this requires coreType and apiType to be the same.
    • DhApiConfigValue

      public DhApiConfigValue(IConfigEntry<coreType> newConfigEntry, IConverter<coreType,apiType> newConverter)
      This constructor should only be called internally.
      There is no reason for API users to create this object.

  • Method Details