@@ -1102,8 +1102,8 @@ should throw a ParseException or IllegalArgumentException if a parse attempt fai
1102
1102
care to ensure your Formatter implementation is thread-safe.
1103
1103
1104
1104
Several Formatter implementations are provided in `format` subpackages as a convenience.
1105
- The `number` package provides a `NumberFormatter `, `CurrencyFormatter `, and
1106
- `PercentFormatter ` to format `java.lang.Number` objects using a `java.text.NumberFormat`.
1105
+ The `number` package provides a `NumberStyleFormatter `, `CurrencyStyleFormatter `, and
1106
+ `PercentStyleFormatter ` to format `java.lang.Number` objects using a `java.text.NumberFormat`.
1107
1107
The `datetime` package provides a `DateFormatter` to format `java.util.Date` objects with
1108
1108
a `java.text.DateFormat`. The `datetime.joda` package provides comprehensive datetime
1109
1109
formatting support based on the http://joda-time.sourceforge.net[Joda-Time library].
@@ -1203,18 +1203,17 @@ specified:
1203
1203
return configureFormatterFrom(annotation, fieldType);
1204
1204
}
1205
1205
1206
- private Formatter<Number> configureFormatterFrom(NumberFormat annotation,
1207
- Class<?> fieldType) {
1206
+ private Formatter<Number> configureFormatterFrom(NumberFormat annotation, Class<?> fieldType) {
1208
1207
if (!annotation.pattern().isEmpty()) {
1209
- return new NumberFormatter (annotation.pattern());
1208
+ return new NumberStyleFormatter (annotation.pattern());
1210
1209
} else {
1211
1210
Style style = annotation.style();
1212
1211
if (style == Style.PERCENT) {
1213
- return new PercentFormatter ();
1212
+ return new PercentStyleFormatter ();
1214
1213
} else if (style == Style.CURRENCY) {
1215
- return new CurrencyFormatter ();
1214
+ return new CurrencyStyleFormatter ();
1216
1215
} else {
1217
- return new NumberFormatter ();
1216
+ return new NumberStyleFormatter ();
1218
1217
}
1219
1218
}
1220
1219
}
0 commit comments