Package org.instancio.internal.settings
Interface RangeAdjuster
- All Known Implementing Classes:
RangeAdjuster.ForMax,RangeAdjuster.ForMin
Provides support for auto-adjusting 'range' settings that have a min and a max value.
- Since:
- 1.1.10
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAdjusts the upper bound of a range given a new lower bound.static classAdjusts the lower bound of a range given a new upper bound. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription<T extends Number & Comparable<T>>
voidadjustRange(Settings settings, SettingKey<T> key, T otherValue) Adjust givenkeybased onotherValue.
-
Field Details
-
MIN_ADJUSTER
-
MAX_ADJUSTER
-
-
Method Details
-
adjustRange
<T extends Number & Comparable<T>> void adjustRange(Settings settings, SettingKey<T> key, T otherValue) Adjust givenkeybased onotherValue.For example, if min is set to a value higher than the max, will auto-adjust max by a specified amount (and vice versa).
- Type Parameters:
T- numeric type- Parameters:
settings- to updatekey- to updateotherValue- based on which to update given setting key
-