Code example for NumberFormat

Methods: setGroupingUsed, setMaximumFractionDigits, setMinimumFractionDigits

0
	 * Uses a default NumberFormat with 2 fraction digits and 
	 * grouping.  
	 */ 
	public MValueFormat(Locale locale, int minFractionDigits, int maxFractionDigits) {
		nf = NumberFormat.getInstance(locale);
		nf.setGroupingUsed(true);
		nf.setMinimumFractionDigits(minFractionDigits);
		nf.setMaximumFractionDigits(maxFractionDigits);
	} 
	 
	/** 
	 * Create a format with custom NumberFormat. 
	 * @param nf 
	 */ 
	public MValueFormat(NumberFormat nf) {
		this.nf = nf;
	} 
	 
	/* (non-Javadoc) 
	 * @see de.xwic.cube.IValueFormat#format(java.lang.Double) 
	 */