Package org.instancio.settings
Class RangeAdjuster.ForMax
- java.lang.Object
-
- org.instancio.settings.RangeAdjuster.ForMax
-
- All Implemented Interfaces:
RangeAdjuster
- Enclosing interface:
- RangeAdjuster
public static class RangeAdjuster.ForMax extends Object implements RangeAdjuster
Adjusts the upper bound of a range given a new lower 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 maxSetting, T newMin)
Adjust givenkey
based onotherValue
.
-
-
-
Method Detail
-
adjustRange
public <T extends Number & Comparable<T>> void adjustRange(Settings settings, SettingKey maxSetting, T newMin)
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 updatemaxSetting
- to updatenewMin
- based on which to update given setting key
-
-