From e18dd19a9e2d876d037d26cc88672c972f1614bb Mon Sep 17 00:00:00 2001 From: Shane Carr Date: Wed, 28 Feb 2018 02:56:52 +0000 Subject: [PATCH] ICU-13402 Adding pointer to NumberFormatter from classes that it replaces. X-SVN-Rev: 41000 --- .../src/com/ibm/icu/text/CompactDecimalFormat.java | 10 ++++++++++ .../core/src/com/ibm/icu/text/DecimalFormat.java | 11 ++++++++++- .../core/src/com/ibm/icu/text/MeasureFormat.java | 7 +++++++ .../core/src/com/ibm/icu/text/NumberFormat.java | 8 ++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/CompactDecimalFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/CompactDecimalFormat.java index 7feeb33383c..18e1ee1b35c 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/CompactDecimalFormat.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/CompactDecimalFormat.java @@ -13,10 +13,20 @@ import java.text.ParsePosition; import java.util.Locale; import com.ibm.icu.impl.number.DecimalFormatProperties; +import com.ibm.icu.number.NumberFormatter; import com.ibm.icu.util.CurrencyAmount; import com.ibm.icu.util.ULocale; /** + * Formats numbers in compact (abbreviated) notation, like "1.2K" instead of "1200". + * + *

+ * IMPORTANT: New users are strongly encouraged to see if + * {@link NumberFormatter} fits their use case. Although not deprecated, this + * class, CompactDecimalFormat, is on life support and is provided for + * backwards compatibility only. + *


+ * * The CompactDecimalFormat produces abbreviated numbers, suitable for display in environments will * limited real estate. For example, 'Hits: 1.2B' instead of 'Hits: 1,200,000,000'. The format will * be appropriate for the given language, such as "1,2 Mrd." for German. diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java index 5f68fe60469..cf56e20aab0 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java @@ -34,7 +34,16 @@ import com.ibm.icu.util.ULocale; import com.ibm.icu.util.ULocale.Category; /** - * {@icuenhanced java.text.DecimalFormat}.{@icu _usage_} DecimalFormat is the primary + * {@icuenhanced java.text.DecimalFormat}.{@icu _usage_} + * + *

+ * IMPORTANT: New users are strongly encouraged to see if + * {@link NumberFormatter} fits their use case. Although not deprecated, this + * class, DecimalFormat, is on life support and is only provided for + * java.text.DecimalFormat compatibility. + *


+ * + * DecimalFormat is the primary * concrete subclass of {@link NumberFormat}. It has a variety of features designed to make it * possible to parse and format numbers in any locale, including support for Western, Arabic, or * Indic digits. It supports different flavors of numbers, including integers ("123"), fixed-point diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/MeasureFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/MeasureFormat.java index 0d950cbc0a3..500ee5dc3b7 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/MeasureFormat.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/MeasureFormat.java @@ -56,6 +56,13 @@ import com.ibm.icu.util.UResourceBundle; * A formatter for Measure objects. * *

+ * IMPORTANT: New users are strongly encouraged to see if + * {@link NumberFormatter} fits their use case. Although not deprecated, this + * class, MeasureFormat, is on life support and is provided for + * backwards compatibility only. + *


+ * + *

* To format a Measure object, first create a formatter object using a MeasureFormat factory method. Then * use that object's format or formatMeasures methods. * diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/NumberFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/NumberFormat.java index e97ca196dbf..38885def708 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/NumberFormat.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/NumberFormat.java @@ -25,6 +25,7 @@ import java.util.Set; import com.ibm.icu.impl.ICUData; import com.ibm.icu.impl.ICUResourceBundle; +import com.ibm.icu.number.NumberFormatter; import com.ibm.icu.util.Currency; import com.ibm.icu.util.Currency.CurrencyUsage; import com.ibm.icu.util.CurrencyAmount; @@ -35,6 +36,13 @@ import com.ibm.icu.util.UResourceBundle; /** * {@icuenhanced java.text.NumberFormat}.{@icu _usage_} * + *

+ * IMPORTANT: New users are strongly encouraged to see if + * {@link NumberFormatter} fits their use case. Although not deprecated, this + * class, NumberFormat, is on life support and is only provided for + * java.text.NumberFormat compatibility. + *


+ * * NumberFormat is the abstract base class for all number * formats. This class provides the interface for formatting and parsing * numbers. NumberFormat also provides methods for determining -- 2.40.0