public void setMinMax ( int min , int max ) { if ( min >= max ) throw new IllegalArgumentException ( "The input minimum (" + min + ") must be less than the given max (" + max + ")" ) ; this . min = min ; this . max = max ; }
Sets the minimum and maximum values at the same time this is useful if setting them one at a time may have caused a conflict with the previous values