Merged gcj-eclipse branch to trunk.
From-SVN: r120621
This commit is contained in:
parent
c648dedbde
commit
97b8365caf
17478 changed files with 606493 additions and 100744 deletions
|
@ -218,18 +218,21 @@ public abstract class NumberFormat extends Format implements Cloneable
|
|||
public final String format (long number)
|
||||
{
|
||||
StringBuffer sbuf = new StringBuffer(50);
|
||||
format (number, sbuf, null);
|
||||
format (number, sbuf, new FieldPosition(0));
|
||||
return sbuf.toString();
|
||||
}
|
||||
|
||||
public final StringBuffer format (Object obj, StringBuffer sbuf,
|
||||
FieldPosition pos)
|
||||
/**
|
||||
* @specnote this method was final in releases before 1.5
|
||||
*/
|
||||
public StringBuffer format (Object obj, StringBuffer sbuf,
|
||||
FieldPosition pos)
|
||||
{
|
||||
if (obj instanceof Number)
|
||||
return format(((Number) obj).doubleValue(), sbuf, pos);
|
||||
else
|
||||
throw new IllegalArgumentException
|
||||
("Cannot format given Object as a Number");
|
||||
|
||||
throw new
|
||||
IllegalArgumentException("Cannot format given Object as a Number");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -351,7 +354,7 @@ public abstract class NumberFormat extends Format implements Cloneable
|
|||
{
|
||||
NumberFormat format;
|
||||
|
||||
format = computeInstance (loc, "currencyFormat", "$#,##0.00;($#,##0.00)");
|
||||
format = computeInstance (loc, "currencyFormat", "\u00A4#,##0.00;(\u00A4#,##0.00)");
|
||||
format.setMaximumFractionDigits(format.getCurrency().getDefaultFractionDigits());
|
||||
return format;
|
||||
}
|
||||
|
@ -720,7 +723,9 @@ public abstract class NumberFormat extends Format implements Cloneable
|
|||
public final String format (double number)
|
||||
{
|
||||
StringBuffer sbuf = new StringBuffer(50);
|
||||
format (number, sbuf, null);
|
||||
FieldPosition position = new FieldPosition(0);
|
||||
|
||||
format (number, sbuf, position);
|
||||
return sbuf.toString();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue