public final void setMaxNumber(final int maxNumber) {
        Condition.INSTANCE.ensureGreater(maxNumber, getMinNumber(),
                "The maximum number must be greater than the minimum number");
        this.maxNumber = maxNumber;
        setNumber(Math.min(getNumber(), maxNumber));
    }
public final void setMaxNumber ( final int maxNumber ) { Condition . INSTANCE . ensureGreater ( maxNumber , getMinNumber ( ) , "The maximum number must be greater than the minimum number" ) ; this . maxNumber = maxNumber ; setNumber ( Math . min ( getNumber ( ) , maxNumber ) ) ; }
Sets the maximum number, the preference allows to choose.

@param maxNumber
The maximum number, which should be set, as an {@link Integer} value. The number must
be greater than the minimum number