From 2879c80793f7513f7dfc0297743bc05c56ec6088 Mon Sep 17 00:00:00 2001 From: Yoshito Umaoka Date: Mon, 20 Mar 2017 20:23:23 +0000 Subject: [PATCH 1/2] ICU-13052 ICU4J 59 API promotion draft. X-SVN-Rev: 39886 --- icu4j/APIChangeReport.html | 128 ++++++++++++++++-- .../core/src/com/ibm/icu/text/DateFormat.java | 6 +- .../icu/text/RelativeDateTimeFormatter.java | 51 +++---- .../src/com/ibm/icu/text/SimpleFormatter.java | 27 ++-- .../src/com/ibm/icu/util/MeasureUnit.java | 9 +- 5 files changed, 149 insertions(+), 72 deletions(-) diff --git a/icu4j/APIChangeReport.html b/icu4j/APIChangeReport.html index 0ca6c07bd96..f6b724363e0 100644 --- a/icu4j/APIChangeReport.html +++ b/icu4j/APIChangeReport.html @@ -4,10 +4,10 @@ -ICU4J API Comparison: ICU4J 58.1 with ICU4J 59.0.1 +ICU4J API Comparison: ICU4J 58.1 with ICU4J 59.1 -

ICU4J API Comparison: ICU4J 58.1 with ICU4J 59.0.1

+

ICU4J API Comparison: ICU4J 58.1 with ICU4J 59.1


Removed from ICU4J 58.1

@@ -25,29 +25,137 @@ MeasureUnit
-

Deprecated or Obsoleted in ICU4J 59.0.1

-

(no API obsoleted)

+

Deprecated or Obsoleted in ICU4J 59.1

+ +

Package com.ibm.icu.text

+ +
-

Changed in ICU4J 59.0.1 (old, new)

+

Changed in ICU4J 59.1 (old, new)

(no API changed)


-

Promoted to stable in ICU4J 59.0.1

-

(no API promoted to stable)

+

Promoted to stable in ICU4J 59.1

-
-

Added in ICU4J 59.0.1

+

Package com.ibm.icu.text

+

Package com.ibm.icu.util

+ + +
+

Added in ICU4J 59.1

+ +

Package com.ibm.icu.text

+ + +

Package com.ibm.icu.util

+
-

Contents generated by ReportAPI tool on Mon Jan 30 02:07:39 EST 2017
© 2017 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html#License

+

Contents generated by ReportAPI tool on Mon Mar 20 16:20:05 EDT 2017
© 2017 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/text/DateFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/DateFormat.java index 84452d39625..3f3621b0631 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/DateFormat.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/DateFormat.java @@ -455,8 +455,7 @@ public abstract class DateFormat extends UFormat { * {@icu} FieldPosition selector for 'b' field alignment. * No related Calendar field. * This displays the fixed day period (am/pm/midnight/noon). - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ final static int AM_PM_MIDNIGHT_NOON_FIELD = 35; @@ -464,8 +463,7 @@ public abstract class DateFormat extends UFormat { * {@icu} FieldPosition selector for 'B' field alignment. * No related Calendar field. * This displays the flexible day period. - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ final static int FLEXIBLE_DAY_PERIOD_FIELD = 36; 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 73ec0708f14..ba28bfe18e1 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 @@ -299,106 +299,91 @@ public final class RelativeDateTimeFormatter { /** * Specifies that relative unit is year, e.g. "last year", * "in 5 years". - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ YEAR, /** * Specifies that relative unit is quarter, e.g. "last quarter", * "in 5 quarters". - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ QUARTER, /** * Specifies that relative unit is month, e.g. "last month", * "in 5 months". - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ MONTH, /** * Specifies that relative unit is week, e.g. "last week", * "in 5 weeks". - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ WEEK, /** * Specifies that relative unit is day, e.g. "yesterday", * "in 5 days". - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ DAY, /** * Specifies that relative unit is hour, e.g. "1 hour ago", * "in 5 hours". - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ HOUR, /** * Specifies that relative unit is minute, e.g. "1 minute ago", * "in 5 minutes". - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ MINUTE, /** * Specifies that relative unit is second, e.g. "1 second ago", * "in 5 seconds". - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ SECOND, /** * Specifies that relative unit is Sunday, e.g. "last Sunday", * "this Sunday", "next Sunday", "in 5 Sundays". - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ SUNDAY, /** * Specifies that relative unit is Monday, e.g. "last Monday", * "this Monday", "next Monday", "in 5 Mondays". - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ MONDAY, /** * Specifies that relative unit is Tuesday, e.g. "last Tuesday", * "this Tuesday", "next Tuesday", "in 5 Tuesdays". - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ TUESDAY, /** * Specifies that relative unit is Wednesday, e.g. "last Wednesday", * "this Wednesday", "next Wednesday", "in 5 Wednesdays". - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ WEDNESDAY, /** * Specifies that relative unit is Thursday, e.g. "last Thursday", * "this Thursday", "next Thursday", "in 5 Thursdays". - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ THURSDAY, /** * Specifies that relative unit is Friday, e.g. "last Friday", * "this Friday", "next Friday", "in 5 Fridays". - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ FRIDAY, /** * Specifies that relative unit is Saturday, e.g. "last Saturday", * "this Saturday", "next Saturday", "in 5 Saturdays". - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ SATURDAY, } @@ -544,8 +529,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 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ public String formatNumeric(double offset, RelativeDateTimeUnit unit) { // TODO: @@ -625,8 +609,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 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ public String format(double offset, RelativeDateTimeUnit unit) { // TODO: diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/SimpleFormatter.java b/icu4j/main/classes/core/src/com/ibm/icu/text/SimpleFormatter.java index 00e9d064a5d..3a20db7d047 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/SimpleFormatter.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/SimpleFormatter.java @@ -32,8 +32,7 @@ import com.ibm.icu.impl.SimpleFormatterImpl; * * @see MessageFormat * @see MessagePattern.ApostropheMode - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ public final class SimpleFormatter { // For internal use in Java, use SimpleFormatterImpl directly instead: @@ -57,8 +56,7 @@ public final class SimpleFormatter { * @param pattern The pattern string. * @return The new SimpleFormatter object. * @throws IllegalArgumentException for bad argument syntax. - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ public static SimpleFormatter compile(CharSequence pattern) { return compileMinMaxArguments(pattern, 0, Integer.MAX_VALUE); @@ -74,8 +72,7 @@ public final class SimpleFormatter { * @param max The pattern must have at most this many arguments. * @return The new SimpleFormatter object. * @throws IllegalArgumentException for bad argument syntax and too few or too many arguments. - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ public static SimpleFormatter compileMinMaxArguments(CharSequence pattern, int min, int max) { StringBuilder sb = new StringBuilder(); @@ -85,8 +82,7 @@ public final class SimpleFormatter { /** * @return The max argument number + 1. - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ public int getArgumentLimit() { return SimpleFormatterImpl.getArgumentLimit(compiledPattern); @@ -94,8 +90,7 @@ public final class SimpleFormatter { /** * Formats the given values. - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ public String format(CharSequence... values) { return SimpleFormatterImpl.formatCompiledPattern(compiledPattern, values); @@ -114,8 +109,7 @@ public final class SimpleFormatter { * values.length must be at least getArgumentLimit(). * Can be null if getArgumentLimit()==0. * @return appendTo - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ public StringBuilder formatAndAppend( StringBuilder appendTo, int[] offsets, CharSequence... values) { @@ -136,8 +130,7 @@ public final class SimpleFormatter { * An argument value may be the same object as result. * values.length must be at least getArgumentLimit(). * @return result - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ public StringBuilder formatAndReplace( StringBuilder result, int[] offsets, CharSequence... values) { @@ -147,8 +140,7 @@ public final class SimpleFormatter { /** * Returns a string similar to the original pattern, only for debugging. * - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ @Override public String toString() { @@ -163,8 +155,7 @@ public final class SimpleFormatter { * Returns the pattern text with none of the arguments. * Like formatting with all-empty string values. * - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ public String getTextWithNoArguments() { return SimpleFormatterImpl.getTextWithNoArguments(compiledPattern); 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 7249e67f06b..17513d01bea 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 @@ -466,8 +466,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of concentr: milligram-per-deciliter - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ public static final MeasureUnit MILLIGRAM_PER_DECILITER = MeasureUnit.internalGetInstance("concentr", "milligram-per-deciliter"); @@ -505,8 +504,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of consumption: mile-per-gallon-imperial - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ public static final MeasureUnit MILE_PER_GALLON_IMPERIAL = MeasureUnit.internalGetInstance("consumption", "mile-per-gallon-imperial"); @@ -1127,8 +1125,7 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of volume: gallon-imperial - * @draft ICU 57 - * @provisional This API might change or be removed in a future release. + * @stable ICU 57 */ public static final MeasureUnit GALLON_IMPERIAL = MeasureUnit.internalGetInstance("volume", "gallon-imperial"); From 9f5338a6c013c02e371aae6f1d3876f53c200f33 Mon Sep 17 00:00:00 2001 From: Yoshito Umaoka Date: Wed, 22 Mar 2017 20:49:24 +0000 Subject: [PATCH 2/2] ICU-13052 Updated the API status of Date format fields AM_PM_MIDNIGHT_NOON and FLEXIBLE_DAY_PERIOD. X-SVN-Rev: 39902 --- icu4j/APIChangeReport.html | 12 +++++++++++- .../core/src/com/ibm/icu/text/DateFormat.java | 14 ++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/icu4j/APIChangeReport.html b/icu4j/APIChangeReport.html index f6b724363e0..195dc1f7fdc 100644 --- a/icu4j/APIChangeReport.html +++ b/icu4j/APIChangeReport.html @@ -47,6 +47,11 @@ DecimalFormat

Package com.ibm.icu.text