Package org.instancio.settings
Class RangeAdjuster.ForMin
- java.lang.Object
-
- org.instancio.settings.RangeAdjuster.ForMin
-
- All Implemented Interfaces:
RangeAdjuster
- Enclosing interface:
- RangeAdjuster
public static class RangeAdjuster.ForMin extends Object implements RangeAdjuster
Adjusts the lower bound of a range given a new upper bound.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.instancio.settings.RangeAdjuster
RangeAdjuster.ForMax, RangeAdjuster.ForMin
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Number & Comparable<T>>
voidadjustRange(Settings settings, SettingKey minSetting, T newMax)
Adjust givenkey
based onotherValue
.
-
-
-
Method Detail
-
adjustRange
public <T extends Number & Comparable<T>> void adjustRange(Settings settings, SettingKey minSetting, T newMax)
Description copied from interface:RangeAdjuster
Adjust givenkey
based 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).
- Specified by:
adjustRange
in interfaceRangeAdjuster
- Type Parameters:
T
- numeric type- Parameters:
settings
- to updateminSetting
- to updatenewMax
- based on which to update given setting key
-
-