public static String printNumber(Number value, int integerDigits, int fractionDigits, Locale locale) {
    """
	Write a number into a string value.
	
	@param value          the number to write
	@param integerDigits  maximal number of integer digits
	@param fractionDigits maximal number of fraction digits
	@param locale         locale for decimal separator (using {@link Locale#ENGLISH} if null)
	@return the formatted number
    """
        if (value == null) return null;
        NumberFormat format = NumberFormat.getNumberInstance((locale != null) ? locale : Locale.ENGLISH);
        format.setMaximumIntegerDigits(integerDigits);
        format.setMaximumFractionDigits(fractionDigits);
        format.setMinimumFractionDigits(0);
        format.setGroupingUsed(false);
        return format.format(value);
    }
public static String printNumber(Number value, int integerDigits, int fractionDigits, Locale locale) {
        if (value == null) return null;
        NumberFormat format = NumberFormat.getNumberInstance((locale != null) ? locale : Locale.ENGLISH);
        format.setMaximumIntegerDigits(integerDigits);
        format.setMaximumFractionDigits(fractionDigits);
        format.setMinimumFractionDigits(0);
        format.setGroupingUsed(false);
        return format.format(value);
    }
public static String printNumber ( Number value , int integerDigits , int fractionDigits , Locale locale ) { if ( value == null ) return null ; NumberFormat format = NumberFormat . getNumberInstance ( ( locale != null ) ? locale : Locale . ENGLISH ) ; format . setMaximumIntegerDigits ( integerDigits ) ; format . setMaximumFractionDigits ( fractionDigits ) ; format . setMinimumFractionDigits ( 0 ) ; format . setGroupingUsed ( false ) ; return format . format ( value ) ; }
Write a number into a string value.

@param value          the number to write
@param integerDigits  maximal number of integer digits
@param fractionDigits maximal number of fraction digits
@param locale         locale for decimal separator (using {@link Locale#ENGLISH} if null)
@return the formatted number
Write a number into a string value .