From 6bfa5c02edd684f3411a4e26d7923189ef433e2f Mon Sep 17 00:00:00 2001 From: Yoshito Umaoka Date: Wed, 3 Mar 2021 17:34:43 -0500 Subject: [PATCH] ICU-21369 Remove @provisional API doc tags in ICU4J --- icu4j/build.xml | 40 +- .../src/com/ibm/icu/text/Collator.java | 1 - .../com/ibm/icu/text/RuleBasedCollator.java | 1 - .../icu/util/GlobalizationPreferences.java | 45 --- .../com/ibm/icu/number/FormattedNumber.java | 2 +- .../com/ibm/icu/number/NumberFormatter.java | 9 +- .../icu/number/NumberFormatterSettings.java | 2 +- .../ibm/icu/number/NumberRangeFormatter.java | 4 +- .../src/com/ibm/icu/text/BreakIterator.java | 2 - .../ibm/icu/text/CurrencyDisplayNames.java | 2 - .../core/src/com/ibm/icu/text/DateFormat.java | 7 - .../com/ibm/icu/text/DateFormatSymbols.java | 2 - .../com/ibm/icu/text/DateIntervalFormat.java | 25 +- .../icu/text/DateTimePatternGenerator.java | 1 - .../src/com/ibm/icu/text/DecimalFormat.java | 2 - .../ibm/icu/text/DecimalFormatSymbols.java | 2 - .../src/com/ibm/icu/text/ListFormatter.java | 28 +- .../src/com/ibm/icu/text/MeasureFormat.java | 1 - .../src/com/ibm/icu/text/NumberFormat.java | 1 - .../src/com/ibm/icu/text/PluralRules.java | 10 - .../icu/text/RelativeDateTimeFormatter.java | 3 +- .../src/com/ibm/icu/text/SpoofChecker.java | 1 - .../src/com/ibm/icu/text/TimeZoneNames.java | 68 ++-- .../core/src/com/ibm/icu/text/UFormat.java | 1 - .../core/src/com/ibm/icu/text/UnicodeSet.java | 6 - .../src/com/ibm/icu/util/BasicTimeZone.java | 8 - .../core/src/com/ibm/icu/util/Calendar.java | 5 - .../src/com/ibm/icu/util/CopticCalendar.java | 69 ++-- .../core/src/com/ibm/icu/util/Currency.java | 2 - .../core/src/com/ibm/icu/util/DateRule.java | 5 - .../src/com/ibm/icu/util/EasterHoliday.java | 16 - .../com/ibm/icu/util/EthiopicCalendar.java | 80 ++-- .../src/com/ibm/icu/util/HebrewHoliday.java | 29 +- .../core/src/com/ibm/icu/util/Holiday.java | 14 - .../icu/util/ICUInputTooLongException.java | 5 - .../com/ibm/icu/util/JapaneseCalendar.java | 2 - .../src/com/ibm/icu/util/LocaleMatcher.java | 9 - .../src/com/ibm/icu/util/MeasureUnit.java | 59 --- .../core/src/com/ibm/icu/util/NoUnit.java | 4 - .../src/com/ibm/icu/util/RangeDateRule.java | 18 +- .../com/ibm/icu/util/RuleBasedTimeZone.java | 1 - .../src/com/ibm/icu/util/SimpleDateRule.java | 17 +- .../src/com/ibm/icu/util/SimpleHoliday.java | 25 +- .../src/com/ibm/icu/util/SimpleTimeZone.java | 1 - .../core/src/com/ibm/icu/util/ULocale.java | 4 - .../core/src/com/ibm/icu/util/VTimeZone.java | 1 - .../icu/dev/test/format/MeasureUnitTest.java | 3 +- .../ibm/icu/dev/tool/docs/SwatDeprecated.java | 347 ------------------ 48 files changed, 144 insertions(+), 846 deletions(-) delete mode 100644 icu4j/tools/build/src/com/ibm/icu/dev/tool/docs/SwatDeprecated.java diff --git a/icu4j/build.xml b/icu4j/build.xml index 46b3d01a73e..54cd8f132dc 100644 --- a/icu4j/build.xml +++ b/icu4j/build.xml @@ -1609,7 +1609,8 @@ - + + @@ -1779,43 +1780,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/icu4j/main/classes/collate/src/com/ibm/icu/text/Collator.java b/icu4j/main/classes/collate/src/com/ibm/icu/text/Collator.java index b6a3288d9af..ec48d625ae9 100644 --- a/icu4j/main/classes/collate/src/com/ibm/icu/text/Collator.java +++ b/icu4j/main/classes/collate/src/com/ibm/icu/text/Collator.java @@ -1509,7 +1509,6 @@ public abstract class Collator implements Comparator, Freezable * * @draft ICU 3.6 (retainAll) - * @provisional This API might change or be removed in a future release. */ //TODO: @@ -90,13 +89,11 @@ public class GlobalizationPreferences implements Freezable inputLocales) { if (isFrozen()) { @@ -180,7 +173,6 @@ public class GlobalizationPreferences implements Freezable getLocales() { List result; @@ -198,7 +190,6 @@ public class GlobalizationPreferences implements Freezable lcls = locales; @@ -219,7 +210,6 @@ public class GlobalizationPreferences implements Freezable= BI_LIMIT) { @@ -529,7 +504,6 @@ public class GlobalizationPreferences implements Freezable= BI_LIMIT) { @@ -552,7 +526,6 @@ public class GlobalizationPreferences implements Freezable= NF_LIMIT) { @@ -735,7 +705,6 @@ public class GlobalizationPreferences implements Freezable processLocales(List inputLocales) { // Note: Some of the callers, and non-ICU call sites, could be simpler/more efficient @@ -939,7 +906,6 @@ public class GlobalizationPreferences implements Freezable * * @draft ICU 3.6 - * @provisional This API might change or be removed in a future release. */ protected List guessLocales() { if (implicitLocales == null) { @@ -1063,7 +1025,6 @@ public class GlobalizationPreferences implements Freezable * * @draft ICU 3.6 - * @provisional This API might change or be removed in a future release. */ protected Collator guessCollator() { ULocale collLocale = getAvailableLocale(TYPE_COLLATOR); @@ -1080,7 +1041,6 @@ public class GlobalizationPreferences implements Freezable * * @draft ICU 3.6 - * @provisional This API might change or be removed in a future release. */ protected TimeZone guessTimeZone() { // TODO fix using real data @@ -1150,7 +1109,6 @@ public class GlobalizationPreferences implements Freezable * * @draft ICU 3.6 - * @provisional This API might change or be removed in a future release. */ protected Calendar guessCalendar() { ULocale calLocale = getAvailableLocale(TYPE_CALENDAR); @@ -1478,7 +1436,6 @@ public class GlobalizationPreferences implements FreezableHere, RELAXED favors Max-Fraction and STRICT favors Max-Significant. Note that this larger * number caused the two modes to favor the opposite result. * - * @provisional This API might change or be removed in a future release. * @draft ICU 69 */ public static enum RoundingPriority { /** * Favor greater precision by relaxing one of the rounding constraints. * - * @provisional This API might change or be removed in a future release. * @draft ICU 69 */ RELAXED, - + /** * Favor adherence to all rounding constraints by producing lower precision. * - * @provisional This API might change or be removed in a future release. * @draft ICU 69 */ STRICT, @@ -216,7 +213,6 @@ public final class NumberFormatter { * Behavior of this option with non-currency units is not defined at this time. * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. * @see NumberFormatter */ FORMAL, @@ -229,7 +225,6 @@ public final class NumberFormatter { * Behavior of this option with non-currency units is not defined at this time. * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. * @see NumberFormatter */ VARIANT, @@ -443,7 +438,6 @@ public final class NumberFormatter { * Same as AUTO, but do not show the sign on negative zero. * * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ NEGATIVE, @@ -451,7 +445,6 @@ public final class NumberFormatter { * Same as ACCOUNTING, but do not show the sign on negative zero. * * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ ACCOUNTING_NEGATIVE, } diff --git a/icu4j/main/classes/core/src/com/ibm/icu/number/NumberFormatterSettings.java b/icu4j/main/classes/core/src/com/ibm/icu/number/NumberFormatterSettings.java index 05392b00c99..40ba691952a 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/number/NumberFormatterSettings.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/number/NumberFormatterSettings.java @@ -543,7 +543,6 @@ public abstract class NumberFormatterSettingsULocales for which localized * DateFormatSymbols instances are available. * @draft ICU 3.8 (retain) - * @provisional This API might change or be removed in a future release. */ public static ULocale[] getAvailableULocales() { return ICUResourceBundle.getAvailableULocales(); @@ -2346,7 +2345,6 @@ public class DateFormatSymbols implements Serializable, Cloneable { * @see com.ibm.icu.util.ULocale#VALID_LOCALE * @see com.ibm.icu.util.ULocale#ACTUAL_LOCALE * @draft ICU 2.8 (retain) - * @provisional This API might change or be removed in a future release. */ public final ULocale getLocale(ULocale.Type type) { return type == ULocale.ACTUAL_LOCALE ? 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 de437a55d16..f4179217e3a 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 @@ -378,7 +378,6 @@ public class DateIntervalFormat extends UFormat { * 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. */ @Override protected Object readResolve() throws InvalidObjectException { @@ -1268,7 +1267,6 @@ public class DateIntervalFormat extends UFormat { * * @param context The DisplayContext value to set. * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public void setContext(DisplayContext context) { @@ -1284,7 +1282,6 @@ public class DateIntervalFormat extends UFormat { * @param type the DisplayContext.Type whose value to return * @return the current DisplayContext setting for the specified type * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public DisplayContext getContext(DisplayContext.Type type) { @@ -1614,7 +1611,7 @@ public class DateIntervalFormat extends UFormat { private String normalizeHourMetacharacters(String skeleton, ULocale locale) { StringBuilder result = new StringBuilder(skeleton); - + char hourMetachar = '\0'; int metacharStart = 0; int metacharCount = 0; @@ -1632,7 +1629,7 @@ public class DateIntervalFormat extends UFormat { } } } - + if (hourMetachar != '\0') { char hourChar = 'H'; char dayPeriodChar = 'a'; @@ -1650,7 +1647,7 @@ public class DateIntervalFormat extends UFormat { } convertedPattern = convertedPattern.substring(0, firstQuotePos) + convertedPattern.substring(secondQuotePos + 1); } - + if (convertedPattern.indexOf('h') != -1) { hourChar = 'h'; } else if (convertedPattern.indexOf('K') != -1) { @@ -1658,13 +1655,13 @@ public class DateIntervalFormat extends UFormat { } else if (convertedPattern.indexOf('k') != -1) { hourChar = 'k'; } - + if (convertedPattern.indexOf('b') != -1) { dayPeriodChar = 'b'; } else if (convertedPattern.indexOf('B') != -1) { dayPeriodChar = 'B'; } - + if (hourChar == 'H' || hourChar == 'k') { result.replace(metacharStart, metacharStart + metacharCount, String.valueOf(hourChar)); } else { @@ -2006,7 +2003,7 @@ public class DateIntervalFormat extends UFormat { pattern.getSecondPart(), differenceInfo, suppressDayPeriodField); pattern = new PatternInfo(part1, part2, pattern.firstDateInPtnIsLaterDate()); - + // share intervalPatterns.put(DateIntervalInfo. CALENDAR_FIELD_TO_PATTERN_LETTER[field], @@ -2214,7 +2211,7 @@ public class DateIntervalFormat extends UFormat { } return adjustedPtn.toString(); } - + /** * Does the same thing as String.replace(), except that it won't perform the * substitution inside quoted literal text. @@ -2231,19 +2228,19 @@ public class DateIntervalFormat extends UFormat { } else { StringBuilder result = new StringBuilder(); String source = targetString; - + while (firstQuoteIndex >= 0) { int secondQuoteIndex = source.indexOf("\'", firstQuoteIndex + 1); if (secondQuoteIndex < 0) { secondQuoteIndex = source.length() - 1; } - + String unquotedText = source.substring(0, firstQuoteIndex); String quotedText = source.substring(firstQuoteIndex, secondQuoteIndex + 1); - + result.append(unquotedText.replace(strToReplace, strToReplaceWith)); result.append(quotedText); - + source = source.substring(secondQuoteIndex + 1); firstQuoteIndex = source.indexOf("\'"); } diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/DateTimePatternGenerator.java b/icu4j/main/classes/core/src/com/ibm/icu/text/DateTimePatternGenerator.java index 26df6544b7a..8a09b68ff6b 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/DateTimePatternGenerator.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/DateTimePatternGenerator.java @@ -1358,7 +1358,6 @@ public class DateTimePatternGenerator implements FreezableULocales for which localized * DecimalFormatSymbols instances are available. * @stable ICU 3.8 (retain) - * @provisional This API might change or be removed in a future release. */ public static ULocale[] getAvailableULocales() { return ICUResourceBundle.getAvailableULocales(); @@ -1956,7 +1955,6 @@ public class DecimalFormatSymbols implements Cloneable, Serializable { * @see com.ibm.icu.util.ULocale#VALID_LOCALE * @see com.ibm.icu.util.ULocale#ACTUAL_LOCALE * @draft ICU 2.8 (retain) - * @provisional This API might change or be removed in a future release. */ public final ULocale getLocale(ULocale.Type type) { return type == ULocale.ACTUAL_LOCALE ? 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 db4ca91deff..9baff8d7241 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 @@ -54,14 +54,12 @@ final public class ListFormatter { * Type of meaning expressed by the list. * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public enum Type { /** * Conjunction formatting, e.g. "Alice, Bob, Charlie, and Delta". * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ AND, @@ -70,7 +68,6 @@ final public class ListFormatter { * "Alice, Bob, Charlie, or Delta". * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ OR, @@ -78,7 +75,6 @@ final public class ListFormatter { * Formatting of a list of values with units, e.g. "5 pounds, 12 ounces". * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ UNITS }; @@ -87,14 +83,12 @@ final public class ListFormatter { * Verbosity level of the list patterns. * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public enum Width { /** * Use list formatting with full words (no abbreviations) when possible. * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ WIDE, @@ -102,7 +96,6 @@ final public class ListFormatter { * Use list formatting of typical length. * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ SHORT, @@ -110,7 +103,6 @@ final public class ListFormatter { * Use list formatting of the shortest possible length. * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ NARROW, }; @@ -119,7 +111,6 @@ final public class ListFormatter { * Class for span fields in FormattedList. * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public static final class SpanField extends UFormat.SpanField { private static final long serialVersionUID = 3563544214705634403L; @@ -131,7 +122,6 @@ final public class ListFormatter { * within the input list that is represented by the span. * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public static final SpanField LIST_SPAN = new SpanField("list-span"); @@ -158,7 +148,6 @@ final public class ListFormatter { /** * Field selectors for format fields defined by ListFormatter. * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public static final class Field extends Format.Field { private static final long serialVersionUID = -8071145668708265437L; @@ -166,14 +155,12 @@ final public class ListFormatter { /** * The literal text in the result which came from the resources. * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public static Field LITERAL = new Field("literal"); /** * The element text in the result which came from the input strings. * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public static Field ELEMENT = new Field("element"); @@ -182,10 +169,9 @@ final public class ListFormatter { } /** - * Serizalization method resolve instances to the constant Field values + * Serialization method resolve instances to the constant Field values * * @draft ICU 64 - * @provisional This API might change or be removed in a future release. */ @Override protected Object readResolve() throws InvalidObjectException { @@ -206,7 +192,6 @@ final public class ListFormatter { * Not intended for public subclassing. * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public static final class FormattedList implements FormattedValue { private final FormattedStringBuilder string; @@ -218,7 +203,6 @@ final public class ListFormatter { /** * {@inheritDoc} * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ @Override public String toString() { @@ -228,7 +212,6 @@ final public class ListFormatter { /** * {@inheritDoc} * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ @Override public int length() { @@ -238,7 +221,6 @@ final public class ListFormatter { /** * {@inheritDoc} * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ @Override public char charAt(int index) { @@ -248,7 +230,6 @@ final public class ListFormatter { /** * {@inheritDoc} * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ @Override public CharSequence subSequence(int start, int end) { @@ -258,7 +239,6 @@ final public class ListFormatter { /** * {@inheritDoc} * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ @Override public A appendTo(A appendable) { @@ -268,7 +248,6 @@ final public class ListFormatter { /** * {@inheritDoc} * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ @Override public boolean nextPosition(ConstrainedFieldPosition cfpos) { @@ -278,7 +257,6 @@ final public class ListFormatter { /** * {@inheritDoc} * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ @Override public AttributedCharacterIterator toCharacterIterator() { @@ -333,7 +311,6 @@ final public class ListFormatter { * the locale in question. * @return ListFormatter * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public static ListFormatter getInstance(ULocale locale, Type type, Width width) { String styleName = typeWidthToStyleString(type, width); @@ -350,7 +327,6 @@ final public class ListFormatter { * the locale in question. * @return ListFormatter * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public static ListFormatter getInstance(Locale locale, Type type, Width width) { return getInstance(ULocale.forLocale(locale), type, width); @@ -422,7 +398,6 @@ final public class ListFormatter { * items to format. The toString() method is called on each. * @return items formatted into a FormattedList * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public FormattedList formatToValue(Object... items) { return formatToValue(Arrays.asList(items)); @@ -437,7 +412,6 @@ final public class ListFormatter { * items to format. The toString() method is called on each. * @return items formatted into a FormattedList * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public FormattedList formatToValue(Collection items) { return formatImpl(items, true).toValue(); 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 b9f072a3a18..91c27c1f944 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 @@ -344,7 +344,6 @@ public class MeasureFormat extends UFormat { * @throws UnsupportedOperationException * Not supported. * @draft ICU 53 (Retain) - * @provisional This API might change or be removed in a future release. */ @Override public Measure parseObject(String source, ParsePosition pos) { 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 50e759859c0..f23552c0a3a 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 @@ -1078,7 +1078,6 @@ public abstract class NumberFormat extends UFormat { * {@icu} Returns the list of Locales for which NumberFormats are available. * @return the available locales * @draft ICU 3.2 (retain) - * @provisional This API might change or be removed in a future release. */ public static ULocale[] getAvailableULocales() { if (shim == null) { 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 ac082e359a2..b302b4e6fe5 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 @@ -2168,7 +2168,6 @@ public class PluralRules implements Serializable { * @return The keyword of the selected rule. * @throws UnsupportedOperationException If called on an instance without plural ranges data. * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public String select(FormattedNumberRange range) { if (standardPluralRanges == null) { @@ -2382,7 +2381,6 @@ public class PluralRules implements Serializable { * Returns the set of locales for which PluralRules are known. * @return the set of locales for which PluralRules are known, as a list * @draft ICU 4.2 (retain) - * @provisional This API might change or be removed in a future release. */ public static ULocale[] getAvailableULocales() { return Factory.getDefaultFactory().getAvailableULocales(); @@ -2403,7 +2401,6 @@ public class PluralRules implements Serializable { * index 0 if locale is directly defined (without fallback) as having plural rules * @return the functionally-equivalent locale * @draft ICU 4.2 (retain) - * @provisional This API might change or be removed in a future release. */ public static ULocale getFunctionalEquivalent(ULocale locale, boolean[] isAvailable) { return Factory.getDefaultFactory().getFunctionalEquivalent(locale, isAvailable); @@ -2442,42 +2439,36 @@ public class PluralRules implements Serializable { * Status of the keyword for the rules, given a set of explicit values. * * @draft ICU 50 - * @provisional This API might change or be removed in a future release. */ public enum KeywordStatus { /** * The keyword is not valid for the rules. * * @draft ICU 50 - * @provisional This API might change or be removed in a future release. */ INVALID, /** * The keyword is valid, but unused (it is covered by the explicit values, OR has no values for the given {@link SampleType}). * * @draft ICU 50 - * @provisional This API might change or be removed in a future release. */ SUPPRESSED, /** * The keyword is valid, used, and has a single possible value (before considering explicit values). * * @draft ICU 50 - * @provisional This API might change or be removed in a future release. */ UNIQUE, /** * The keyword is valid, used, not unique, and has a finite set of values. * * @draft ICU 50 - * @provisional This API might change or be removed in a future release. */ BOUNDED, /** * The keyword is valid but not bounded; there indefinitely many matching values. * * @draft ICU 50 - * @provisional This API might change or be removed in a future release. */ UNBOUNDED } @@ -2496,7 +2487,6 @@ public class PluralRules implements Serializable { * If non null, set to the unique value. * @return the KeywordStatus * @draft ICU 50 - * @provisional This API might change or be removed in a future release. */ public KeywordStatus getKeywordStatus(String keyword, int offset, Set explicits, Output uniqueValue) { 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 14b2fbd2149..2a8b831989e 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 @@ -438,7 +438,6 @@ public final class RelativeDateTimeFormatter { * Serizalization method resolve instances to the constant Field values * * @draft ICU 64 - * @provisional This API might change or be removed in a future release. */ @Override protected Object readResolve() throws InvalidObjectException { @@ -1259,7 +1258,7 @@ public final class RelativeDateTimeFormatter { break; case 7: if ("quarter".contentEquals(keyword)) { - return QUARTER; // TODO: Check @provisional + return QUARTER; // RelativeUnit.QUARTERS is deprecated } break; default: diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/SpoofChecker.java b/icu4j/main/classes/core/src/com/ibm/icu/text/SpoofChecker.java index dfa492b14b6..d6852e7e096 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/SpoofChecker.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/SpoofChecker.java @@ -790,7 +790,6 @@ public class SpoofChecker { * @param restrictionLevel * The loosest restriction level allowed. * @return self - * @provisional This API might change or be removed in a future release. * @stable ICU 58 */ public Builder setRestrictionLevel(RestrictionLevel restrictionLevel) { diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/TimeZoneNames.java b/icu4j/main/classes/core/src/com/ibm/icu/text/TimeZoneNames.java index 8a173d740a0..b25dda9c845 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/TimeZoneNames.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/TimeZoneNames.java @@ -41,7 +41,7 @@ import com.ibm.icu.util.ULocale; * Sometimes, a time zone is mapped to a different time zone in the past. For example, "America/Indiana/Knox" * had been moving "Eastern Time" and "Central Time" back and forth. Therefore, it is necessary that time zone * to meta zones mapping data are stored by date range. - * + * *

Note: *

* {@link TimeZoneFormat} assumes an instance of TimeZoneNames is immutable. If you want to provide @@ -52,7 +52,7 @@ import com.ibm.icu.util.ULocale; * result returned by a method with time zone ID "America/Indiana/Indianapolis", because it's not a canonical time zone * ID (the canonical time zone ID for the time zone is "America/Indianapolis". See * {@link TimeZone#getCanonicalID(String)} about ICU canonical time zone IDs. - * + * *

* In CLDR, most of time zone display names except location names are provided through meta zones. But a time zone may * have a specific name that is not shared with other time zones. @@ -60,13 +60,13 @@ import com.ibm.icu.util.ULocale; * For example, time zone "Europe/London" has English long name for standard time "Greenwich Mean Time", which is also * shared with other time zones. However, the long name for daylight saving time is "British Summer Time", which is only * used for "Europe/London". - * + * *

* {@link #getTimeZoneDisplayName(String, NameType)} is designed for accessing a name only used by a single time zone. * But is not necessarily mean that a subclass implementation use the same model with CLDR. A subclass implementation * may provide time zone names only through {@link #getTimeZoneDisplayName(String, NameType)}, or only through * {@link #getMetaZoneDisplayName(String, NameType)}, or both. - * + * *

* The default TimeZoneNames implementation returned by {@link #getInstance(ULocale)} uses the locale data * imported from CLDR. In CLDR, set of meta zone IDs and mappings between zone IDs and meta zone IDs are shared by all @@ -82,7 +82,7 @@ public abstract class TimeZoneNames implements Serializable { /** * Time zone display name types - * + * * @stable ICU 49 */ public enum NameType { @@ -164,7 +164,7 @@ public abstract class TimeZoneNames implements Serializable { /** * Returns an instance of TimeZoneNames for the specified locale. - * + * * @param locale * The locale. * @return An instance of TimeZoneNames @@ -178,7 +178,7 @@ public abstract class TimeZoneNames implements Serializable { /** * Returns an instance of TimeZoneNames for the specified * {@link java.util.Locale}. - * + * * @param locale * The {@link java.util.Locale}. * @return An instance of TimeZoneDisplayNames @@ -196,7 +196,7 @@ public abstract class TimeZoneNames implements Serializable { * Note: The input locale is used for resolving ambiguous names (e.g. "IST" is parsed * as Israel Standard Time for Israel, while it is parsed as India Standard Time for * all other regions). The zone names returned by this instance are not localized. - * + * * @stable ICU 54 */ public static TimeZoneNames getTZDBInstance(ULocale locale) { @@ -212,7 +212,7 @@ public abstract class TimeZoneNames implements Serializable { /** * Returns an immutable set of all available meta zone IDs used by the given time zone. - * + * * @param tzID * The canonical time zone ID. * @return An immutable set of all available meta zone IDs used by the given time zone. @@ -222,7 +222,7 @@ public abstract class TimeZoneNames implements Serializable { /** * Returns the meta zone ID for the given canonical time zone ID at the given date. - * + * * @param tzID * The canonical time zone ID. * @param date @@ -236,12 +236,12 @@ public abstract class TimeZoneNames implements Serializable { /** * Returns the reference zone ID for the given meta zone ID for the region. - * + * * Note: Each meta zone must have a reference zone associated with a special region "001" (world). * Some meta zones may have region specific reference zone IDs other than the special region * "001". When a meta zone does not have any region specific reference zone IDs, this method * return the reference zone ID for the special region "001" (world). - * + * * @param mzID * The meta zone ID. * @param region @@ -254,7 +254,7 @@ public abstract class TimeZoneNames implements Serializable { /** * Returns the display name of the meta zone. - * + * * @param mzID * The meta zone ID. * @param type @@ -268,12 +268,12 @@ public abstract class TimeZoneNames implements Serializable { /** * Returns the display name of the time zone at the given date. - * + * *

* Note: This method calls the subclass's {@link #getTimeZoneDisplayName(String, NameType)} first. When the * result is null, this method calls {@link #getMetaZoneID(String, long)} to get the meta zone ID mapped from the * time zone, then calls {@link #getMetaZoneDisplayName(String, NameType)}. - * + * * @param tzID * The canonical time zone ID. * @param type @@ -296,7 +296,7 @@ public abstract class TimeZoneNames implements Serializable { /** * Returns the display name of the time zone. Unlike {@link #getDisplayName(String, NameType, long)}, * this method does not get a name from a meta zone used by the time zone. - * + * * @param tzID * The canonical time zone ID. * @param type @@ -319,7 +319,7 @@ public abstract class TimeZoneNames implements Serializable { * * For example, "New York" is returned for the time zone ID "America/New_York" when this object does not have the * localized location name. - * + * * @param tzID * The canonical time zone ID * @return The exemplar location name for the given time zone, or null when a localized location name is not @@ -333,7 +333,7 @@ public abstract class TimeZoneNames implements Serializable { /** * Finds time zone name prefix matches for the input text at the * given offset and returns a collection of the matches. - * + * * @param text the text. * @param start the starting offset within the text. * @param types the set of name types, or null for all name types. @@ -341,7 +341,6 @@ public abstract class TimeZoneNames implements Serializable { * @see NameType * @see MatchInfo * @draft ICU 49 (Retain) - * @provisional This API might change or be removed in a future release. */ public Collection find(CharSequence text, int start, EnumSet types) { throw new UnsupportedOperationException("The method is not implemented in TimeZoneNames base class."); @@ -351,7 +350,6 @@ public abstract class TimeZoneNames implements Serializable { * A MatchInfo represents a time zone name match used by * {@link TimeZoneNames#find(CharSequence, int, EnumSet)}. * @draft ICU 49 (Retain) - * @provisional This API might change or be removed in a future release. */ public static class MatchInfo { private NameType _nameType; @@ -361,7 +359,7 @@ public abstract class TimeZoneNames implements Serializable { /** * Constructing a MatchInfo. - * + * * @param nameType the name type enum. * @param tzID the time zone ID, or null * @param mzID the meta zone ID, or null @@ -371,7 +369,6 @@ public abstract class TimeZoneNames implements Serializable { * or 3) matchLength is 0 or smaller. * @see NameType * @draft ICU 49 (Retain) - * @provisional This API might change or be removed in a future release. */ public MatchInfo(NameType nameType, String tzID, String mzID, int matchLength) { if (nameType == null) { @@ -391,14 +388,13 @@ public abstract class TimeZoneNames implements Serializable { /** * Returns the time zone ID, or null if not available. - * + * *

Note: A MatchInfo must have either a time zone ID * or a meta zone ID. - * + * * @return the time zone ID, or null. * @see #mzID() * @draft ICU 49 (Retain) - * @provisional This API might change or be removed in a future release. */ public String tzID() { return _tzID; @@ -406,14 +402,13 @@ public abstract class TimeZoneNames implements Serializable { /** * Returns the meta zone ID, or null if not available. - * + * *

Note: A MatchInfo must have either a time zone ID * or a meta zone ID. - * + * * @return the meta zone ID, or null. * @see #tzID() * @draft ICU 49 (Retain) - * @provisional This API might change or be removed in a future release. */ public String mzID() { return _mzID; @@ -424,7 +419,6 @@ public abstract class TimeZoneNames implements Serializable { * @return the time zone name type enum. * @see NameType * @draft ICU 49 (Retain) - * @provisional This API might change or be removed in a future release. */ public NameType nameType() { return _nameType; @@ -434,7 +428,6 @@ public abstract class TimeZoneNames implements Serializable { * Returns the match length. * @return the match length. * @draft ICU 49 (Retain) - * @provisional This API might change or be removed in a future release. */ public int matchLength() { return _matchLength; @@ -474,16 +467,15 @@ public abstract class TimeZoneNames implements Serializable { /** * Sole constructor for invocation by subclass constructors. - * + * * @draft ICU 49 (Retain) - * @provisional This API might change or be removed in a future release. */ protected TimeZoneNames() { } /** * The super class of TimeZoneNames service factory classes. - * + * * @internal * @deprecated This API is ICU internal only. */ @@ -491,7 +483,7 @@ public abstract class TimeZoneNames implements Serializable { public static abstract class Factory { /** * The factory method of TimeZoneNames. - * + * * @param locale * The display locale * @return An instance of TimeZoneNames. @@ -518,7 +510,7 @@ public abstract class TimeZoneNames implements Serializable { /* * (non-Javadoc) - * + * * @see com.ibm.icu.impl.CacheBase#createInstance(java.lang.Object, java.lang.Object) */ @Override @@ -557,7 +549,7 @@ public abstract class TimeZoneNames implements Serializable { /* * (non-Javadoc) - * + * * @see com.ibm.icu.text.TimeZoneNames#getMetaZoneID (java.lang.String, long) */ @Override @@ -567,7 +559,7 @@ public abstract class TimeZoneNames implements Serializable { /* * (non-Javadoc) - * + * * @see com.ibm.icu.text.TimeZoneNames#getReferenceZoneID(java.lang.String, java.lang.String) */ @Override @@ -609,7 +601,7 @@ public abstract class TimeZoneNames implements Serializable { /* * (non-Javadoc) - * + * * @see com.ibm.icu.text.TimeZoneNames.Factory#getTimeZoneNames (com.ibm.icu.util.ULocale) */ @Override 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 e6a18242fc3..a27c93ae040 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 @@ -76,7 +76,6 @@ public abstract class UFormat extends Format { * @see com.ibm.icu.util.ULocale#VALID_LOCALE * @see com.ibm.icu.util.ULocale#ACTUAL_LOCALE * @draft ICU 2.8 (retain) - * @provisional This API might change or be removed in a future release. */ public final ULocale getLocale(ULocale.Type type) { return type == ULocale.ACTUAL_LOCALE ? diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/UnicodeSet.java b/icu4j/main/classes/core/src/com/ibm/icu/text/UnicodeSet.java index f62e68252e4..bfa7e727ba2 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/text/UnicodeSet.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/text/UnicodeSet.java @@ -3974,20 +3974,17 @@ public class UnicodeSet extends UnicodeFilter implements Iterable, Compa * Internal class for customizing UnicodeSet parsing of properties. * TODO: extend to allow customizing of codepoint ranges * @draft ICU3.8 (retain) - * @provisional This API might change or be removed in a future release. * @author medavis */ abstract public static class XSymbolTable implements SymbolTable { /** * Default constructor * @draft ICU3.8 (retain) - * @provisional This API might change or be removed in a future release. */ public XSymbolTable(){} /** * Supplies default implementation for SymbolTable (no action). * @draft ICU3.8 (retain) - * @provisional This API might change or be removed in a future release. */ @Override public UnicodeMatcher lookupMatcher(int i) { @@ -4011,7 +4008,6 @@ public class UnicodeSet extends UnicodeFilter implements Iterable, Compa * with that property have been added to the UnicodeSet, and returns false if the * propertyName+propertyValue combination is not recognized (in which case result is unaltered). * @draft ICU3.8 (retain) - * @provisional This API might change or be removed in a future release. */ public boolean applyPropertyAlias(String propertyName, String propertyValue, UnicodeSet result) { return false; @@ -4019,7 +4015,6 @@ public class UnicodeSet extends UnicodeFilter implements Iterable, Compa /** * Supplies default implementation for SymbolTable (no action). * @draft ICU3.8 (retain) - * @provisional This API might change or be removed in a future release. */ @Override public char[] lookup(String s) { @@ -4028,7 +4023,6 @@ public class UnicodeSet extends UnicodeFilter implements Iterable, Compa /** * Supplies default implementation for SymbolTable (no action). * @draft ICU3.8 (retain) - * @provisional This API might change or be removed in a future release. */ @Override public String parseReference(String text, ParsePosition pos, int limit) { diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/BasicTimeZone.java b/icu4j/main/classes/core/src/com/ibm/icu/util/BasicTimeZone.java index 5d56a39cc06..bf15962231f 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/BasicTimeZone.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/BasicTimeZone.java @@ -541,21 +541,18 @@ public abstract class BasicTimeZone extends TimeZone { * around a time zone transition. * * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ public static enum LocalOption { /** * An input time is always interpreted as local time before * a time zone transition. * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ FORMER(0x04), /** * An input time is always interpreted as local time after * a time zone transition. * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ LATTER(0x0C), /** @@ -565,7 +562,6 @@ public abstract class BasicTimeZone extends TimeZone { * or daylight saving time, the local time before the * transition is used. * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ STANDARD_FORMER(0x05), /** @@ -575,7 +571,6 @@ public abstract class BasicTimeZone extends TimeZone { * or daylight saving time, the local time after the * transition is used. * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ STANDARD_LATTER(0x0D), /** @@ -585,7 +580,6 @@ public abstract class BasicTimeZone extends TimeZone { * or daylight saving time, the local time before the * transition is used. * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ DAYLIGHT_FORMER(0x07), /** @@ -595,7 +589,6 @@ public abstract class BasicTimeZone extends TimeZone { * or daylight saving time, the local time after the * transition is used. * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ DAYLIGHT_LATTER(0x0F); @@ -670,7 +663,6 @@ public abstract class BasicTimeZone extends TimeZone { /** * {@icu} Returns time zone offsets from local wall time. * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ public void getOffsetFromLocal(long date, LocalOption nonExistingTimeOpt, LocalOption duplicatedTimeOpt, int[] offsets) { diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/Calendar.java b/icu4j/main/classes/core/src/com/ibm/icu/util/Calendar.java index edfc8a7cb4e..6a38a576299 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/Calendar.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/Calendar.java @@ -1882,7 +1882,6 @@ public abstract class Calendar implements Serializable, Cloneable, ComparableDateFormat appropriate to this calendar * @draft ICU 3.2 (retain) - * @provisional This API might change or be removed in a future release. */ protected DateFormat handleGetDateFormat(String pattern, String override, ULocale locale) { FormatConfiguration fmtConfig = new FormatConfiguration(); @@ -5934,7 +5932,6 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable - * CopticCalendar usually should be instantiated using + * CopticCalendar usually should be instantiated using * {@link com.ibm.icu.util.Calendar#getInstance(ULocale)} passing in a ULocale * with the tag "@calendar=coptic".

* * @see com.ibm.icu.util.Calendar * @stable ICU 3.4 */ -public final class CopticCalendar extends CECalendar +public final class CopticCalendar extends CECalendar { // jdk1.4.2 serialver private static final long serialVersionUID = 5903818751846742911L; - /** + /** * Constant for ωογτ / تﻮﺗ, - * the 1st month of the Coptic year. + * the 1st month of the Coptic year. * @stable ICU 3.4 */ public static final int TOUT = 0; - /** + /** * Constant for Παοπι / ﻪﺑﺎﺑ, - * the 2nd month of the Coptic year. + * the 2nd month of the Coptic year. * @stable ICU 3.4 */ public static final int BABA = 1; - /** + /** * Constant for Αθορ / رﻮﺗﺎﻫ, - * the 3rd month of the Coptic year. + * the 3rd month of the Coptic year. * @stable ICU 3.4 */ public static final int HATOR = 2; - /** + /** * Constant for Χοιακ / ﻚﻬﻴﻛ;, - * the 4th month of the Coptic year. + * the 4th month of the Coptic year. * @stable ICU 3.4 */ public static final int KIAHK = 3; - /** + /** * Constant for Τωβι / طﻮﺒﻫ, - * the 5th month of the Coptic year. + * the 5th month of the Coptic year. * @stable ICU 3.4 */ public static final int TOBA = 4; - /** + /** * Constant for Μεϣιρ / ﺮﻴﺸﻣأ, - * the 6th month of the Coptic year. + * the 6th month of the Coptic year. * @stable ICU 3.4 */ public static final int AMSHIR = 5; - /** + /** * Constant for Παρεμϩατ / تﺎﻬﻣﺮﺑ, - * the 7th month of the Coptic year. + * the 7th month of the Coptic year. * @stable ICU 3.4 */ public static final int BARAMHAT = 6; - /** - * Constant for Φαρμοθι / هدﻮﻣﺮﺑ, - * the 8th month of the Coptic year. + /** + * Constant for Φαρμοθι / هدﻮﻣﺮﺑ, + * the 8th month of the Coptic year. * @stable ICU 3.4 */ public static final int BARAMOUDA = 7; - /** + /** * Constant for Παϣαν / ﺲﻨﺸﺑ;, - * the 9th month of the Coptic year. + * the 9th month of the Coptic year. * @stable ICU 3.4 */ public static final int BASHANS = 8; - /** + /** * Constant for Παωνι / ﻪﻧؤﻮﺑ, - * the 10th month of the Coptic year. + * the 10th month of the Coptic year. * @stable ICU 3.4 */ public static final int PAONA = 9; - /** + /** * Constant for Επηπ / ﺐﻴﺑأ, - * the 11th month of the Coptic year. + * the 11th month of the Coptic year. * @stable ICU 3.4 */ public static final int EPEP = 10; - /** + /** * Constant for Μεϲωρη / ىﺮﺴﻣ, - * the 12th month of the Coptic year. + * the 12th month of the Coptic year. * @stable ICU 3.4 */ public static final int MESRA = 11; - /** + /** * Constant for Πικογϫι μαβοτ / ﺮﻴﻐﺼﻟاﺮﻬﺸﻟا, - * the 13th month of the Coptic year. + * the 13th month of the Coptic year. * @stable ICU 3.4 */ public static final int NASIE = 12; - + private static final int JD_EPOCH_OFFSET = 1824665; // Eras @@ -177,7 +177,7 @@ public final class CopticCalendar extends CECalendar public CopticCalendar(TimeZone zone, Locale aLocale) { super(zone, aLocale); } - + /** * Constructs a CopticCalendar based on the current time * in the given time zone with the given locale. @@ -189,7 +189,7 @@ public final class CopticCalendar extends CECalendar public CopticCalendar(TimeZone zone, ULocale locale) { super(zone, locale); } - + /** * Constructs a CopticCalendar with the given date set * in the default time zone with the default locale. @@ -237,6 +237,7 @@ public final class CopticCalendar extends CECalendar * {@inheritDoc} * @stable ICU 3.8 */ + @Override public String getType() { return "coptic"; } @@ -246,6 +247,7 @@ public final class CopticCalendar extends CECalendar * @internal * @deprecated This API is ICU internal only. */ + @Override @Deprecated protected int handleGetExtendedYear() { int eyear; @@ -268,6 +270,7 @@ public final class CopticCalendar extends CECalendar * @internal * @deprecated This API is ICU internal only. */ + @Override @Deprecated protected void handleComputeFields(int julianDay) { int era, year; @@ -299,6 +302,7 @@ public final class CopticCalendar extends CECalendar * @internal * @deprecated This API is ICU internal only. */ + @Override @Deprecated protected int getJDEpochOffset() { return JD_EPOCH_OFFSET; @@ -311,7 +315,6 @@ public final class CopticCalendar extends CECalendar * @param month the month * @param date the day * @draft ICU 3.4 (retain) - * @provisional This API might change or be removed in a future release. */ // The equivalent operation can be done by public Calendar API. // This API was accidentally marked as @draft, but we have no good diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/Currency.java b/icu4j/main/classes/core/src/com/ibm/icu/util/Currency.java index 592dc0a7c4d..2c40e557620 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/Currency.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/Currency.java @@ -107,7 +107,6 @@ public class Currency extends MeasureUnit { * for example, "NT$" instead of "$" for TWD in zh-TW. * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public static final int FORMAL_SYMBOL_NAME = 4; @@ -118,7 +117,6 @@ public class Currency extends MeasureUnit { * necessarily as widely used as the regular symbol. * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public static final int VARIANT_SYMBOL_NAME = 5; diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/DateRule.java b/icu4j/main/classes/core/src/com/ibm/icu/util/DateRule.java index b424cf608d4..e4c431f43f4 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/DateRule.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/DateRule.java @@ -22,7 +22,6 @@ import java.util.Date; * * @see SimpleDateRule * @draft ICU 2.8 (retainAll) - * @provisional This API might change or be removed in a future release. */ public interface DateRule { @@ -37,7 +36,6 @@ public interface DateRule * * @see #firstBetween * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ abstract public Date firstAfter(Date start); @@ -54,7 +52,6 @@ public interface DateRule * * @see #firstAfter * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ abstract public Date firstBetween(Date start, Date end); @@ -68,7 +65,6 @@ public interface DateRule * @param date The date to check. * @return true if this event occurs on the given date. * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ abstract public boolean isOn(Date date); @@ -76,7 +72,6 @@ public interface DateRule * Check whether this event occurs at least once between the two * dates given. * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ abstract public boolean isBetween(Date start, Date end); } diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/EasterHoliday.java b/icu4j/main/classes/core/src/com/ibm/icu/util/EasterHoliday.java index ef9d6ed588c..0814a0b1fc4 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/EasterHoliday.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/EasterHoliday.java @@ -19,7 +19,6 @@ import java.util.Date; * a fixed number of days before or after Easter. Supports both the * Western and Orthodox methods for calculating Easter. * @draft ICU 2.8 (retainAll) - * @provisional This API might change or be removed in a future release. */ public class EasterHoliday extends Holiday { @@ -28,7 +27,6 @@ public class EasterHoliday extends Holiday * * @param name The name of the holiday * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public EasterHoliday(String name) { @@ -42,7 +40,6 @@ public class EasterHoliday extends Holiday * @param daysAfter The number of days before (-) or after (+) Easter * @param name The name of the holiday * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public EasterHoliday(int daysAfter, String name) { @@ -58,7 +55,6 @@ public class EasterHoliday extends Holiday * @param orthodox Use the Orthodox calendar? * @param name The name of the holiday * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public EasterHoliday(int daysAfter, boolean orthodox, String name) { @@ -68,84 +64,72 @@ public class EasterHoliday extends Holiday /** * Shrove Tuesday, aka Mardi Gras, 48 days before Easter * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ static public final EasterHoliday SHROVE_TUESDAY = new EasterHoliday(-48, "Shrove Tuesday"); /** * Ash Wednesday, start of Lent, 47 days before Easter * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ static public final EasterHoliday ASH_WEDNESDAY = new EasterHoliday(-47, "Ash Wednesday"); /** * Palm Sunday, 7 days before Easter * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ static public final EasterHoliday PALM_SUNDAY = new EasterHoliday( -7, "Palm Sunday"); /** * Maundy Thursday, 3 days before Easter * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ static public final EasterHoliday MAUNDY_THURSDAY = new EasterHoliday( -3, "Maundy Thursday"); /** * Good Friday, 2 days before Easter * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ static public final EasterHoliday GOOD_FRIDAY = new EasterHoliday( -2, "Good Friday"); /** * Easter Sunday * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ static public final EasterHoliday EASTER_SUNDAY = new EasterHoliday( 0, "Easter Sunday"); /** * Easter Monday, 1 day after Easter * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ static public final EasterHoliday EASTER_MONDAY = new EasterHoliday( 1, "Easter Monday"); /** * Ascension, 39 days after Easter * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ static public final EasterHoliday ASCENSION = new EasterHoliday( 39, "Ascension"); /** * Pentecost (aka Whit Sunday), 49 days after Easter * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ static public final EasterHoliday PENTECOST = new EasterHoliday( 49, "Pentecost"); /** * Whit Sunday (aka Pentecost), 49 days after Easter * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ static public final EasterHoliday WHIT_SUNDAY = new EasterHoliday( 49, "Whit Sunday"); /** * Whit Monday, 50 days after Easter * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ static public final EasterHoliday WHIT_MONDAY = new EasterHoliday( 50, "Whit Monday"); /** * Corpus Christi, 60 days after Easter * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ static public final EasterHoliday CORPUS_CHRISTI = new EasterHoliday( 60, "Corpus Christi"); } diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/EthiopicCalendar.java b/icu4j/main/classes/core/src/com/ibm/icu/util/EthiopicCalendar.java index 2a895f42d11..356365b5fe6 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/EthiopicCalendar.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/EthiopicCalendar.java @@ -18,119 +18,119 @@ import com.ibm.icu.util.ULocale.Category; /** * Implement the Ethiopic calendar system. *

- * EthiopicCalendar usually should be instantiated using + * EthiopicCalendar usually should be instantiated using * {@link com.ibm.icu.util.Calendar#getInstance(ULocale)} passing in a ULocale * with the tag "@calendar=ethiopic".

* * @see com.ibm.icu.util.Calendar * @stable ICU 3.4 */ -public final class EthiopicCalendar extends CECalendar +public final class EthiopicCalendar extends CECalendar { //jdk1.4.2 serialver private static final long serialVersionUID = -2438495771339315608L; - /** + /** * Constant for መስከረም, the 1st month of the Ethiopic year. * @stable ICU 3.4 */ public static final int MESKEREM = 0; - /** - * Constant for ጥቅምት, the 2nd month of the Ethiopic year. + /** + * Constant for ጥቅምት, the 2nd month of the Ethiopic year. * @stable ICU 3.4 */ public static final int TEKEMT = 1; - /** - * Constant for ኅዳር, the 3rd month of the Ethiopic year. + /** + * Constant for ኅዳር, the 3rd month of the Ethiopic year. * @stable ICU 3.4 */ public static final int HEDAR = 2; - /** - * Constant for ታኅሣሥ, the 4th month of the Ethiopic year. + /** + * Constant for ታኅሣሥ, the 4th month of the Ethiopic year. * @stable ICU 3.4 */ public static final int TAHSAS = 3; - /** - * Constant for ጥር, the 5th month of the Ethiopic year. + /** + * Constant for ጥር, the 5th month of the Ethiopic year. * @stable ICU 3.4 */ public static final int TER = 4; - /** - * Constant for የካቲት, the 6th month of the Ethiopic year. + /** + * Constant for የካቲት, the 6th month of the Ethiopic year. * @stable ICU 3.4 */ public static final int YEKATIT = 5; - /** - * Constant for መጋቢት, the 7th month of the Ethiopic year. + /** + * Constant for መጋቢት, the 7th month of the Ethiopic year. * @stable ICU 3.4 */ public static final int MEGABIT = 6; - /** - * Constant for ሚያዝያ, the 8th month of the Ethiopic year. + /** + * Constant for ሚያዝያ, the 8th month of the Ethiopic year. * @stable ICU 3.4 */ public static final int MIAZIA = 7; - /** - * Constant for ግንቦት, the 9th month of the Ethiopic year. + /** + * Constant for ግንቦት, the 9th month of the Ethiopic year. * @stable ICU 3.4 */ public static final int GENBOT = 8; - /** - * Constant for ሰኔ, the 10th month of the Ethiopic year. + /** + * Constant for ሰኔ, the 10th month of the Ethiopic year. * @stable ICU 3.4 */ public static final int SENE = 9; - /** - * Constant for ሐምሌ, the 11th month of the Ethiopic year. + /** + * Constant for ሐምሌ, the 11th month of the Ethiopic year. * @stable ICU 3.4 */ public static final int HAMLE = 10; - /** - * Constant for ነሐሴ, the 12th month of the Ethiopic year. + /** + * Constant for ነሐሴ, the 12th month of the Ethiopic year. * @stable ICU 3.4 */ public static final int NEHASSE = 11; - /** - * Constant for ጳጉሜን, the 13th month of the Ethiopic year. + /** + * Constant for ጳጉሜን, the 13th month of the Ethiopic year. * @stable ICU 3.4 */ public static final int PAGUMEN = 12; - + // Up until the end of the 19th century the prevailant convention was to - // reference the Ethiopic Calendar from the creation of the world, + // reference the Ethiopic Calendar from the creation of the world, // \u12d3\u1218\u1270\u1361\u12d3\u1208\u121d // (Amete Alem 5500 BC). As Ethiopia modernized the reference epoch from - // the birth of Christ (\u12d3\u1218\u1270\u1361\u121d\u1215\u1228\u1275) + // the birth of Christ (\u12d3\u1218\u1270\u1361\u121d\u1215\u1228\u1275) // began to displace the creation of the // world reference point. However, years before the birth of Christ are - // still referenced in the creation of the world system. + // still referenced in the creation of the world system. // Thus -100 \u12d3/\u121d // would be rendered as 5400 \u12d3/\u12d3. // - // The creation of the world in Ethiopic cannon was + // The creation of the world in Ethiopic cannon was // Meskerem 1, -5500 \u12d3/\u121d 00:00:00 // applying the birth of Christ reference and Ethiopian time conventions. This is // 6 hours less than the Julian epoch reference point (noon). In Gregorian // the date and time was July 18th -5493 BC 06:00 AM. - // Julian Days relative to the + // Julian Days relative to the // \u12d3\u1218\u1270\u1361\u121d\u1215\u1228\u1275 epoch // Note: we no longer use this constant //private static final int JD_EPOCH_OFFSET_AMETE_ALEM = -285019; - // Julian Days relative to the + // Julian Days relative to the // \u12d3\u1218\u1270\u1361\u12d3\u1208\u121d epoch private static final int JD_EPOCH_OFFSET_AMETE_MIHRET = 1723856; @@ -202,7 +202,7 @@ public final class EthiopicCalendar extends CECalendar public EthiopicCalendar(TimeZone zone, Locale aLocale) { this(zone, ULocale.forLocale(aLocale)); } - + /** * Constructs a EthiopicCalendar based on the current time * in the given time zone with the given locale. @@ -264,6 +264,7 @@ public final class EthiopicCalendar extends CECalendar * {@inheritDoc} * @stable ICU 3.8 */ + @Override public String getType() { if (isAmeteAlemEra()) { return "ethiopic-amete-alem"; @@ -280,7 +281,7 @@ public final class EthiopicCalendar extends CECalendar public void setAmeteAlemEra(boolean onOff) { eraType = onOff ? AMETE_ALEM_ERA : AMETE_MIHRET_ERA; } - + /** * Return true if this calendar is set to the Amete Alem era. * @@ -296,6 +297,7 @@ public final class EthiopicCalendar extends CECalendar * @internal * @deprecated This API is ICU internal only. */ + @Override @Deprecated protected int handleGetExtendedYear() { // Ethiopic calendar uses EXTENDED_YEAR aligned to @@ -323,6 +325,7 @@ public final class EthiopicCalendar extends CECalendar * @internal * @deprecated This API is ICU internal only. */ + @Override @Deprecated protected void handleComputeFields(int julianDay) { int era, year; @@ -359,6 +362,7 @@ public final class EthiopicCalendar extends CECalendar * @internal * @deprecated This API is ICU internal only. */ + @Override @Deprecated protected int handleGetLimit(int field, int limitType) { if (isAmeteAlemEra() && field == ERA) { @@ -372,6 +376,7 @@ public final class EthiopicCalendar extends CECalendar * @internal * @deprecated This API is ICU internal only. */ + @Override @Deprecated protected int getJDEpochOffset() { return JD_EPOCH_OFFSET_AMETE_MIHRET; @@ -385,7 +390,6 @@ public final class EthiopicCalendar extends CECalendar * @param date the day * * @draft ICU 3.4 (retain) - * @provisional This API might change or be removed in a future release. */ // The equivalent operation can be done by public Calendar API. // This API was accidentally marked as @draft, but we have no good @@ -400,7 +404,7 @@ public final class EthiopicCalendar extends CECalendar */ private void setCalcTypeForLocale(ULocale locale) { String localeCalType = CalendarUtil.getCalendarType(locale); - if("ethiopic-amete-alem".equals(localeCalType)) { + if("ethiopic-amete-alem".equals(localeCalType)) { setAmeteAlemEra(true); } else { setAmeteAlemEra(false); // default - Amete Mihret diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/HebrewHoliday.java b/icu4j/main/classes/core/src/com/ibm/icu/util/HebrewHoliday.java index 36de0bc2cfc..77550cd3751 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/HebrewHoliday.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/HebrewHoliday.java @@ -12,9 +12,8 @@ package com.ibm.icu.util; /** * Note: The Holiday framework is a technology preview. * Despite its age, is still draft API, and clients should treat it as such. - * + * * @draft ICU 2.8 (retainAll) - * @provisional This API might change or be removed in a future release. */ public class HebrewHoliday extends Holiday { @@ -25,7 +24,6 @@ public class HebrewHoliday extends Holiday * * @param name The name of the holiday * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public HebrewHoliday(int month, int date, String name) { @@ -34,7 +32,6 @@ public class HebrewHoliday extends Holiday /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public HebrewHoliday(int month, int date, int length, String name) { @@ -43,145 +40,121 @@ public class HebrewHoliday extends Holiday /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday ROSH_HASHANAH = new HebrewHoliday(HebrewCalendar.TISHRI, 1, 2, "Rosh Hashanah"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday GEDALIAH = new HebrewHoliday(HebrewCalendar.TISHRI, 3, "Fast of Gedaliah"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday YOM_KIPPUR = new HebrewHoliday(HebrewCalendar.TISHRI, 10, "Yom Kippur"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday SUKKOT = new HebrewHoliday(HebrewCalendar.TISHRI, 15, 6, "Sukkot"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday HOSHANAH_RABBAH = new HebrewHoliday(HebrewCalendar.TISHRI, 21, "Hoshanah Rabbah"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday SHEMINI_ATZERET = new HebrewHoliday(HebrewCalendar.TISHRI, 22, "Shemini Atzeret"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday SIMCHAT_TORAH = new HebrewHoliday(HebrewCalendar.TISHRI, 23, "Simchat Torah"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday HANUKKAH = new HebrewHoliday(HebrewCalendar.KISLEV, 25, "Hanukkah"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday TEVET_10 = new HebrewHoliday(HebrewCalendar.TEVET, 10, "Fast of Tevet 10"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday TU_BSHEVAT = new HebrewHoliday(HebrewCalendar.SHEVAT, 15, "Tu B'Shevat"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday ESTHER = new HebrewHoliday(HebrewCalendar.ADAR, 13, "Fast of Esther"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday PURIM = new HebrewHoliday(HebrewCalendar.ADAR, 14, "Purim"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday SHUSHAN_PURIM = new HebrewHoliday(HebrewCalendar.ADAR, 15, "Shushan Purim"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday PASSOVER = new HebrewHoliday(HebrewCalendar.NISAN, 15, 8, "Passover"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday YOM_HASHOAH = new HebrewHoliday(HebrewCalendar.NISAN, 27, "Yom Hashoah"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday YOM_HAZIKARON = new HebrewHoliday(HebrewCalendar.IYAR, 4, "Yom Hazikaron"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday YOM_HAATZMAUT = new HebrewHoliday(HebrewCalendar.IYAR, 5, "Yom Ha'Atzmaut"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday PESACH_SHEINI = new HebrewHoliday(HebrewCalendar.IYAR, 14, "Pesach Sheini"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday LAG_BOMER = new HebrewHoliday(HebrewCalendar.IYAR, 18, "Lab B'Omer"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday YOM_YERUSHALAYIM = new HebrewHoliday(HebrewCalendar.IYAR, 28, "Yom Yerushalayim"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday SHAVUOT = new HebrewHoliday(HebrewCalendar.SIVAN, 6, 2, "Shavuot"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday TAMMUZ_17 = new HebrewHoliday(HebrewCalendar.TAMUZ, 17, "Fast of Tammuz 17"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday TISHA_BAV = new HebrewHoliday(HebrewCalendar.AV, 9, "Fast of Tisha B'Av"); /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static HebrewHoliday SELIHOT = new HebrewHoliday(HebrewCalendar.ELUL, 21, "Selihot"); } diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/Holiday.java b/icu4j/main/classes/core/src/com/ibm/icu/util/Holiday.java index 2d903ea30ce..085eb99d8d1 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/Holiday.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/Holiday.java @@ -22,13 +22,11 @@ import com.ibm.icu.util.ULocale.Category; * * An abstract class representing a holiday. * @draft ICU 2.8 (retainAll) - * @provisional This API might change or be removed in a future release. */ public abstract class Holiday implements DateRule { /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static Holiday[] getHolidays() { @@ -37,7 +35,6 @@ public abstract class Holiday implements DateRule /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static Holiday[] getHolidays(Locale locale) { @@ -46,7 +43,6 @@ public abstract class Holiday implements DateRule /** * @draft ICU 3.2 - * @provisional This API might change or be removed in a future release. */ public static Holiday[] getHolidays(ULocale locale) { @@ -72,7 +68,6 @@ public abstract class Holiday implements DateRule * * @see #firstBetween * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ @Override public Date firstAfter(Date start) { @@ -91,7 +86,6 @@ public abstract class Holiday implements DateRule * * @see #firstAfter * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ @Override public Date firstBetween(Date start, Date end) { @@ -106,7 +100,6 @@ public abstract class Holiday implements DateRule * @param date The date to check. * @return true if this holiday occurs on the given date. * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ @Override public boolean isOn(Date date) { @@ -118,7 +111,6 @@ public abstract class Holiday implements DateRule * Check whether this holiday occurs at least once between the two * dates given. * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ @Override public boolean isBetween(Date start, Date end) { @@ -137,7 +129,6 @@ public abstract class Holiday implements DateRule * falls. Holiday's implementation of the DateRule interface * simply delegates to this DateRule object. * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ protected Holiday(String name, DateRule rule) { @@ -149,7 +140,6 @@ public abstract class Holiday implements DateRule * Return the name of this holiday in the language of the default DISPLAY locale. * @see Category#DISPLAY * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public String getDisplayName() { return getDisplayName(ULocale.getDefault(Category.DISPLAY)); @@ -165,7 +155,6 @@ public abstract class Holiday implements DateRule * * @see ResourceBundle * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public String getDisplayName(Locale locale) { @@ -182,7 +171,6 @@ public abstract class Holiday implements DateRule * * @see ResourceBundle * @draft ICU 3.2 - * @provisional This API might change or be removed in a future release. */ public String getDisplayName(ULocale locale) { @@ -199,7 +187,6 @@ public abstract class Holiday implements DateRule /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public DateRule getRule() { return rule; @@ -207,7 +194,6 @@ public abstract class Holiday implements DateRule /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public void setRule(DateRule rule) { this.rule = rule; diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/ICUInputTooLongException.java b/icu4j/main/classes/core/src/com/ibm/icu/util/ICUInputTooLongException.java index 194a1fd1689..3e83692ab1b 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/ICUInputTooLongException.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/ICUInputTooLongException.java @@ -8,7 +8,6 @@ package com.ibm.icu.util; * processing time, stack depth, or heap memory requirements. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public class ICUInputTooLongException extends ICUException { private static final long serialVersionUID = -2602876786689338226L; @@ -17,7 +16,6 @@ public class ICUInputTooLongException extends ICUException { * Default constructor. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public ICUInputTooLongException() { } @@ -27,7 +25,6 @@ public class ICUInputTooLongException extends ICUException { * * @param message exception message string * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public ICUInputTooLongException(String message) { super(message); @@ -38,7 +35,6 @@ public class ICUInputTooLongException extends ICUException { * * @param cause original exception * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public ICUInputTooLongException(Throwable cause) { super(cause); @@ -50,7 +46,6 @@ public class ICUInputTooLongException extends ICUException { * @param message exception message string * @param cause original exception * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public ICUInputTooLongException(String message, Throwable cause) { super(message, cause); diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/JapaneseCalendar.java b/icu4j/main/classes/core/src/com/ibm/icu/util/JapaneseCalendar.java index ef74d213acd..19257eb6bac 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/JapaneseCalendar.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/JapaneseCalendar.java @@ -296,7 +296,6 @@ public class JapaneseCalendar extends GregorianCalendar { * taking year and era into account. Defaults to 0 (JANUARY) for Gregorian. * @param extendedYear the extendedYear, as returned by handleGetExtendedYear * @return the default month - * @provisional ICU 3.6 * @draft ICU 3.6 (retain) * @see #MONTH */ @@ -322,7 +321,6 @@ public class JapaneseCalendar extends GregorianCalendar { * @param month the month, as returned by getDefaultMonthInYear * @return the default day of the month * @draft ICU 3.6 (retain) - * @provisional ICU 3.6 * @see #DAY_OF_MONTH */ @Override diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/LocaleMatcher.java b/icu4j/main/classes/core/src/com/ibm/icu/util/LocaleMatcher.java index 114e9ad6552..07ae8882bd5 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/LocaleMatcher.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/LocaleMatcher.java @@ -165,14 +165,12 @@ public final class LocaleMatcher { * * @see LocaleMatcher.Builder#setDirection(LocaleMatcher.Direction) * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public enum Direction { /** * Locale matching includes one-way matches such as Breton→French. (default) * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ WITH_ONE_WAY, /** @@ -180,7 +178,6 @@ public final class LocaleMatcher { * but ignoring one-way matches. * * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ ONLY_TWO_WAY } @@ -453,7 +450,6 @@ public final class LocaleMatcher { * best supported locale. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public Builder setNoDefaultLocale() { this.defaultLocale = null; @@ -527,7 +523,6 @@ public final class LocaleMatcher { * @param direction the match direction to set. * @return this Builder object * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public Builder setDirection(Direction direction) { this.direction = direction; @@ -554,7 +549,6 @@ public final class LocaleMatcher { * @param supported the supported locale for distance comparison. * @return this Builder object * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public Builder setMaxDistance(Locale desired, Locale supported) { if (desired == null || supported == null) { @@ -583,7 +577,6 @@ public final class LocaleMatcher { * @param supported the supported locale for distance comparison. * @return this Builder object * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public Builder setMaxDistance(ULocale desired, ULocale supported) { if (desired == null || supported == null) { @@ -1102,7 +1095,6 @@ public final class LocaleMatcher { * @param supported The supported locale. * @return true if the pair of locales matches acceptably. * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public boolean isMatch(Locale desired, Locale supported) { int indexAndDistance = LocaleDistance.INSTANCE.getBestIndexAndDistance( @@ -1121,7 +1113,6 @@ public final class LocaleMatcher { * @param supported The supported locale. * @return true if the pair of locales matches acceptably. * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public boolean isMatch(ULocale desired, ULocale supported) { int indexAndDistance = LocaleDistance.INSTANCE.getBestIndexAndDistance( 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 b4364f22bea..425619cbb08 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 @@ -87,14 +87,12 @@ public class MeasureUnit implements Serializable { * or prefix of a compound unit. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public enum Complexity { /** * A single unit, like kilojoule. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ SINGLE, @@ -102,7 +100,6 @@ public class MeasureUnit implements Serializable { * A compound unit, like meter-per-second. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ COMPOUND, @@ -110,7 +107,6 @@ public class MeasureUnit implements Serializable { * A mixed unit, like hour-and-minute. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ MIXED } @@ -119,7 +115,6 @@ public class MeasureUnit implements Serializable { * Enumeration for SI and binary prefixes, e.g. "kilo-", "nano-", "mebi-". * * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ public enum MeasurePrefix { @@ -127,7 +122,6 @@ public class MeasureUnit implements Serializable { * SI prefix: yotta, 10^24. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ YOTTA(24, "yotta", 10), @@ -135,7 +129,6 @@ public class MeasureUnit implements Serializable { * SI prefix: zetta, 10^21. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ ZETTA(21, "zetta", 10), @@ -143,7 +136,6 @@ public class MeasureUnit implements Serializable { * SI prefix: exa, 10^18. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ EXA(18, "exa", 10), @@ -151,7 +143,6 @@ public class MeasureUnit implements Serializable { * SI prefix: peta, 10^15. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ PETA(15, "peta", 10), @@ -159,7 +150,6 @@ public class MeasureUnit implements Serializable { * SI prefix: tera, 10^12. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ TERA(12, "tera", 10), @@ -167,7 +157,6 @@ public class MeasureUnit implements Serializable { * SI prefix: giga, 10^9. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ GIGA(9, "giga", 10), @@ -175,7 +164,6 @@ public class MeasureUnit implements Serializable { * SI prefix: mega, 10^6. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ MEGA(6, "mega", 10), @@ -183,7 +171,6 @@ public class MeasureUnit implements Serializable { * SI prefix: kilo, 10^3. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ KILO(3, "kilo", 10), @@ -191,7 +178,6 @@ public class MeasureUnit implements Serializable { * SI prefix: hecto, 10^2. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ HECTO(2, "hecto", 10), @@ -199,7 +185,6 @@ public class MeasureUnit implements Serializable { * SI prefix: deka, 10^1. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ DEKA(1, "deka", 10), @@ -207,7 +192,6 @@ public class MeasureUnit implements Serializable { * The absence of an SI prefix. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ ONE(0, "", 10), @@ -215,7 +199,6 @@ public class MeasureUnit implements Serializable { * SI prefix: deci, 10^-1. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ DECI(-1, "deci", 10), @@ -223,7 +206,6 @@ public class MeasureUnit implements Serializable { * SI prefix: centi, 10^-2. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ CENTI(-2, "centi", 10), @@ -231,7 +213,6 @@ public class MeasureUnit implements Serializable { * SI prefix: milli, 10^-3. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ MILLI(-3, "milli", 10), @@ -239,7 +220,6 @@ public class MeasureUnit implements Serializable { * SI prefix: micro, 10^-6. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ MICRO(-6, "micro", 10), @@ -247,7 +227,6 @@ public class MeasureUnit implements Serializable { * SI prefix: nano, 10^-9. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ NANO(-9, "nano", 10), @@ -255,7 +234,6 @@ public class MeasureUnit implements Serializable { * SI prefix: pico, 10^-12. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ PICO(-12, "pico", 10), @@ -263,7 +241,6 @@ public class MeasureUnit implements Serializable { * SI prefix: femto, 10^-15. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ FEMTO(-15, "femto", 10), @@ -271,7 +248,6 @@ public class MeasureUnit implements Serializable { * SI prefix: atto, 10^-18. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ ATTO(-18, "atto", 10), @@ -279,7 +255,6 @@ public class MeasureUnit implements Serializable { * SI prefix: zepto, 10^-21. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ ZEPTO(-21, "zepto", 10), @@ -287,7 +262,6 @@ public class MeasureUnit implements Serializable { * SI prefix: yocto, 10^-24. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ YOCTO(-24, "yocto", 10), @@ -295,7 +269,6 @@ public class MeasureUnit implements Serializable { * IEC binary prefix: kibi, 1024^1. * * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ KIBI(1, "kibi", 1024), @@ -303,7 +276,6 @@ public class MeasureUnit implements Serializable { * IEC binary prefix: mebi, 1024^2. * * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ MEBI(2, "mebi", 1024), @@ -311,7 +283,6 @@ public class MeasureUnit implements Serializable { * IEC binary prefix: gibi, 1024^3. * * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ GIBI(3, "gibi", 1024), @@ -319,7 +290,6 @@ public class MeasureUnit implements Serializable { * IEC binary prefix: tebi, 1024^4. * * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ TEBI(4, "tebi", 1024), @@ -327,7 +297,6 @@ public class MeasureUnit implements Serializable { * IEC binary prefix: pebi, 1024^5. * * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ PEBI(5, "pebi", 1024), @@ -335,7 +304,6 @@ public class MeasureUnit implements Serializable { * IEC binary prefix: exbi, 1024^6. * * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ EXBI(6, "exbi", 1024), @@ -343,7 +311,6 @@ public class MeasureUnit implements Serializable { * IEC binary prefix: zebi, 1024^7. * * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ ZEBI(7, "zebi", 1024), @@ -351,7 +318,6 @@ public class MeasureUnit implements Serializable { * IEC binary prefix: yobi, 1024^8. * * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ YOBI(8, "yobi", 1024); @@ -382,7 +348,6 @@ public class MeasureUnit implements Serializable { * - if the prefix is "gibi", the base will be 1024. * * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ public int getBase() { return base; @@ -394,7 +359,6 @@ public class MeasureUnit implements Serializable { * - if the prefix is "gibi", the power will be 3 (for base 1024). * * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ public int getPower() { return power; @@ -425,7 +389,6 @@ public class MeasureUnit implements Serializable { * @param identifier CLDR Unit Identifier * @throws IllegalArgumentException if the identifier is invalid. * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public static MeasureUnit forIdentifier(String identifier) { if (identifier == null || identifier.isEmpty()) { @@ -483,7 +446,6 @@ public class MeasureUnit implements Serializable { * * @return The string form of this unit. * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public String getIdentifier() { String result = measureUnitImpl == null ? getSubtype() : measureUnitImpl.getIdentifier(); @@ -495,7 +457,6 @@ public class MeasureUnit implements Serializable { * * @return The unit complexity. * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public Complexity getComplexity() { if (measureUnitImpl == null) { @@ -519,7 +480,6 @@ public class MeasureUnit implements Serializable { * @return A new SINGLE unit. * @throws UnsupportedOperationException if this unit is a COMPOUND or MIXED unit. * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ public MeasureUnit withPrefix(MeasurePrefix prefix) { SingleUnitImpl singleUnit = getSingleUnitImpl(); @@ -537,7 +497,6 @@ public class MeasureUnit implements Serializable { * @return The prefix of this SINGLE unit, from MeasurePrefix. * @throws UnsupportedOperationException if the unit is COMPOUND or MIXED. * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ public MeasurePrefix getPrefix() { return getSingleUnitImpl().getPrefix(); @@ -553,7 +512,6 @@ public class MeasureUnit implements Serializable { * @return The dimensionality (power) of this simple unit. * @throws UnsupportedOperationException if the unit is COMPOUND or MIXED. * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public int getDimensionality() { return getSingleUnitImpl().getDimensionality(); @@ -570,7 +528,6 @@ public class MeasureUnit implements Serializable { * @return A new SINGLE unit. * @throws UnsupportedOperationException if the unit is COMPOUND or MIXED. * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public MeasureUnit withDimensionality(int dimensionality) { SingleUnitImpl singleUnit = getSingleUnitImpl(); @@ -589,7 +546,6 @@ public class MeasureUnit implements Serializable { * @return The reciprocal of the target unit. * @throws UnsupportedOperationException if the unit is MIXED. * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public MeasureUnit reciprocal() { MeasureUnitImpl measureUnit = getCopyOfMeasureUnitImpl(); @@ -613,7 +569,6 @@ public class MeasureUnit implements Serializable { * @return The product of the target unit with the provided unit. * @throws UnsupportedOperationException if the unit is MIXED. * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public MeasureUnit product(MeasureUnit other) { MeasureUnitImpl implCopy = getCopyOfMeasureUnitImpl(); @@ -648,7 +603,6 @@ public class MeasureUnit implements Serializable { * * @return An unmodifiable list of single units * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public List splitToSingleUnits() { final ArrayList singleUnits = @@ -1048,7 +1002,6 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of concentr: milligram-ofglucose-per-deciliter * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ public static final MeasureUnit MILLIGRAM_OFGLUCOSE_PER_DECILITER = MeasureUnit.internalGetInstance("concentr", "milligram-ofglucose-per-deciliter"); @@ -1397,7 +1350,6 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of graphics: dot * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public static final MeasureUnit DOT = MeasureUnit.internalGetInstance("graphics", "dot"); @@ -1464,7 +1416,6 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of length: earth-radius * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public static final MeasureUnit EARTH_RADIUS = MeasureUnit.internalGetInstance("length", "earth-radius"); @@ -1579,14 +1530,12 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of light: candela * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public static final MeasureUnit CANDELA = MeasureUnit.internalGetInstance("light", "candela"); /** * Constant for unit of light: lumen * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public static final MeasureUnit LUMEN = MeasureUnit.internalGetInstance("light", "lumen"); @@ -1623,7 +1572,6 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of mass: grain * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public static final MeasureUnit GRAIN = MeasureUnit.internalGetInstance("mass", "grain"); @@ -1936,28 +1884,24 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of volume: dessert-spoon * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public static final MeasureUnit DESSERT_SPOON = MeasureUnit.internalGetInstance("volume", "dessert-spoon"); /** * Constant for unit of volume: dessert-spoon-imperial * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public static final MeasureUnit DESSERT_SPOON_IMPERIAL = MeasureUnit.internalGetInstance("volume", "dessert-spoon-imperial"); /** * Constant for unit of volume: dram * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public static final MeasureUnit DRAM = MeasureUnit.internalGetInstance("volume", "dram"); /** * Constant for unit of volume: drop * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public static final MeasureUnit DROP = MeasureUnit.internalGetInstance("volume", "drop"); @@ -1994,7 +1938,6 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of volume: jigger * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public static final MeasureUnit JIGGER = MeasureUnit.internalGetInstance("volume", "jigger"); @@ -2019,7 +1962,6 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of volume: pinch * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public static final MeasureUnit PINCH = MeasureUnit.internalGetInstance("volume", "pinch"); @@ -2044,7 +1986,6 @@ public class MeasureUnit implements Serializable { /** * Constant for unit of volume: quart-imperial * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public static final MeasureUnit QUART_IMPERIAL = MeasureUnit.internalGetInstance("volume", "quart-imperial"); diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/NoUnit.java b/icu4j/main/classes/core/src/com/ibm/icu/util/NoUnit.java index 3450a2f9118..e617f5241e8 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/NoUnit.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/NoUnit.java @@ -8,7 +8,6 @@ import com.ibm.icu.number.NumberFormatter; * Dimensionless unit for percent and permille. * @see NumberFormatter * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public final class NoUnit { /** @@ -19,7 +18,6 @@ public final class NoUnit { * Since ICU 68, this constant equals null. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public static final MeasureUnit BASE = null; @@ -31,7 +29,6 @@ public final class NoUnit { * Since ICU 68, this constant is equivalent to MeasureUnit.PERCENT. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public static final MeasureUnit PERCENT = MeasureUnit.PERCENT; @@ -43,7 +40,6 @@ public final class NoUnit { * Since ICU 68, this constant is equivalent to MeasureUnit.PERMILLE. * * @draft ICU 68 - * @provisional This API might change or be removed in a future release. */ public static final MeasureUnit PERMILLE = MeasureUnit.PERMILLE; diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/RangeDateRule.java b/icu4j/main/classes/core/src/com/ibm/icu/util/RangeDateRule.java index 502490b4ada..44ea4b67fbc 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/RangeDateRule.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/RangeDateRule.java @@ -16,15 +16,13 @@ import java.util.List; /** * Note: The Holiday framework is a technology preview. * Despite its age, is still draft API, and clients should treat it as such. - * + * * Implementation of DateRule that takes a range. * @draft ICU 2.8 (retainAll) - * @provisional This API might change or be removed in a future release. */ public class RangeDateRule implements DateRule { /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public RangeDateRule() { } @@ -39,7 +37,6 @@ public class RangeDateRule implements DateRule { /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public void add(DateRule rule) { add(new Date(Long.MIN_VALUE), rule); @@ -47,7 +44,6 @@ public class RangeDateRule implements DateRule { /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public void add(Date start, DateRule rule) { // TODO: Insert in the right place @@ -59,8 +55,8 @@ public class RangeDateRule implements DateRule { /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ + @Override public Date firstAfter(Date start) { // Find the range that I should look at int index = startIndex(start); @@ -85,13 +81,13 @@ public class RangeDateRule implements DateRule { /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ + @Override public Date firstBetween(Date start, Date end) { if (end == null) { return firstAfter(start); } - + // Find the range that I should look at int index = startIndex(start); Date result = null; @@ -114,8 +110,8 @@ public class RangeDateRule implements DateRule { /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ + @Override public boolean isOn(Date date) { Range r = rangeAt(startIndex(date)); return r != null && r.rule != null && r.rule.isOn(date); @@ -125,8 +121,8 @@ public class RangeDateRule implements DateRule { * Check whether this event occurs at least once between the two * dates given. * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ + @Override public boolean isBetween(Date start, Date end) { return firstBetween(start,end) == null; } @@ -153,7 +149,7 @@ public class RangeDateRule implements DateRule { : null; } - List ranges = new ArrayList(2); + List ranges = new ArrayList<>(2); } //----------------------------------------------------------------------- diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/RuleBasedTimeZone.java b/icu4j/main/classes/core/src/com/ibm/icu/util/RuleBasedTimeZone.java index 6671562a348..e2c3cd5b962 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/RuleBasedTimeZone.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/RuleBasedTimeZone.java @@ -119,7 +119,6 @@ public class RuleBasedTimeZone extends BasicTimeZone { /** * {@inheritDoc} * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ @Override public void getOffsetFromLocal(long date, diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/SimpleDateRule.java b/icu4j/main/classes/core/src/com/ibm/icu/util/SimpleDateRule.java index ec00947b9ac..5c3c5023681 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/SimpleDateRule.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/SimpleDateRule.java @@ -14,10 +14,9 @@ import java.util.Date; /** * Note: The Holiday framework is a technology preview. * Despite its age, is still draft API, and clients should treat it as such. - * + * * Simple implementation of DateRule. * @draft ICU 2.8 (retainAll) - * @provisional This API might change or be removed in a future release. */ public class SimpleDateRule implements DateRule { @@ -27,7 +26,6 @@ public class SimpleDateRule implements DateRule * @param month The month in which this rule occurs (0-based). * @param dayOfMonth The date in that month (1-based). * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public SimpleDateRule(int month, int dayOfMonth) { @@ -55,7 +53,6 @@ public class SimpleDateRule implements DateRule * on or after dayOfMonth. If false, the rule selects * the first dayOfWeek on or before dayOfMonth. * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public SimpleDateRule(int month, int dayOfMonth, int dayOfWeek, boolean after) { @@ -75,8 +72,8 @@ public class SimpleDateRule implements DateRule * * @see #firstBetween * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ + @Override public Date firstAfter(Date start) { return doFirstBetween(start, null); @@ -95,8 +92,8 @@ public class SimpleDateRule implements DateRule * * @see #firstAfter * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ + @Override public Date firstBetween(Date start, Date end) { // Pin to the min/max dates for this rule @@ -113,8 +110,8 @@ public class SimpleDateRule implements DateRule * @param date The date to check. * @return true if this event occurs on the given date. * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ + @Override public boolean isOn(Date date) { Calendar c = calendar; @@ -137,8 +134,8 @@ public class SimpleDateRule implements DateRule * Check whether this event occurs at least once between the two * dates given. * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ + @Override public boolean isBetween(Date start, Date end) { return firstBetween(start, end) != null; // TODO: optimize? @@ -213,10 +210,6 @@ public class SimpleDateRule implements DateRule } } - /** - * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. - */ // public void setCalendar(Calendar c) { // calendar = c; // } diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/SimpleHoliday.java b/icu4j/main/classes/core/src/com/ibm/icu/util/SimpleHoliday.java index 3e3e3feda8b..17a4d41614a 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/SimpleHoliday.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/SimpleHoliday.java @@ -14,12 +14,11 @@ import java.util.Date; /** * Note: The Holiday framework is a technology preview. * Despite its age, is still draft API, and clients should treat it as such. - * + * * A holiday whose date can be represented by a month, day, and optionally day of week * in the Gregorian calendar. * * @draft ICU 2.8 (retainAll) - * @provisional This API might change or be removed in a future release. */ public class SimpleHoliday extends Holiday { /** @@ -35,7 +34,6 @@ public class SimpleHoliday extends Holiday { * * @see Holiday#getDisplayName(java.util.Locale) * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public SimpleHoliday(int month, int dayOfMonth, String name) { @@ -55,7 +53,6 @@ public class SimpleHoliday extends Holiday { * * @see Holiday#getDisplayName(java.util.Locale) * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public SimpleHoliday(int month, int dayOfMonth, String name, int startYear) @@ -76,7 +73,6 @@ public class SimpleHoliday extends Holiday { * * @see Holiday#getDisplayName(java.util.Locale) * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public SimpleHoliday(int month, int dayOfMonth, String name, int startYear, int endYear) @@ -107,7 +103,6 @@ public class SimpleHoliday extends Holiday { * * @see Holiday#getDisplayName(java.util.Locale) * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public SimpleHoliday(int month, int dayOfMonth, int dayOfWeek, String name) { @@ -118,12 +113,11 @@ public class SimpleHoliday extends Holiday { /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public SimpleHoliday(int month, int dayOfMonth, int dayOfWeek, String name, int startYear) { - super(name, rangeRule(startYear, 0, + super(name, rangeRule(startYear, 0, new SimpleDateRule(month, dayOfMonth, dayOfWeek > 0 ? dayOfWeek : - dayOfWeek, dayOfWeek > 0))); @@ -132,12 +126,11 @@ public class SimpleHoliday extends Holiday { /** * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public SimpleHoliday(int month, int dayOfMonth, int dayOfWeek, String name, int startYear, int endYear) { - super(name, rangeRule(startYear, endYear, + super(name, rangeRule(startYear, endYear, new SimpleDateRule(month, dayOfMonth, dayOfWeek > 0 ? dayOfWeek : - dayOfWeek, dayOfWeek > 0))); @@ -171,7 +164,6 @@ public class SimpleHoliday extends Holiday { /** * New Year's Day - January 1st * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static final SimpleHoliday NEW_YEARS_DAY = new SimpleHoliday(Calendar.JANUARY, 1, "New Year's Day"); @@ -179,7 +171,6 @@ public class SimpleHoliday extends Holiday { /** * Epiphany, January 6th * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static final SimpleHoliday EPIPHANY = new SimpleHoliday(Calendar.JANUARY, 6, "Epiphany"); @@ -187,7 +178,6 @@ public class SimpleHoliday extends Holiday { /** * May Day, May 1st * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static final SimpleHoliday MAY_DAY = new SimpleHoliday(Calendar.MAY, 1, "May Day"); @@ -195,7 +185,6 @@ public class SimpleHoliday extends Holiday { /** * Assumption, August 15th * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static final SimpleHoliday ASSUMPTION = new SimpleHoliday(Calendar.AUGUST, 15, "Assumption"); @@ -203,7 +192,6 @@ public class SimpleHoliday extends Holiday { /** * All Saints' Day, November 1st * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static final SimpleHoliday ALL_SAINTS_DAY = new SimpleHoliday(Calendar.NOVEMBER, 1, "All Saints' Day"); @@ -211,7 +199,6 @@ public class SimpleHoliday extends Holiday { /** * All Souls' Day, November 1st * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static final SimpleHoliday ALL_SOULS_DAY = new SimpleHoliday(Calendar.NOVEMBER, 2, "All Souls' Day"); @@ -219,7 +206,6 @@ public class SimpleHoliday extends Holiday { /** * Immaculate Conception, December 8th * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static final SimpleHoliday IMMACULATE_CONCEPTION = new SimpleHoliday(Calendar.DECEMBER, 8, "Immaculate Conception"); @@ -227,7 +213,6 @@ public class SimpleHoliday extends Holiday { /** * Christmas Eve, December 24th * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static final SimpleHoliday CHRISTMAS_EVE = new SimpleHoliday(Calendar.DECEMBER, 24, "Christmas Eve"); @@ -235,7 +220,6 @@ public class SimpleHoliday extends Holiday { /** * Christmas, December 25th * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static final SimpleHoliday CHRISTMAS = new SimpleHoliday(Calendar.DECEMBER, 25, "Christmas"); @@ -243,7 +227,6 @@ public class SimpleHoliday extends Holiday { /** * Boxing Day, December 26th * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static final SimpleHoliday BOXING_DAY = new SimpleHoliday(Calendar.DECEMBER, 26, "Boxing Day"); @@ -251,7 +234,6 @@ public class SimpleHoliday extends Holiday { /** * Saint Stephen's Day, December 26th * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static final SimpleHoliday ST_STEPHENS_DAY = new SimpleHoliday(Calendar.DECEMBER, 26, "St. Stephen's Day"); @@ -259,7 +241,6 @@ public class SimpleHoliday extends Holiday { /** * New Year's Eve, December 31st * @draft ICU 2.8 - * @provisional This API might change or be removed in a future release. */ public static final SimpleHoliday NEW_YEARS_EVE = new SimpleHoliday(Calendar.DECEMBER, 31, "New Year's Eve"); diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/SimpleTimeZone.java b/icu4j/main/classes/core/src/com/ibm/icu/util/SimpleTimeZone.java index ff717b32e36..599d301614b 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/SimpleTimeZone.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/SimpleTimeZone.java @@ -791,7 +791,6 @@ public class SimpleTimeZone extends BasicTimeZone { /** * {@inheritDoc} * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ @Override public void getOffsetFromLocal(long date, diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/ULocale.java b/icu4j/main/classes/core/src/com/ibm/icu/util/ULocale.java index 140922f58ae..5727b377c05 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/ULocale.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/ULocale.java @@ -502,7 +502,6 @@ public final class ULocale implements Serializable, Comparable { * @param locale the ULocale to canonicalize * @return the ULocale created from the canonical version of the ULocale. * @draft ICU 67 - * @provisional This API might change or be removed in a future release. */ public static ULocale createCanonical(ULocale locale) { return createCanonical(locale.getName()); @@ -2475,7 +2474,6 @@ public final class ULocale implements Serializable, Comparable { * locale data, then the valid locale is null. * * @draft ICU 2.8 (retain) - * @provisional This API might change or be removed in a future release. */ public static Type ACTUAL_LOCALE = new Type(); @@ -2491,7 +2489,6 @@ public final class ULocale implements Serializable, Comparable { *

Note: The valid locale will be returned correctly in ICU * 3.0 or later. In ICU 2.8, it is not returned correctly. * @draft ICU 2.8 (retain) - * @provisional This API might change or be removed in a future release. */ public static Type VALID_LOCALE = new Type(); @@ -2501,7 +2498,6 @@ public final class ULocale implements Serializable, Comparable { * @see com.ibm.icu.util.ULocale#ACTUAL_LOCALE * @see com.ibm.icu.util.ULocale#VALID_LOCALE * @draft ICU 2.8 (retainAll) - * @provisional This API might change or be removed in a future release. */ public static final class Type { private Type() {} diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/VTimeZone.java b/icu4j/main/classes/core/src/com/ibm/icu/util/VTimeZone.java index c616de848dd..d8732a86921 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/util/VTimeZone.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/util/VTimeZone.java @@ -99,7 +99,6 @@ public class VTimeZone extends BasicTimeZone { /** * {@inheritDoc} * @draft ICU 69 - * @provisional This API might change or be removed in a future release. */ @Override public void getOffsetFromLocal(long date, diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/MeasureUnitTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/MeasureUnitTest.java index eda3f75a0c5..ebc44fb1d4e 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/MeasureUnitTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/MeasureUnitTest.java @@ -3449,7 +3449,6 @@ public class MeasureUnitTest extends TestFmwk { } else if (isDraft(name)) { System.out.println(" * @draft ICU " + getVersion(name, thisVersion)); - System.out.println(" * @provisional This API might change or be removed in a future release."); } else { System.out.println(" * @stable ICU " + getVersion(name, thisVersion)); } @@ -3800,7 +3799,7 @@ public class MeasureUnitTest extends TestFmwk { public void TestIdentifierDetails() { MeasureUnit joule = MeasureUnit.forIdentifier("joule"); assertEquals("Initial joule", "joule", joule.getIdentifier()); - + // "Invalid prefix" test not needed: in Java we cannot pass a // non-existant enum instance. (In C++ an int can be typecast.) diff --git a/icu4j/tools/build/src/com/ibm/icu/dev/tool/docs/SwatDeprecated.java b/icu4j/tools/build/src/com/ibm/icu/dev/tool/docs/SwatDeprecated.java deleted file mode 100644 index af0d89298c2..00000000000 --- a/icu4j/tools/build/src/com/ibm/icu/dev/tool/docs/SwatDeprecated.java +++ /dev/null @@ -1,347 +0,0 @@ -// © 2016 and later: Unicode, Inc. and others. -// License & terms of use: http://www.unicode.org/copyright.html -/* - ******************************************************************************* - * Copyright (C) 2006-2010, International Business Machines Corporation and * - * others. All Rights Reserved. * - ******************************************************************************* - */ -package com.ibm.icu.dev.tool.docs; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.FilenameFilter; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.PrintStream; -import java.io.PrintWriter; -import java.text.SimpleDateFormat; -import java.util.Date; - -public class SwatDeprecated { - private File srcFile; - private File dstFile; - private int maxLength = 85; - private String srcPrefix; - private String dstPrefix; - private String srcTag; - private String trgTag; - private boolean overwrite; - private int verbosity; - private int cc; // changed file count - //private boolean inPlace; - private String copyYear; - - private PrintWriter pw = new PrintWriter(System.out); - - private static FilenameFilter ff = new FilenameFilter() { - public boolean accept(File dir, String name) { - return (new File(dir, name).isDirectory() && !"CVS".equals(name)) || - (!name.equals("SwatDeprecated.java") && name.endsWith(".java")); - } - }; - - public static void main(String[] args) { - String src = System.getProperty("user.dir"); - String dst = src; - boolean dep = true; - boolean ovr = false; - int vrb = 1; - - for (int i = 0; i < args.length; ++i) { - String arg = args[i].toLowerCase(); - if (arg.charAt(0) == '-') { - if (arg.equals("-src")) { - src = args[++i]; - } - else if (arg.equals("-dst")) { - dst = args[++i]; - } - else if (arg.equals("-dep")) { - dep = true; - } - else if (arg.equals("-prov")) { - dep = false; - } - else if (arg.equals("-overwrite")) { - ovr = true; - } - else if (arg.equals("-silent")) { // no output - vrb = 0; - } - else if (arg.equals("-quiet")) { // output parameters and count of changed files (default) - vrb = 1; - } - else if (arg.equals("-verbose")) { // output names of modified files - vrb = 2; - } - else if (arg.equals("-noisy")) { // output names of files not modified - vrb = 3; - } - else if (arg.equals("-copydebug")) { // output copyright debugging - vrb = 4; - } - else if (arg.equals("-debug")) { // output all debugging - vrb = 5; - } - } - } - - new SwatDeprecated(src, dst, dep, ovr, vrb).run(); - } - - public SwatDeprecated(String src, String dst, boolean dep, boolean overwrite, int verbosity) { - this.srcFile = new File(src); - this.dstFile = new File(dst); - this.overwrite = overwrite; - this.verbosity = verbosity; - this.copyYear = new SimpleDateFormat("yyyy").format(new Date()); - - this.srcTag = "@deprecated This is a draft API and might change in a future release of ICU."; - this.trgTag = "@provisional This API might change or be removed in a future release."; - if (!dep) { - String temp = srcTag; - srcTag = trgTag; - trgTag = temp; - } - try { - this.srcPrefix = srcFile.getCanonicalPath(); - this.dstPrefix = dstFile.getCanonicalPath(); - } - catch (IOException e) { - RuntimeException re = new RuntimeException(e.getMessage()); - re.initCause(e); - throw re; - } - - //this.inPlace = srcPrefix.equals(dstPrefix); - this.cc = 0; - - if (verbosity >= 1) { - pw.println("replacing '" + srcTag + "'"); - pw.println(" with '" + trgTag + "'"); - pw.println(); - pw.println(" source: '" + srcPrefix + "'"); - pw.println("destination: '" + dstPrefix + "'"); - pw.println(" overwrite: " + overwrite); - pw.println(" verbosity: " + verbosity); - pw.flush(); - } - } - - public void run() { - if (!srcFile.exists()) { - throw new RuntimeException("file " + srcFile.getPath() + " does not exist."); - } - doList(srcFile); - if (verbosity >= 1) { - pw.println("changed " + cc + " file(s)"); - pw.flush(); - } - } - - public void doList(File file) { - String[] filenames = file.list(ff); - if (verbosity >= 5) { - pw.println(file.getPath()); - dumpList(filenames); - pw.flush(); - } - for (int i = 0; i < filenames.length; ++i) { - File f = new File(file, filenames[i]); - if (f.isDirectory()) { - doList(f); - } else { - processFile(f); - } - } - } - - public void processFile(File inFile) { - File bakFile = null; - try { - String inPath = inFile.getCanonicalPath(); - if (verbosity >= 5) { - pw.println("processFile: " + inPath); - } - - String outPath = dstPrefix + inPath.substring(srcPrefix.length()); - File outFile = new File(outPath); - - File tmpFile = null; - if (outFile.exists()) { - if (!overwrite) { - throw new RuntimeException("no permission to overwrite file: " + outPath); - } else { - bakFile = outFile; - tmpFile = File.createTempFile(inFile.getName(), null, inFile.getParentFile()); - } - } else { - tmpFile = outFile; - File parent = tmpFile.getParentFile(); - parent.mkdirs(); - tmpFile.createNewFile(); - } - - String tmpPath = tmpFile.getPath(); - if (verbosity >= 5) { - pw.println("tmpFile: " + tmpPath); - } - - InputStream is = new FileInputStream(inFile); - OutputStream os = new FileOutputStream(tmpFile); - - PrintStream ps = new PrintStream(os); - BufferedReader br = new BufferedReader(new InputStreamReader(is)); - - String line; - int n = 0; - int tc = 0; -// boolean debug = false; - while (null != (line = br.readLine())) { - // int temp = line.indexOf("@deprecated"); - int ix = line.indexOf(srcTag); -// if (temp != -1 && ix == -1) { -// if (debug == false) { -// debug = true; -// pw.println("file: " + name); -// } -// pw.println("[" + n + "] " + line); -// pw.flush(); -// } - if (ix != -1) { - if (verbosity >= 5) { - pw.println("[" + n + "] " + line); - } - - line = line.substring(0,ix) + trgTag; - - ++tc; - } else if (n < 20) { - // swat copyrights in the first 20 lines while we're at it - ix = line.indexOf("opyright"); - if (ix != -1) { - String nline = null; - do { - if (verbosity == 4) { - pw.println("[" + n + "] " + line); - } - ix = line.indexOf("-200"); - if (ix != -1) { - nline = line.substring(0, ix) + "-" + copyYear + line.substring(ix+5); - break; - } - ix = line.indexOf("- 200"); - if (ix != -1) { - nline = line.substring(0, ix) + "-" + copyYear + line.substring(ix+6); - break; - } - ix = line.indexOf("-199"); - if (ix != -1) { - nline = line.substring(0, ix) + "-" + copyYear + line.substring(ix+5); - break; - } - ix = line.indexOf(copyYear); - if (ix != -1) { - break; // nothing needs changing - } - ix = line.indexOf("200"); - if (ix != -1) { - nline = line.substring(0, ix+4) + "-" + copyYear + line.substring(ix+4); - break; - } - ix = line.indexOf("199"); - if (ix != -1) { - nline = line.substring(0, ix+4) + "-" + copyYear + line.substring(ix+4); - break; - } - } while (false); - - if (nline != null) { - if (verbosity >= 4) { - pw.println(" --> " + nline); - } - line = nline; - } - } - } - ps.println(line); - ++n; - } - ps.flush(); - is.close(); - os.close(); - - if (tc == 0) { // nothing changed, forget this file - if (verbosity >= 3) { - pw.println("no changes in file: " + inPath); - } - if (!tmpFile.delete()) { - throw new RuntimeException("unable to delete unneeded temporary file: " + tmpPath); - } - - return; - } - - if (bakFile != null) { - if (bakFile.exists()) { - bakFile.delete(); - } - if (!tmpFile.renameTo(bakFile)) { - pw.println("warning: couldn't rename temp file to: " + outPath); - } - } - - outFile.setLastModified(inFile.lastModified()); - - if (verbosity >= 2) { - pw.println(inPath); - pw.flush(); - } - } - catch (IOException e) { - RuntimeException re = new RuntimeException(e.getMessage()); - re.initCause(e); - throw re; - } - finally { - pw.flush(); - } - - ++cc; - } - - public void dumpList(String[] names) { - if (names == null) { - pw.print("null"); - } else { - pw.print("{"); - int lc = 0; - if (names.length > 0) { - pw.println(); - pw.print(" "); - lc = 4; - } - for (int i = 0; i < names.length; ++i) { - String name = names[i]; - int nl = name.length(); - if (lc + nl > maxLength) { - pw.println(); - pw.print(" "); - lc = 4; - } - pw.print(name); - pw.print(", "); - lc += nl + 2; - } - if (names.length > 0) { - pw.println(); - } - pw.print("} "); - } - } -} -- 2.40.0