Class RangeAdjuster.ForMax

java.lang.Object
org.instancio.internal.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.
  • Method Details

    • adjustRange

      public <T extends Number & Comparable<T>> void adjustRange(Settings settings, SettingKey maxSetting, T newMin)
      Description copied from interface: RangeAdjuster
      Adjust given key based on otherValue.

      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 interface RangeAdjuster
      Type Parameters:
      T - numeric type
      Parameters:
      settings - to update
      maxSetting - to update
      newMin - based on which to update given setting key