237 |
* a <code>StringBuffer</code>. |
* a <code>StringBuffer</code>. |
238 |
* |
* |
239 |
* @param number The <code>double</code> to format. |
* @param number The <code>double</code> to format. |
240 |
* @param sb The <code>StringBuffer</code> to append the formatted number to. |
* @param sbuf The <code>StringBuffer</code> to append the formatted number |
241 |
|
* to. |
242 |
* @param pos The desired <code>FieldPosition</code>. |
* @param pos The desired <code>FieldPosition</code>. |
243 |
* |
* |
244 |
* @return The <code>StringBuffer</code> with the appended number. |
* @return The <code>StringBuffer</code> with the appended number. |
251 |
* a <code>StringBuffer</code>. |
* a <code>StringBuffer</code>. |
252 |
* |
* |
253 |
* @param number The <code>long</code> to format. |
* @param number The <code>long</code> to format. |
254 |
* @param sb The <code>StringBuffer</code> to append the formatted number to. |
* @param sbuf The <code>StringBuffer</code> to append the formatted number |
255 |
|
* to. |
256 |
* @param pos The desired <code>FieldPosition</code>. |
* @param pos The desired <code>FieldPosition</code>. |
257 |
* |
* |
258 |
* @return The <code>StringBuffer</code> with the appended number. |
* @return The <code>StringBuffer</code> with the appended number. |
373 |
* will be a concrete subclass of <code>NumberFormat</code>, but the |
* will be a concrete subclass of <code>NumberFormat</code>, but the |
374 |
* actual class returned is dependent on the locale. |
* actual class returned is dependent on the locale. |
375 |
* |
* |
376 |
* @param locale The desired locale. |
* @param loc The desired locale. |
377 |
* |
* |
378 |
* @return An instance of the default <code>NumberFormat</code> class. |
* @return An instance of the default <code>NumberFormat</code> class. |
379 |
*/ |
*/ |
436 |
* will be a concrete subclass of <code>NumberFormat</code>, but the |
* will be a concrete subclass of <code>NumberFormat</code>, but the |
437 |
* actual class returned is dependent on the locale. |
* actual class returned is dependent on the locale. |
438 |
* |
* |
|
* @param locale The desired locale. |
|
|
* |
|
439 |
* @return An instance of the default <code>NumberFormat</code> class. |
* @return An instance of the default <code>NumberFormat</code> class. |
440 |
*/ |
*/ |
441 |
public static final NumberFormat getNumberInstance () |
public static final NumberFormat getNumberInstance () |
502 |
* This method returns an instance of <code>NumberFormat</code> suitable |
* This method returns an instance of <code>NumberFormat</code> suitable |
503 |
* for formatting and parsing percentage values in the specified locale. |
* for formatting and parsing percentage values in the specified locale. |
504 |
* |
* |
505 |
* @param locale The desired locale. |
* @param loc The desired locale. |
506 |
* |
* |
507 |
* @return An instance of <code>NumberFormat</code> for handling percentages. |
* @return An instance of <code>NumberFormat</code> for handling percentages. |
508 |
*/ |
*/ |
571 |
* <code>Double</code>. If no number can be parsed, no exception is |
* <code>Double</code>. If no number can be parsed, no exception is |
572 |
* thrown. Instead, the parse position remains at its initial index. |
* thrown. Instead, the parse position remains at its initial index. |
573 |
* |
* |
574 |
* @param str The string to parse. |
* @param sourceStr The string to parse. |
575 |
* @param pp The desired <code>ParsePosition</code>. |
* @param pos The desired <code>ParsePosition</code>. |
576 |
* |
* |
577 |
* @return The parsed <code>Number</code> |
* @return The parsed <code>Number</code> |
578 |
*/ |
*/ |
584 |
* <code>Double</code>. If no number can be parsed, an exception will be |
* <code>Double</code>. If no number can be parsed, an exception will be |
585 |
* thrown. |
* thrown. |
586 |
* |
* |
587 |
* @param str The string to parse. |
* @param sourceStr The string to parse. |
588 |
* |
* |
589 |
* @return The parsed <code>Number</code> |
* @return The parsed <code>Number</code> |
590 |
* |
* |
610 |
* <code>Double</code>. If no number can be parsed, no exception is |
* <code>Double</code>. If no number can be parsed, no exception is |
611 |
* thrown. Instead, the parse position remains at its initial index. |
* thrown. Instead, the parse position remains at its initial index. |
612 |
* |
* |
613 |
* @param str The string to parse. |
* @param sourceStr The string to parse. |
614 |
* @param pp The desired <code>ParsePosition</code>. |
* @param pos The desired <code>ParsePosition</code>. |
615 |
* |
* |
616 |
* @return The parsed <code>Object</code> |
* @return The parsed <code>Object</code> |
617 |
*/ |
*/ |
629 |
* might appear as "1,000,000". (Both of these assume the US English |
* might appear as "1,000,000". (Both of these assume the US English |
630 |
* locale). |
* locale). |
631 |
* |
* |
632 |
* @param groupingUsed <code>true</code> to enable grouping, |
* @param newValue <code>true</code> to enable grouping, |
633 |
* <code>false</code> to disable it. |
* <code>false</code> to disable it. |
634 |
*/ |
*/ |
635 |
public void setGroupingUsed (boolean newValue) |
public void setGroupingUsed (boolean newValue) |
643 |
* current minimum allowed digits, the minimum allowed digits value will |
* current minimum allowed digits, the minimum allowed digits value will |
644 |
* be lowered to be equal to the new maximum allowed digits value. |
* be lowered to be equal to the new maximum allowed digits value. |
645 |
* |
* |
646 |
* @param maximumFractionDigits The new maximum fraction digits value. |
* @param digits The new maximum fraction digits value. |
647 |
*/ |
*/ |
648 |
public void setMaximumFractionDigits (int newValue) |
public void setMaximumFractionDigits (int digits) |
649 |
{ |
{ |
650 |
maximumFractionDigits = newValue; |
maximumFractionDigits = digits; |
651 |
if (getMinimumFractionDigits () > maximumFractionDigits) |
if (getMinimumFractionDigits () > maximumFractionDigits) |
652 |
setMinimumFractionDigits (maximumFractionDigits); |
setMinimumFractionDigits (maximumFractionDigits); |
653 |
} |
} |
658 |
* current minimum allowed digits, the minimum allowed digits value will |
* current minimum allowed digits, the minimum allowed digits value will |
659 |
* be lowered to be equal to the new maximum allowed digits value. |
* be lowered to be equal to the new maximum allowed digits value. |
660 |
* |
* |
661 |
* @param maximumIntegerDigits The new maximum integer digits value. |
* @param digits The new maximum integer digits value. |
662 |
*/ |
*/ |
663 |
public void setMaximumIntegerDigits (int newValue) |
public void setMaximumIntegerDigits (int digits) |
664 |
{ |
{ |
665 |
maximumIntegerDigits = newValue; |
maximumIntegerDigits = digits; |
666 |
if (getMinimumIntegerDigits () > maximumIntegerDigits) |
if (getMinimumIntegerDigits () > maximumIntegerDigits) |
667 |
setMinimumIntegerDigits (maximumIntegerDigits); |
setMinimumIntegerDigits (maximumIntegerDigits); |
668 |
} |
} |
673 |
* current maximum allowed digits, the maximum allowed digits value will |
* current maximum allowed digits, the maximum allowed digits value will |
674 |
* be raised to be equal to the new minimum allowed digits value. |
* be raised to be equal to the new minimum allowed digits value. |
675 |
* |
* |
676 |
* @param minimumFractionDigits The new minimum fraction digits value. |
* @param digits The new minimum fraction digits value. |
677 |
*/ |
*/ |
678 |
public void setMinimumFractionDigits (int newValue) |
public void setMinimumFractionDigits (int digits) |
679 |
{ |
{ |
680 |
minimumFractionDigits = newValue; |
minimumFractionDigits = digits; |
681 |
if (getMaximumFractionDigits () < minimumFractionDigits) |
if (getMaximumFractionDigits () < minimumFractionDigits) |
682 |
setMaximumFractionDigits (minimumFractionDigits); |
setMaximumFractionDigits (minimumFractionDigits); |
683 |
} |
} |
688 |
* current maximum allowed digits, the maximum allowed digits value will |
* current maximum allowed digits, the maximum allowed digits value will |
689 |
* be raised to be equal to the new minimum allowed digits value. |
* be raised to be equal to the new minimum allowed digits value. |
690 |
* |
* |
691 |
* @param minimumIntegerDigits The new minimum integer digits value. |
* @param digits The new minimum integer digits value. |
692 |
*/ |
*/ |
693 |
public void setMinimumIntegerDigits (int newValue) |
public void setMinimumIntegerDigits (int digits) |
694 |
{ |
{ |
695 |
minimumIntegerDigits = newValue; |
minimumIntegerDigits = digits; |
696 |
if (getMaximumIntegerDigits () < minimumIntegerDigits) |
if (getMaximumIntegerDigits () < minimumIntegerDigits) |
697 |
setMaximumIntegerDigits (minimumIntegerDigits); |
setMaximumIntegerDigits (minimumIntegerDigits); |
698 |
} |
} |
701 |
* This method sets the parsing behavior of this object to parse only |
* This method sets the parsing behavior of this object to parse only |
702 |
* integers or not. |
* integers or not. |
703 |
* |
* |
704 |
* @param parseIntegerOnly <code>true</code> to parse only integers, |
* @param value <code>true</code> to parse only integers, |
705 |
* <code>false</code> otherwise. |
* <code>false</code> otherwise. |
706 |
*/ |
*/ |
707 |
public void setParseIntegerOnly (boolean value) |
public void setParseIntegerOnly (boolean value) |