Package org.instancio.internal.settings
Class InternalSettings
java.lang.Object
org.instancio.internal.settings.InternalSettings
- All Implemented Interfaces:
Settings
-
Method Summary
Modifier and TypeMethodDescriptionstatic InternalSettings
create()
Creates a new instance of empty settings.static InternalSettings
defaults()
Creates a new instance containing default settings.static InternalSettings
Create settings from the given map.static InternalSettings
Create settings from the given settings.<T> T
get
(@NotNull SettingKey key) Get setting value for given key.Returns a read-only view of the subtype map.lock()
Locks these settings for further modifications, making this instance immutable.Map 'from' supertype to 'to' subtype.Creates a new instance of settings by merging given settings with these settings.set
(@NotNull SettingKey key, @Nullable Object value) Set the setting with the given key to the specified value.toString()
-
Method Details
-
create
Description copied from interface:Settings
Creates a new instance of empty settings.- Returns:
- empty settings
-
defaults
Description copied from interface:Settings
Creates a new instance containing default settings.- Returns:
- settings containing defaults
-
from
Description copied from interface:Settings
Create settings from the given map.- Parameters:
map
- to create settings from- Returns:
- settings
-
from
Description copied from interface:Settings
Create settings from the given settings.- Parameters:
other
- settings to create settings from- Returns:
- a new instance of settings
-
merge
Description copied from interface:Settings
Creates a new instance of settings by merging given settings with these settings. -
get
Description copied from interface:Settings
Get setting value for given key. -
set
Description copied from interface:Settings
Set the setting with the given key to the specified value.Note: when updating range settings (such as
Keys.COLLECTION_MIN_SIZE
andKeys.COLLECTION_MAX_SIZE
), range bounds are auto-adjusted byConstants.RANGE_ADJUSTMENT_PERCENTAGE
if the new minimum is higher than the current maximum, and vice versa. -
mapType
Description copied from interface:Settings
Map 'from' supertype to 'to' subtype. -
getSubtypeMap
Description copied from interface:Settings
Returns a read-only view of the subtype map.- Specified by:
getSubtypeMap
in interfaceSettings
- Returns:
- subtype map
-
lock
Description copied from interface:Settings
Locks these settings for further modifications, making this instance immutable. -
toString
-