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 Type
    Method
    Description
    withSetting(SettingKey<V> key, V value)
    Overrides the setting for the given key with the specified value.
    Merges the specified Settings with the current settings, allowing for the addition and update of settings.
  • Method Details

    • withSetting

      <V> SettingsApi withSetting(SettingKey<V> key, V value)
      Overrides the setting for the given key with the specified value.
      Type Parameters:
      V - the setting value type
      Parameters:
      key - the setting key to override
      value - the setting value
      Returns:
      API builder reference
      Since:
      5.0.0
      See Also:
    • withSettings

      SettingsApi withSettings(Settings settings)
      Merges the specified Settings 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: