Lines Matching defs:format

60  * features designed to make it possible to parse and format numbers in any
71 * <code>DecimalFormat</code>. If you need to customize the format object, do
250 * <code>DecimalFormat</code> can be instructed to format and parse scientific
252 * that creates a scientific notation format. In a pattern, the exponent
331 * It is recommended to create separate format instances for each thread.
332 * If multiple threads access a format concurrently, it must be synchronized
339 * // and percent format for each locale</strong>
363 * System.out.print(" -> " + form.format(myNumber));
365 * System.out.println(" -> " + form.parse(form.format(myNumber)));
371 * @see <a href="http://java.sun.com/docs/books/tutorial/i18n/format/decimalFormat.html">Java Tutorial</a>
442 * behavior of the format.
447 * to a standard format, you can modify the format returned by
474 * @param number the number to format
488 public final StringBuffer format(Object number,
497 return format(((Number)number).longValue(), toAppendTo, pos);
499 return format((BigDecimal)number, toAppendTo, pos);
501 return format((BigInteger)number, toAppendTo, pos);
503 return format(((Number)number).doubleValue(), toAppendTo, pos);
505 throw new IllegalArgumentException("Cannot format given Object as a Number");
511 * @param number The double to format
520 public StringBuffer format(double number, StringBuffer result,
525 return format(number, result, fieldPosition.getFieldDelegate());
530 * @param number The double to format
537 private StringBuffer format(double number, StringBuffer result,
612 * @param number The long to format
621 public StringBuffer format(long number, StringBuffer result,
626 return format(number, result, fieldPosition.getFieldDelegate());
631 * @param number The long to format
639 private StringBuffer format(long number, StringBuffer result,
670 return format(bigIntegerValue, result, delegate, true);
699 * @param number The BigDecimal to format
708 private StringBuffer format(BigDecimal number, StringBuffer result,
712 return format(number, result, fieldPosition.getFieldDelegate());
717 * @param number The BigDecimal to format
724 private StringBuffer format(BigDecimal number, StringBuffer result,
752 * @param number The BigInteger to format
761 private StringBuffer format(BigInteger number, StringBuffer result,
766 return format(number, result, fieldPosition.getFieldDelegate(), false);
771 * @param number The BigInteger to format
779 private StringBuffer format(BigInteger number, StringBuffer result,
827 * @exception IllegalArgumentException when the Format cannot format the
831 * @param obj The object to format
841 format(((Number)obj).doubleValue(), sb, delegate);
845 format(((Number)obj).longValue(), sb, delegate);
847 format((BigDecimal)obj, sb, delegate);
849 format((BigInteger)obj, sb, delegate, false);
855 "Cannot format given Object as a Number");
890 * format as zero. This allows sensible computations and preserves
912 // Minimum integer digits are handled in exponential format by
931 // it is for the format 0.MMMMMx10^n.
1241 * for corresponding strings in locale-independent format. The
1617 * Returns a copy of the decimal format symbols, which is generally not
1633 * Sets the decimal format symbols, which is generally not changed
1810 * For a percent format, set the multiplier to 100 and the suffixes to
1812 * For a per mille format, set the multiplier to 1000 and the suffixes to
2587 * possible for format() to produce empty strings, format() checks
2792 * Gets the currency used by this decimal format when formatting
2796 * on this number format's symbols.
2798 * @return the currency used by this decimal format, or <code>null</code>
2806 * Sets the currency used by this number format when formatting
2808 * number of fraction digits used by the number format.
2811 * on this number format's symbols.
2813 * @param currency the new currency to be used by this decimal format
3084 * True if this object represents a currency format. This determines
3090 * The <code>DecimalFormatSymbols</code> object used by this format.
3091 * It contains the symbols used to format numbers, e.g. the grouping separator,