Add exception throwing to withDecimalFormatPattern() method
This commit is contained in:
parent
e14c2c188d
commit
2cb97dbe49
|
@ -50,8 +50,10 @@ public class FormatNumber {
|
|||
DecimalFormat df3 = new DecimalFormat("#,###,###,##0.000");
|
||||
if (places == 2)
|
||||
return new Double(df2.format(value));
|
||||
if (places == 3)
|
||||
else if (places == 3)
|
||||
return new Double(df3.format(value));
|
||||
else
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
public static double withDecimalFormatLocal(double value) {
|
||||
|
|
Loading…
Reference in New Issue