public final void setMaxValue ( final int maxValue ) { Condition . INSTANCE . ensureGreater ( maxValue , getMinValue ( ) , "The maximum value must be greater than the minimum value" ) ; this . maxValue = maxValue ; setValue ( Math . min ( getValue ( ) , maxValue ) ) ; }
Sets the maximum value the preference should allow to choose .