mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
forgot to commit
This commit is contained in:
+4
@@ -40,6 +40,10 @@ public class DecimalFormatter implements Formatter<BigDecimal> {
|
||||
initDefaults();
|
||||
}
|
||||
|
||||
public Class<BigDecimal> getFormattedObjectType() {
|
||||
return BigDecimal.class;
|
||||
}
|
||||
|
||||
public DecimalFormatter(String pattern) {
|
||||
initDefaults();
|
||||
formatFactory.setPattern(pattern);
|
||||
|
||||
+4
@@ -33,6 +33,10 @@ public class IntegerFormatter implements Formatter<Long> {
|
||||
|
||||
private boolean lenient;
|
||||
|
||||
public Class<Long> getFormattedObjectType() {
|
||||
return Long.class;
|
||||
}
|
||||
|
||||
public String format(Long integer, Locale locale) {
|
||||
if (integer == null) {
|
||||
return "";
|
||||
|
||||
+4
@@ -35,6 +35,10 @@ public class PercentFormatter implements Formatter<BigDecimal> {
|
||||
|
||||
private boolean lenient;
|
||||
|
||||
public Class<BigDecimal> getFormattedObjectType() {
|
||||
return BigDecimal.class;
|
||||
}
|
||||
|
||||
public String format(BigDecimal decimal, Locale locale) {
|
||||
if (decimal == null) {
|
||||
return "";
|
||||
|
||||
Reference in New Issue
Block a user