Package org.instancio.settings
Interface SettingKey<T>
- Type Parameters:
T- type of the value
public interface SettingKey<T>
A setting key represents a configuration item that can be
stored in a
Settings instance.- Since:
- 1.0.1
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA builder for creating custom keys. -
Method Summary
-
Method Details
-
type
-
propertyKey
String propertyKey()A unique property key identifying this setting. The property key is used to identify the setting in a properties file.- Returns:
- a unique property key identifying this setting
- Since:
- 1.2.0
-
defaultValue
Default value for this key.- Returns:
- default value, or
nullif not defined - Since:
- 1.0.1
-
allowsNullValue
default boolean allowsNullValue()Indicates whether the value for this key can be set tonull. Setting anullfor a key that does not acceptnullwill produce an exception.- Returns:
trueifnullis allowed,falseotherwise- Since:
- 1.5.1
-