Package org.instancio
Interface SettingsApi
- All Known Subinterfaces:
InstancioApi<T>
,InstancioCartesianProductApi<T>
,InstancioClassApi<T>
,InstancioCollectionsApi<C>
,InstancioFeedApi<F>
,InstancioGenApi
interface SettingsApi
Provides an API for specifying custom
Settings
.- Since:
- 5.0.0
-
Method Summary
Modifier and TypeMethodDescription<V> SettingsApi
withSetting
(SettingKey<V> key, V value) Overrides the setting for the givenkey
with the specifiedvalue
.withSettings
(Settings settings) Merges the specifiedSettings
with the current settings, allowing for the addition and update of settings.
-
Method Details
-
withSetting
Overrides the setting for the givenkey
with the specifiedvalue
.- Type Parameters:
V
- the setting value type- Parameters:
key
- the setting key to overridevalue
- the setting value- Returns:
- API builder reference
- Since:
- 5.0.0
- See Also:
-
withSettings
Merges the specifiedSettings
with the current settings, allowing for the addition and update of settings.Use this method to apply custom settings to override the default ones. The provided settings will be combined with the existing settings, updating any overlapping values and adding any new ones.
- Parameters:
settings
- the custom settings to merge with the current settings- Returns:
- API builder reference
- Since:
- 5.0.0
- See Also:
-