Package org.instancio.settings
Interface SettingKey
-
- All Superinterfaces:
Comparable<SettingKey>
- All Known Implementing Classes:
Key
public interface SettingKey extends Comparable<SettingKey>
A setting key for modifying configuration.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T extends Number & Comparable<T>>
voidautoAdjust(Settings settings, T otherValue)
Auto-adjusts theSettings
value for this key based on the value of another setting key.<T> T
defaultValue()
Default value for this key.String
propertyKey()
A property key used in the properties file.<T> Class<T>
type()
Type of the property value.-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
propertyKey
String propertyKey()
A property key used in the properties file.- Returns:
- property key
-
type
<T> Class<T> type()
Type of the property value.- Returns:
- value class
-
defaultValue
<T> T defaultValue()
Default value for this key.- Type Parameters:
T
- type of the value- Returns:
- default value
-
autoAdjust
default <T extends Number & Comparable<T>> void autoAdjust(Settings settings, T otherValue)
Auto-adjusts theSettings
value for this key based on the value of another setting key.- Parameters:
settings
- to adjustotherValue
- value of the other setting to base the adjustment off
-
-