Package com.avanza.astrix.config
Class EnumSetting<T extends Enum<T>>
- java.lang.Object
-
- com.avanza.astrix.config.EnumSetting<T>
-
-
Constructor Summary
Constructors Constructor Description EnumSetting(String name, Class<T> enumType, T defaultValue)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T extends Enum<T>>
EnumSetting<T>create(String name, Class<T> enumType, T defaultValue)TdefaultValue()The default value for this setting.DynamicEnumProperty<T>getFrom(DynamicConfig config)Reads this Setting from the givenDynamicConfiginstance.Stringname()The name of this Setting.
-
-
-
Method Detail
-
create
public static <T extends Enum<T>> EnumSetting<T> create(String name, Class<T> enumType, T defaultValue)
-
getFrom
public DynamicEnumProperty<T> getFrom(DynamicConfig config)
Description copied from interface:SettingReads this Setting from the givenDynamicConfiginstance. If the DynamicConfig instance does not hold a value for this Setting, then the default value will be returned.
-
name
public String name()
Description copied from interface:SettingThe name of this Setting. Used when reading this Setting from a DynamicConfig instance.
-
-