From c1aa8b9a7553d672082ab0d77f0a43ba19e7565f Mon Sep 17 00:00:00 2001 From: Yoshito Umaoka Date: Tue, 31 Mar 2020 20:25:38 -0400 Subject: [PATCH] ICU-20979 BRS67RC ICU4J API status promotion Update ICU draft API up to 64 to stable. Regenerated API change report. --- icu4j/APIChangeReport.html | 258 +++++++++++++++--- .../com/ibm/icu/number/FormattedNumber.java | 12 +- .../ibm/icu/number/FormattedNumberRange.java | 18 +- .../icu/text/ConstrainedFieldPosition.java | 42 +-- .../com/ibm/icu/text/DateFormatSymbols.java | 20 +- .../com/ibm/icu/text/DateIntervalFormat.java | 38 +-- .../src/com/ibm/icu/text/DecimalFormat.java | 24 +- .../src/com/ibm/icu/text/FormattedValue.java | 15 +- .../src/com/ibm/icu/text/ListFormatter.java | 8 +- .../src/com/ibm/icu/text/NumberFormat.java | 4 +- .../src/com/ibm/icu/text/PluralRules.java | 3 +- .../icu/text/RelativeDateTimeFormatter.java | 48 ++-- .../core/src/com/ibm/icu/text/UFormat.java | 6 +- .../core/src/com/ibm/icu/util/BytesTrie.java | 9 +- .../core/src/com/ibm/icu/util/CharsTrie.java | 9 +- .../src/com/ibm/icu/util/MeasureUnit.java | 66 ++--- 16 files changed, 330 insertions(+), 250 deletions(-) diff --git a/icu4j/APIChangeReport.html b/icu4j/APIChangeReport.html index b8d25773530..eb615c17fc3 100644 --- a/icu4j/APIChangeReport.html +++ b/icu4j/APIChangeReport.html @@ -4,73 +4,253 @@ -ICU4J API Comparison: ICU4J 65.1 with ICU4J 66.1 +ICU4J API Comparison: ICU4J 66.1 with ICU4J 67.1 -

ICU4J API Comparison: ICU4J 65.1 with ICU4J 66.1

+

ICU4J API Comparison: ICU4J 66.1 with ICU4J 67.1


-

Removed from ICU4J 65.1

-

(no API removed)

+

Removed from ICU4J 66.1

+ +

Package com.ibm.icu.number

+ +
-

Deprecated or Obsoleted in ICU4J 66.1

+

Deprecated or Obsoleted in ICU4J 67.1

(no API obsoleted)


-

Changed in ICU4J 66.1 (old, new)

-

(no API changed)

+

Changed in ICU4J 67.1 (old, new)

+ +

Package com.ibm.icu.number

+ +
-

Promoted to stable in ICU4J 66.1

-

(no API promoted to stable)

+

Promoted to stable in ICU4J 67.1

-
-

Added in ICU4J 66.1

+

Package com.ibm.icu.number

+ -

Package com.ibm.icu.lang

+

Package com.ibm.icu.text

Package com.ibm.icu.util

+ + +
+

Added in ICU4J 67.1

+ +

Package com.ibm.icu.number

+ + +

Package com.ibm.icu.text

+ + +

Package com.ibm.icu.util

+
-

Contents generated by ReportAPI tool on Mon Feb 24 21:44:48 EST 2020
© 2020 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html#License

+

Contents generated by ReportAPI tool on Tue Mar 31 20:22:28 EDT 2020
© 2020 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html#License

diff --git a/icu4j/main/classes/core/src/com/ibm/icu/number/FormattedNumber.java b/icu4j/main/classes/core/src/com/ibm/icu/number/FormattedNumber.java index 397b1d0515a..41a5f41e3da 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/number/FormattedNumber.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/number/FormattedNumber.java @@ -44,8 +44,7 @@ public class FormattedNumber implements FormattedValue { /** * {@inheritDoc} * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public int length() { @@ -55,8 +54,7 @@ public class FormattedNumber implements FormattedValue { /** * {@inheritDoc} * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public char charAt(int index) { @@ -66,8 +64,7 @@ public class FormattedNumber implements FormattedValue { /** * {@inheritDoc} * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public CharSequence subSequence(int start, int end) { @@ -87,8 +84,7 @@ public class FormattedNumber implements FormattedValue { /** * {@inheritDoc} * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public boolean nextPosition(ConstrainedFieldPosition cfpos) { diff --git a/icu4j/main/classes/core/src/com/ibm/icu/number/FormattedNumberRange.java b/icu4j/main/classes/core/src/com/ibm/icu/number/FormattedNumberRange.java index fa5503bbfc9..02c951f8928 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/number/FormattedNumberRange.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/number/FormattedNumberRange.java @@ -68,8 +68,7 @@ public class FormattedNumberRange implements FormattedValue { /** * {@inheritDoc} * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public char charAt(int index) { @@ -79,8 +78,7 @@ public class FormattedNumberRange implements FormattedValue { /** * {@inheritDoc} * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public int length() { @@ -90,8 +88,7 @@ public class FormattedNumberRange implements FormattedValue { /** * {@inheritDoc} * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public CharSequence subSequence(int start, int end) { @@ -101,8 +98,7 @@ public class FormattedNumberRange implements FormattedValue { /** * {@inheritDoc} * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public boolean nextPosition(ConstrainedFieldPosition cfpos) { @@ -162,8 +158,7 @@ public class FormattedNumberRange implements FormattedValue { /** * {@inheritDoc} * - * @draft ICU 63 - * @provisional This API might change or be removed in a future release. + * @stable ICU 63 */ @Override public int hashCode() { @@ -176,8 +171,7 @@ public class FormattedNumberRange implements FormattedValue { /** * {@inheritDoc} * - * @draft ICU 63 - * @provisional This API might change or be removed in a future release. + * @stable ICU 63 */ @Override public boolean equals(Object other) { diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/ConstrainedFieldPosition.java b/icu4j/main/classes/core/src/com/ibm/icu/text/ConstrainedFieldPosition.java index d604b80fec8..b100e58bea0 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/ConstrainedFieldPosition.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/ConstrainedFieldPosition.java @@ -15,8 +15,7 @@ import java.util.Objects; * 3. It is used for the newer FormattedValue APIs. * * @author sffc - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public class ConstrainedFieldPosition { @@ -78,8 +77,7 @@ public class ConstrainedFieldPosition { * * By default, the CategoryFieldPosition has no iteration constraints. * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public ConstrainedFieldPosition() { reset(); @@ -91,8 +89,7 @@ public class ConstrainedFieldPosition { * - Removes any constraints that may have been set on the instance. * - Resets the iteration position. * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public void reset() { fConstraint = ConstraintType.NONE; @@ -127,8 +124,7 @@ public class ConstrainedFieldPosition { * * @param field * The field to fix when iterating. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public void constrainField(Field field) { if (field == null) { @@ -160,8 +156,7 @@ public class ConstrainedFieldPosition { * * @param classConstraint * The field class to fix when iterating. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public void constrainClass(Class classConstraint) { if (classConstraint == null) { @@ -211,8 +206,7 @@ public class ConstrainedFieldPosition { * FormattedValue#nextPosition returns TRUE. * * @return The field saved in the instance. See above for null conditions. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public Field getField() { return fField; @@ -224,8 +218,7 @@ public class ConstrainedFieldPosition { * The return value is well-defined only after FormattedValue#nextPosition returns TRUE. * * @return The start index saved in the instance. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public int getStart() { return fStart; @@ -237,8 +230,7 @@ public class ConstrainedFieldPosition { * The return value is well-defined only after FormattedValue#nextPosition returns TRUE. * * @return The end index saved in the instance. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public int getLimit() { return fLimit; @@ -250,8 +242,7 @@ public class ConstrainedFieldPosition { * The return value is well-defined only after FormattedValue#nextPosition returns TRUE. * * @return The value for the current position. Might be null. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public Object getFieldValue() { return fValue; @@ -265,8 +256,7 @@ public class ConstrainedFieldPosition { * Users of FormattedValue should not need to call this method. * * @return The current iteration context from {@link #setInt64IterationContext}. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public long getInt64IterationContext() { return fContext; @@ -279,8 +269,7 @@ public class ConstrainedFieldPosition { * * @param context * The new iteration context. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public void setInt64IterationContext(long context) { fContext = context; @@ -302,8 +291,7 @@ public class ConstrainedFieldPosition { * The new inclusive start index. * @param limit * The new exclusive end index. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public void setState(Field field, Object value, int start, int limit) { // Check matchesField only as an assertion (debug build) @@ -324,8 +312,7 @@ public class ConstrainedFieldPosition { * @param field The field to test. * @param fieldValue The field value to test. Should be null if there is no value. * @return Whether the field should be included given the constraints. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public boolean matchesField(Field field, Object fieldValue) { if (field == null) { @@ -348,8 +335,7 @@ public class ConstrainedFieldPosition { /** * {@inheritDoc} - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public String toString() { diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/DateFormatSymbols.java b/icu4j/main/classes/core/src/com/ibm/icu/text/DateFormatSymbols.java index b144b738df6..88597a6bf66 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/DateFormatSymbols.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/DateFormatSymbols.java @@ -695,7 +695,7 @@ public class DateFormatSymbols implements Serializable, Cloneable { */ private static final Map contextUsageTypeMap; static { - contextUsageTypeMap=new HashMap(); + contextUsageTypeMap=new HashMap<>(); contextUsageTypeMap.put("month-format-except-narrow", CapitalizationContextUsage.MONTH_FORMAT); contextUsageTypeMap.put("month-standalone-except-narrow", CapitalizationContextUsage.MONTH_STANDALONE); contextUsageTypeMap.put("month-narrow", CapitalizationContextUsage.MONTH_NARROW); @@ -758,8 +758,7 @@ public class DateFormatSymbols implements Serializable, Cloneable { /** * {@icu} Returns narrow era name strings. For example: "A" and "B". * @return the narrow era strings. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public String[] getNarrowEras() { return duplicate(narrowEras); @@ -768,8 +767,7 @@ public class DateFormatSymbols implements Serializable, Cloneable { /** * {@icu} Sets narrow era name strings. For example: "A" and "B". * @param newNarrowEras the new narrow era strings. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public void setNarrowEras(String[] newNarrowEras) { narrowEras = duplicate(newNarrowEras); @@ -1613,9 +1611,9 @@ public class DateFormatSymbols implements Serializable, Cloneable { private static final class CalendarDataSink extends UResource.Sink { // Data structures to store resources from the resource bundle - Map arrays = new TreeMap(); - Map> maps = new TreeMap>(); - List aliasPathPairs = new ArrayList(); + Map arrays = new TreeMap<>(); + Map> maps = new TreeMap<>(); + List aliasPathPairs = new ArrayList<>(); // Current and next calendar resource table which should be loaded String currentCalendarType = null; @@ -1670,7 +1668,7 @@ public class DateFormatSymbols implements Serializable, Cloneable { // Whenever an alias to the next calendar (except gregorian) is encountered, register the // calendar type it's pointing to if (resourcesToVisitNext == null) { - resourcesToVisitNext = new HashSet(); + resourcesToVisitNext = new HashSet<>(); } resourcesToVisitNext.add(aliasRelativePath); continue; @@ -1758,7 +1756,7 @@ public class DateFormatSymbols implements Serializable, Cloneable { if (value.getType() == ICUResourceBundle.STRING) { // We are on a leaf, store the map elements into the stringMap if (i == 0) { - stringMap = new HashMap(); + stringMap = new HashMap<>(); maps.put(path, stringMap); } assert stringMap != null; @@ -2027,7 +2025,7 @@ public class DateFormatSymbols implements Serializable, Cloneable { ULocale uloc = rb.getULocale(); setLocale(uloc, uloc); - capitalization = new HashMap(); + capitalization = new HashMap<>(); boolean[] noTransforms = new boolean[2]; noTransforms[0] = false; noTransforms[1] = false; diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/DateIntervalFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/DateIntervalFormat.java index 9c7e957bdba..62bccc4af33 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/DateIntervalFormat.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/DateIntervalFormat.java @@ -276,8 +276,7 @@ public class DateIntervalFormat extends UFormat { * * Not intended for public subclassing. * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final class FormattedDateInterval implements FormattedValue { private final String string; @@ -290,8 +289,7 @@ public class DateIntervalFormat extends UFormat { /** * {@inheritDoc} - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public String toString() { @@ -300,8 +298,7 @@ public class DateIntervalFormat extends UFormat { /** * {@inheritDoc} - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public int length() { @@ -310,8 +307,7 @@ public class DateIntervalFormat extends UFormat { /** * {@inheritDoc} - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public char charAt(int index) { @@ -320,8 +316,7 @@ public class DateIntervalFormat extends UFormat { /** * {@inheritDoc} - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public CharSequence subSequence(int start, int end) { @@ -330,8 +325,7 @@ public class DateIntervalFormat extends UFormat { /** * {@inheritDoc} - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public A appendTo(A appendable) { @@ -340,8 +334,7 @@ public class DateIntervalFormat extends UFormat { /** * {@inheritDoc} - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public boolean nextPosition(ConstrainedFieldPosition cfpos) { @@ -350,8 +343,7 @@ public class DateIntervalFormat extends UFormat { /** * {@inheritDoc} - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public AttributedCharacterIterator toCharacterIterator() { @@ -362,8 +354,7 @@ public class DateIntervalFormat extends UFormat { /** * Class for span fields in FormattedDateInterval. * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final class SpanField extends UFormat.SpanField { private static final long serialVersionUID = -6330879259553618133L; @@ -375,8 +366,7 @@ public class DateIntervalFormat extends UFormat { * 0, the date fields within the span are for the "from" date; if 1, * the date fields within the span are for the "to" date. * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final SpanField DATE_INTERVAL_SPAN = new SpanField("date-interval-span"); @@ -385,7 +375,7 @@ public class DateIntervalFormat extends UFormat { } /** - * serizalization method resolve instances to the constant + * serialization method resolve instances to the constant * DateIntervalFormat.SpanField values * @draft ICU 64 * @provisional This API might change or be removed in a future release. @@ -795,8 +785,7 @@ public class DateIntervalFormat extends UFormat { * * @param dtInterval DateInterval to be formatted. * @return A FormattedDateInterval containing the format result. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public FormattedDateInterval formatToValue(DateInterval dtInterval) { StringBuffer sb = new StringBuffer(); @@ -903,8 +892,7 @@ public class DateIntervalFormat extends UFormat { * @param toCalendar calendar set to the to date in date interval * to be formatted into date interval string * @return A FormattedDateInterval containing the format result. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public FormattedDateInterval formatToValue(Calendar fromCalendar, Calendar toCalendar) { StringBuffer sb = new StringBuffer(); 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 10a4e7596d9..c06531e57b8 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 @@ -1083,8 +1083,7 @@ public class DecimalFormat extends NumberFormat { * @return Whether the sign is shown on positive numbers and zero. * @see #setSignAlwaysShown * @category Affixes - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public synchronized boolean isSignAlwaysShown() { // This is not in the exported properties @@ -1113,8 +1112,7 @@ public class DecimalFormat extends NumberFormat { * * @param value true to always show a sign; false to hide the sign on positive numbers and zero. * @category Affixes - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public synchronized void setSignAlwaysShown(boolean value) { properties.setSignAlwaysShown(value); @@ -1983,8 +1981,7 @@ public class DecimalFormat extends NumberFormat { * * @see #setMinimumGroupingDigits * @category Separators - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public synchronized int getMinimumGroupingDigits() { if (properties.getMinimumGroupingDigits() > 0) { @@ -2000,8 +1997,7 @@ public class DecimalFormat extends NumberFormat { * * @param number The minimum number of digits before grouping is triggered. * @category Separators - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public synchronized void setMinimumGroupingDigits(int number) { properties.setMinimumGroupingDigits(number); @@ -2312,8 +2308,7 @@ public synchronized void setParseStrictMode(ParseMode parseMode) { * * @see #setParseNoExponent * @category Parsing - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public synchronized boolean isParseNoExponent() { return properties.getParseNoExponent(); @@ -2326,8 +2321,7 @@ public synchronized void setParseStrictMode(ParseMode parseMode) { * * @param value true to prevent exponents from being parsed; false to allow them to be parsed. * @category Parsing - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public synchronized void setParseNoExponent(boolean value) { properties.setParseNoExponent(value); @@ -2339,8 +2333,7 @@ public synchronized void setParseStrictMode(ParseMode parseMode) { * * @see #setParseNoExponent * @category Parsing - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public synchronized boolean isParseCaseSensitive() { return properties.getParseCaseSensitive(); @@ -2354,8 +2347,7 @@ public synchronized void setParseStrictMode(ParseMode parseMode) { * @param value true to force case (uppercase/lowercase) to match when parsing; false to ignore * case and perform case folding. * @category Parsing - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public synchronized void setParseCaseSensitive(boolean value) { properties.setParseCaseSensitive(value); diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/FormattedValue.java b/icu4j/main/classes/core/src/com/ibm/icu/text/FormattedValue.java index 5a0dd5bb01f..13c14249a88 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/FormattedValue.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/FormattedValue.java @@ -11,8 +11,7 @@ import com.ibm.icu.util.ICUUncheckedIOException; * Many formatters format to classes implementing FormattedValue. * * @author sffc - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public interface FormattedValue extends CharSequence { /** @@ -21,8 +20,7 @@ public interface FormattedValue extends CharSequence { * Consider using {@link #appendTo} for greater efficiency. * * @return The formatted string. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public String toString(); @@ -36,8 +34,7 @@ public interface FormattedValue extends CharSequence { * @param appendable The Appendable to which to append the string output. * @return The same Appendable, for chaining. * @throws ICUUncheckedIOException if the Appendable throws IOException - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public A appendTo(A appendable); @@ -59,8 +56,7 @@ public interface FormattedValue extends CharSequence { * only one specific field; see {@link ConstrainedFieldPosition#constrainField}. * @return true if a new occurrence of the field was found; * false otherwise. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public boolean nextPosition(ConstrainedFieldPosition cfpos); @@ -70,8 +66,7 @@ public interface FormattedValue extends CharSequence { * Consider using {@link #nextPosition} if you are trying to get field information. * * @return An AttributedCharacterIterator containing full field information. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public AttributedCharacterIterator toCharacterIterator(); } diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/ListFormatter.java b/icu4j/main/classes/core/src/com/ibm/icu/text/ListFormatter.java index 6e7dbf7905e..9ae4ca28f2b 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/ListFormatter.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/ListFormatter.java @@ -178,8 +178,7 @@ final public class ListFormatter { /** * Class for span fields in FormattedDateInterval. * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final class SpanField extends UFormat.SpanField { private static final long serialVersionUID = 3563544214705634403L; @@ -190,8 +189,7 @@ final public class ListFormatter { * Instances of LIST_SPAN should have an associated value, the index * within the input list that is represented by the span. * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final SpanField LIST_SPAN = new SpanField("list-span"); @@ -200,7 +198,7 @@ final public class ListFormatter { } /** - * serizalization method resolve instances to the constant + * serialization method resolve instances to the constant * ListFormatter.SpanField values * @internal * @deprecated This API is ICU internal only. 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 3efb00f321d..2183008dcf3 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 @@ -1961,12 +1961,12 @@ public abstract class NumberFormat extends UFormat { public static final Field CURRENCY = new Field("currency"); /** - * @draft ICU 64 + * @stable ICU 64 */ public static final Field MEASURE_UNIT = new Field("measure unit"); /** - * @draft ICU 64 + * @stable ICU 64 */ public static final Field COMPACT = new Field("compact"); diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/PluralRules.java b/icu4j/main/classes/core/src/com/ibm/icu/text/PluralRules.java index 8a160722160..423a818cb7e 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/PluralRules.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/PluralRules.java @@ -2052,8 +2052,7 @@ public class PluralRules implements Serializable { * * @param number The number for which the rule has to be determined. * @return The keyword of the selected rule. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public String select(FormattedNumber number) { return rules.select(number.getFixedDecimal()); diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/RelativeDateTimeFormatter.java b/icu4j/main/classes/core/src/com/ibm/icu/text/RelativeDateTimeFormatter.java index 05ca49fbd29..4d84dfef01f 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/RelativeDateTimeFormatter.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/RelativeDateTimeFormatter.java @@ -246,8 +246,7 @@ public final class RelativeDateTimeFormatter { /** * Quarter - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ QUARTER, @@ -414,8 +413,7 @@ public final class RelativeDateTimeFormatter { * There is no public constructor to this class; the only instances are the * constants defined here. *

- * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static class Field extends Format.Field { private static final long serialVersionUID = -5327685528663492325L; @@ -423,16 +421,14 @@ public final class RelativeDateTimeFormatter { /** * Represents a literal text string, like "tomorrow" or "days ago". * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final Field LITERAL = new Field("literal"); /** * Represents a number quantity, like "3" in "3 days ago". * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final Field NUMERIC = new Field("numeric"); @@ -466,8 +462,7 @@ public final class RelativeDateTimeFormatter { * Not intended for public subclassing. * * @author sffc - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static class FormattedRelativeDateTime implements FormattedValue { @@ -480,8 +475,7 @@ public final class RelativeDateTimeFormatter { /** * {@inheritDoc} * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public String toString() { @@ -491,8 +485,7 @@ public final class RelativeDateTimeFormatter { /** * {@inheritDoc} * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public int length() { @@ -502,8 +495,7 @@ public final class RelativeDateTimeFormatter { /** * {@inheritDoc} * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public char charAt(int index) { @@ -513,8 +505,7 @@ public final class RelativeDateTimeFormatter { /** * {@inheritDoc} * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public CharSequence subSequence(int start, int end) { @@ -524,8 +515,7 @@ public final class RelativeDateTimeFormatter { /** * {@inheritDoc} * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public A appendTo(A appendable) { @@ -535,8 +525,7 @@ public final class RelativeDateTimeFormatter { /** * {@inheritDoc} * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public boolean nextPosition(ConstrainedFieldPosition cfpos) { @@ -546,8 +535,7 @@ public final class RelativeDateTimeFormatter { /** * {@inheritDoc} * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ @Override public AttributedCharacterIterator toCharacterIterator() { @@ -686,8 +674,7 @@ public final class RelativeDateTimeFormatter { * @return the formatted relative datetime * @throws IllegalArgumentException if direction is something other than * NEXT or LAST. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public FormattedRelativeDateTime formatToValue(double quantity, Direction direction, RelativeUnit unit) { checkNoAdjustForContext(); @@ -756,8 +743,7 @@ public final class RelativeDateTimeFormatter { * date, e.g. RelativeDateTimeUnit.WEEK, * RelativeDateTimeUnit.FRIDAY. * @return The formatted string (may be empty in case of error) - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public FormattedRelativeDateTime formatNumericToValue(double offset, RelativeDateTimeUnit unit) { checkNoAdjustForContext(); @@ -831,8 +817,7 @@ public final class RelativeDateTimeFormatter { * return null to signal that no formatted string is available. * @throws IllegalArgumentException if the direction is incompatible with * unit this can occur with NOW which can only take PLAIN. - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public FormattedRelativeDateTime formatToValue(Direction direction, AbsoluteUnit unit) { checkNoAdjustForContext(); @@ -903,8 +888,7 @@ public final class RelativeDateTimeFormatter { * date, e.g. RelativeDateTimeUnit.WEEK, * RelativeDateTimeUnit.FRIDAY. * @return The formatted string (may be empty in case of error) - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public FormattedRelativeDateTime formatToValue(double offset, RelativeDateTimeUnit unit) { checkNoAdjustForContext(); diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/UFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/UFormat.java index 8c91755e5ee..2923815c27c 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/UFormat.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/UFormat.java @@ -30,8 +30,7 @@ public abstract class UFormat extends Format { * A field that represents a span of text that may be composed with other fields. * SpanField classes usually have an associated value. * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static abstract class SpanField extends Format.Field { private static final long serialVersionUID = -4732719509273350606L; @@ -39,8 +38,7 @@ public abstract class UFormat extends Format { /** * Construct a new instance. * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ protected SpanField(String name) { super(name); diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/BytesTrie.java b/icu4j/main/classes/core/src/com/ibm/icu/util/BytesTrie.java index 10ff5bac9b5..cc88bb013b5 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/BytesTrie.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/BytesTrie.java @@ -54,8 +54,7 @@ public final class BytesTrie implements Cloneable, Iterable { * Does not copy the byte array which will be shared. * Same as clone() but without the throws clause. * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public BytesTrie(BytesTrie other) { bytes_ = other.bytes_; @@ -92,8 +91,7 @@ public final class BytesTrie implements Cloneable, Iterable { * * @return opaque state value * @see #resetToState64 - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public long getState64() { return ((long)remainingMatchLength_ << 32) | pos_; @@ -111,8 +109,7 @@ public final class BytesTrie implements Cloneable, Iterable { * @see #getState64 * @see #resetToState * @see #reset - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public BytesTrie resetToState64(long state) { remainingMatchLength_ = (int)(state >> 32); diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/CharsTrie.java b/icu4j/main/classes/core/src/com/ibm/icu/util/CharsTrie.java index bb3f47af2bf..af33ffa32a9 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/CharsTrie.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/CharsTrie.java @@ -57,8 +57,7 @@ public final class CharsTrie implements Cloneable, Iterable { * Does not copy the char array which will be shared. * Same as clone() but without the throws clause. * - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public CharsTrie(CharsTrie other) { chars_ = other.chars_; @@ -95,8 +94,7 @@ public final class CharsTrie implements Cloneable, Iterable { * * @return opaque state value * @see #resetToState64 - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public long getState64() { return ((long)remainingMatchLength_ << 32) | pos_; @@ -114,8 +112,7 @@ public final class CharsTrie implements Cloneable, Iterable { * @see #getState64 * @see #resetToState * @see #reset - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public CharsTrie resetToState64(long state) { remainingMatchLength_ = (int)(state >> 32); diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/MeasureUnit.java b/icu4j/main/classes/core/src/com/ibm/icu/util/MeasureUnit.java index 691e3756f68..356ca9946fe 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/MeasureUnit.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/MeasureUnit.java @@ -464,8 +464,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of area: dunam - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit DUNAM = MeasureUnit.internalGetInstance("area", "dunam"); @@ -537,8 +536,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of concentr: mole - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit MOLE = MeasureUnit.internalGetInstance("concentr", "mole"); @@ -562,8 +560,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of concentr: permyriad - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit PERMYRIAD = MeasureUnit.internalGetInstance("concentr", "permyriad"); @@ -671,8 +668,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of duration: day-person - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit DAY_PERSON = MeasureUnit.internalGetInstance("duration", "day-person"); @@ -715,8 +711,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of duration: month-person - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit MONTH_PERSON = MeasureUnit.internalGetInstance("duration", "month-person"); @@ -740,8 +735,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of duration: week-person - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit WEEK_PERSON = MeasureUnit.internalGetInstance("duration", "week-person"); @@ -753,8 +747,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of duration: year-person - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit YEAR_PERSON = MeasureUnit.internalGetInstance("duration", "year-person"); @@ -784,8 +777,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of energy: british-thermal-unit - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit BRITISH_THERMAL_UNIT = MeasureUnit.internalGetInstance("energy", "british-thermal-unit"); @@ -797,8 +789,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of energy: electronvolt - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit ELECTRONVOLT = MeasureUnit.internalGetInstance("energy", "electronvolt"); @@ -841,15 +832,13 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of force: newton - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit NEWTON = MeasureUnit.internalGetInstance("force", "newton"); /** * Constant for unit of force: pound-force - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit POUND_FORCE = MeasureUnit.internalGetInstance("force", "pound-force"); @@ -1042,8 +1031,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of length: solar-radius - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit SOLAR_RADIUS = MeasureUnit.internalGetInstance("length", "solar-radius"); @@ -1061,8 +1049,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of light: solar-luminosity - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit SOLAR_LUMINOSITY = MeasureUnit.internalGetInstance("light", "solar-luminosity"); @@ -1074,15 +1061,13 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of mass: dalton - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit DALTON = MeasureUnit.internalGetInstance("mass", "dalton"); /** * Constant for unit of mass: earth-mass - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit EARTH_MASS = MeasureUnit.internalGetInstance("mass", "earth-mass"); @@ -1136,8 +1121,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of mass: solar-mass - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit SOLAR_MASS = MeasureUnit.internalGetInstance("mass", "solar-mass"); @@ -1216,15 +1200,13 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of pressure: kilopascal - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit KILOPASCAL = MeasureUnit.internalGetInstance("pressure", "kilopascal"); /** * Constant for unit of pressure: megapascal - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit MEGAPASCAL = MeasureUnit.internalGetInstance("pressure", "megapascal"); @@ -1303,15 +1285,13 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of torque: newton-meter - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit NEWTON_METER = MeasureUnit.internalGetInstance("torque", "newton-meter"); /** * Constant for unit of torque: pound-force-foot - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit POUND_FOOT = MeasureUnit.internalGetInstance("torque", "pound-force-foot"); @@ -1323,8 +1303,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of volume: barrel - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit BARREL = MeasureUnit.internalGetInstance("volume", "barrel"); @@ -1408,8 +1387,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of volume: fluid-ounce-imperial - * @draft ICU 64 - * @provisional This API might change or be removed in a future release. + * @stable ICU 64 */ public static final MeasureUnit FLUID_OUNCE_IMPERIAL = MeasureUnit.internalGetInstance("volume", "fluid-ounce-imperial");