Code example for DecimalFormat

Methods: setParseBigDecimal, setRoundingMode

      throw new NullPointerException();
    this.pattern = pattern;
    this.locale = locale;
    this.decimalFormat = new DecimalFormat(pattern, new DecimalFormatSymbols(locale));
   * Creates a new number-format for the given type using the standard JDK methods. 
   * @param type   the type. 
   * @param locale the locale for which the format shoudl be created. 
   * @return the number format or null, if there was an error while creating the format. 
  private NumberFormat createFormat(final int type, final Locale locale)
    switch (type)