diff --git a/icu4j/APIChangeReport.html b/icu4j/APIChangeReport.html
index dee6d6a95c..ab07b1797e 100644
--- a/icu4j/APIChangeReport.html
+++ b/icu4j/APIChangeReport.html
@@ -2,11 +2,11 @@
-ICU4J API Comparison: ICU4J 52.1 with ICU4J 53.0.1
+ICU4J API Comparison: ICU4J 52.1 with ICU4J 53.1.0
-ICU4J API Comparison: ICU4J 52.1 with ICU4J 53.0.1
+ICU4J API Comparison: ICU4J 52.1 with ICU4J 53.1.0
Removed from ICU4J 52.1
@@ -40,10 +40,13 @@ RuleBasedBreakIterator
(draft) public static final int WORD_NUMBER
(draft) public static final int WORD_NUMBER_LIMIT
+RuleBasedCollator
+
+- (stable) public static int[] getEquivalentReorderCodes(int)
+
SimpleDateFormat
- (draft) public DisplayContext getContext(DisplayContext.Type)
-- (draft) public void setContext(DisplayContext)
@@ -75,18 +78,39 @@ TimeUnit
-Deprecated or Obsoleted in ICU4J 53.0.1
-(no API obsoleted)
-
-
-Changed in ICU4J 53.0.1 (old, new)
+Deprecated or Obsoleted in ICU4J 53.1.0
Package com.ibm.icu.text
+- (deprecated) public class TimeUnitFormat
+Collator
+
+- (deprecated) public abstract int setVariableTop(java.lang.String)
+- (deprecated) public abstract void setVariableTop(int)
+
+RuleBasedCollator
+
+- (deprecated) public int setVariableTop(java.lang.String)
+- (deprecated) public void setVariableTop(int)
+
+SpoofChecker
+
+- (deprecated) public static final int SINGLE_SCRIPT
+
+
+
+
+
+Changed in ICU4J 53.1.0 (old, new)
+
+Package com.ibm.icu.text
+
+- (stable) public abstract class Collator extends java.lang.Object implements java.util.Comparator, com.ibm.icu.util.Freezable
+(stable) public abstract class Collator extends java.lang.Object implements java.util.Comparator, com.ibm.icu.util.Freezable, java.lang.Cloneable
TimeUnitFormat
- (stable) public java.lang.Object parseObject(java.lang.String, java.text.ParsePosition)
-(stable) public com.ibm.icu.util.TimeUnitAmount parseObject(java.lang.String, java.text.ParsePosition)
+(deprecated) public com.ibm.icu.util.TimeUnitAmount parseObject(java.lang.String, java.text.ParsePosition)
@@ -94,18 +118,55 @@ TimeUnitFormat
- (stable) public class Currency extends com.ibm.icu.util.MeasureUnit implements java.io.Serializable
(stable) public class Currency extends com.ibm.icu.util.MeasureUnit
+LocalePriorityList
+
+- (stable) public static com.ibm.icu.util.LocalePriorityList.Builder add(com.ibm.icu.util.ULocale)
+(stable) public static com.ibm.icu.util.LocalePriorityList.Builder add(com.ibm.icu.util.ULocale...)
- (stable) public class MeasureUnit extends java.lang.Object implements java.lang.Comparable, java.io.Serializable
(stable) public class MeasureUnit extends java.lang.Object implements java.io.Serializable
- (stable) public final class ULocale extends java.lang.Object implements java.io.Serializable
(stable) public final class ULocale extends java.lang.Object implements java.io.Serializable, java.lang.Comparable
+
-Promoted to stable in ICU4J 53.0.1
+Promoted to stable in ICU4J 53.1.0
+
+Package com.ibm.icu.lang
+
+- (stable) public static enum UScript.ScriptUsage
+UScript
+
+- (stable) public static final boolean breaksBetweenLetters(int)
+- (stable) public static final java.lang.String getSampleString(int)
+- (stable) public static final UScript.ScriptUsage getUsage(int)
+- (stable) public static final boolean isCased(int)
+- (stable) public static final boolean isRightToLeft(int)
+
+UScript.ScriptUsage
+
+- (stable) public static final UScript.ScriptUsage ASPIRATIONAL
+- (stable) public static final UScript.ScriptUsage EXCLUDED
+- (stable) public static final UScript.ScriptUsage LIMITED_USE
+- (stable) public static final UScript.ScriptUsage NOT_ENCODED
+- (stable) public static final UScript.ScriptUsage RECOMMENDED
+- (stable) public static final UScript.ScriptUsage UNKNOWN
+
+
Package com.ibm.icu.text
+- (stable) public static final class AlphabeticIndex.ImmutableIndex
+- (stable) public final class ListFormatter
+- (stable) public static enum CompactDecimalFormat.CompactStyle
+- (stable) public enum DisplayContext
+- (stable) public static enum DisplayContext.Type
+AlphabeticIndex
+
+- (stable) public AlphabeticIndex(RuleBasedCollator)
+- (stable) public AlphabeticIndex.ImmutableIndex<V> buildImmutableIndex()
+
AlphabeticIndex.Bucket.LabelType
- (stable) public static final AlphabeticIndex.Bucket.LabelType INFLOW
@@ -113,11 +174,99 @@ AlphabeticIndex.Bucket.LabelType
- (stable) public static final AlphabeticIndex.Bucket.LabelType OVERFLOW
- (stable) public static final AlphabeticIndex.Bucket.LabelType UNDERFLOW
+CompactDecimalFormat.CompactStyle
+
+- (stable) public static final CompactDecimalFormat.CompactStyle LONG
+- (stable) public static final CompactDecimalFormat.CompactStyle SHORT
+
+CurrencyMetaInfo.CurrencyFilter
+
+- (stable) public static CurrencyMetaInfo.CurrencyFilter onDate(long)
+- (stable) public static CurrencyMetaInfo.CurrencyFilter onDateRange(long, long)
+- (stable) public static CurrencyMetaInfo.CurrencyFilter onTender()
+- (stable) public CurrencyMetaInfo.CurrencyFilter withDate(long)
+- (stable) public CurrencyMetaInfo.CurrencyFilter withDateRange(long, long)
+- (stable) public CurrencyMetaInfo.CurrencyFilter withTender()
+
+CurrencyMetaInfo.CurrencyInfo
+
+- (stable) public boolean isTender()
+
+DateFormat
+
+- (stable) public static final int TIMEZONE_ISO_FIELD
+- (stable) public static final int TIMEZONE_ISO_LOCAL_FIELD
+- (stable) public static final int TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD
+
+DateFormatSymbols
+
+- (stable) public static final int SHORT
+
+DecimalFormat
+
+- (stable) public int getParseMaxDigits()
+- (stable) public void setParseMaxDigits(int)
+
+DisplayContext
+
+- (stable) public DisplayContext.Type type()
+- (stable) public int value()
+- (stable) public static final DisplayContext CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE
+- (stable) public static final DisplayContext CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE
+- (stable) public static final DisplayContext CAPITALIZATION_FOR_STANDALONE
+- (stable) public static final DisplayContext CAPITALIZATION_FOR_UI_LIST_OR_MENU
+- (stable) public static final DisplayContext CAPITALIZATION_NONE
+- (stable) public static final DisplayContext DIALECT_NAMES
+- (stable) public static final DisplayContext STANDARD_NAMES
+
+DisplayContext.Type
+
+- (stable) public static final DisplayContext.Type CAPITALIZATION
+- (stable) public static final DisplayContext.Type DIALECT_HANDLING
+
+LocaleDisplayNames
+
+- (stable) public abstract DisplayContext getContext(DisplayContext.Type)
+- (stable) public static LocaleDisplayNames getInstance(ULocale, DisplayContext...)
+
+TimeZoneFormat
+
+- (stable) public final java.lang.String formatOffsetISO8601Basic(int, boolean, boolean, boolean)
+- (stable) public final java.lang.String formatOffsetISO8601Extended(int, boolean, boolean, boolean)
+- (stable) public java.lang.String formatOffsetShortLocalizedGMT(int)
+- (stable) public int parseOffsetShortLocalizedGMT(java.lang.String, java.text.ParsePosition)
+
+TimeZoneFormat.GMTOffsetPatternType
+
+- (stable) public static final TimeZoneFormat.GMTOffsetPatternType NEGATIVE_H
+- (stable) public static final TimeZoneFormat.GMTOffsetPatternType POSITIVE_H
+
+TimeZoneFormat.Style
+
+- (stable) public static final TimeZoneFormat.Style EXEMPLAR_LOCATION
+- (stable) public static final TimeZoneFormat.Style ISO_BASIC_FIXED
+- (stable) public static final TimeZoneFormat.Style ISO_BASIC_FULL
+- (stable) public static final TimeZoneFormat.Style ISO_BASIC_LOCAL_FIXED
+- (stable) public static final TimeZoneFormat.Style ISO_BASIC_LOCAL_FULL
+- (stable) public static final TimeZoneFormat.Style ISO_BASIC_LOCAL_SHORT
+- (stable) public static final TimeZoneFormat.Style ISO_BASIC_SHORT
+- (stable) public static final TimeZoneFormat.Style ISO_EXTENDED_FIXED
+- (stable) public static final TimeZoneFormat.Style ISO_EXTENDED_FULL
+- (stable) public static final TimeZoneFormat.Style ISO_EXTENDED_LOCAL_FIXED
+- (stable) public static final TimeZoneFormat.Style ISO_EXTENDED_LOCAL_FULL
+- (stable) public static final TimeZoneFormat.Style LOCALIZED_GMT_SHORT
+- (stable) public static final TimeZoneFormat.Style ZONE_ID
+- (stable) public static final TimeZoneFormat.Style ZONE_ID_SHORT
+
+TimeZoneNames.NameType
+
+- (stable) public static final TimeZoneNames.NameType EXEMPLAR_LOCATION
+
-Added in ICU4J 53.0.1
+Added in ICU4J 53.1.0
Package com.ibm.icu.text
@@ -127,6 +276,8 @@ AlphabeticIndex.Bucket.LabelType
- (draft) public static enum RelativeDateTimeFormatter.AbsoluteUnit
- (draft) public static enum RelativeDateTimeFormatter.Direction
- (draft) public static enum RelativeDateTimeFormatter.RelativeUnit
+- (draft) public static enum SearchIterator.ElementComparisonType
+- (draft) public static enum SpoofChecker.RestrictionLevel
BreakIterator
- (draft) public static final int WORD_IDEO
@@ -140,6 +291,12 @@ BreakIterator
- (draft) public static final int WORD_NUMBER
- (draft) public static final int WORD_NUMBER_LIMIT
+Collator
+
+- (stable) public boolean equals(java.lang.Object)
+- (draft) public int getMaxVariable()
+- (draft) public Collator setMaxVariable(int)
+
DateFormat
- (draft) public boolean getBooleanAttribute(DateFormat.BooleanAttribute)
@@ -151,17 +308,25 @@ DateFormat
DateFormat.BooleanAttribute
+- (draft) public static final DateFormat.BooleanAttribute PARSE_ALLOW_NUMERIC
+- (draft) public static final DateFormat.BooleanAttribute PARSE_ALLOW_WHITESPACE
+- (draft) public static final DateFormat.BooleanAttribute PARSE_MULTIPLE_PATTERNS_FOR_MATCH
- (draft) public static final DateFormat.BooleanAttribute PARSE_PARTIAL_MATCH
+DateIntervalFormat
+
+- (draft) public TimeZone getTimeZone()
+- (draft) public void setTimeZone(TimeZone)
+
MeasureFormat
- (draft) public final boolean equals(java.lang.Object)
- (draft) public java.lang.StringBuffer format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)
-- (draft) public T extends java.lang.Appendable formatMeasures(T, java.text.FieldPosition, Measure...)
-- (draft) public java.lang.String formatMeasures(Measure...)
+- (draft) public final java.lang.String formatMeasures(Measure...)
+- (draft) public java.lang.StringBuilder formatMeasures(java.lang.StringBuilder, java.text.FieldPosition, Measure...)
- (draft) public static MeasureFormat getInstance(ULocale, MeasureFormat.FormatWidth)
- (draft) public static MeasureFormat getInstance(ULocale, MeasureFormat.FormatWidth, NumberFormat)
-- (draft) public ULocale getLocale()
+- (draft) public final ULocale getLocale()
- (draft) public NumberFormat getNumberFormat()
- (draft) public MeasureFormat.FormatWidth getWidth()
- (draft) public final int hashCode()
@@ -176,6 +341,7 @@ MeasureFormat.FormatWidth
NumberFormat
+- (draft) public static final int ACCOUNTINGCURRENCYSTYLE
- (draft) public DisplayContext getContext(DisplayContext.Type)
- (draft) public void setContext(DisplayContext)
@@ -213,19 +379,46 @@ RelativeDateTimeFormatter.RelativeUnit
- (draft) public static final RelativeDateTimeFormatter.RelativeUnit WEEKS
- (draft) public static final RelativeDateTimeFormatter.RelativeUnit YEARS
-TimeUnitFormat
+RuleBasedCollator
-- (draft) public java.lang.Object clone()
-- (draft) public T extends java.lang.Appendable formatMeasures(T, java.text.FieldPosition, Measure...)
-- (draft) public java.lang.String formatMeasures(Measure...)
-- (draft) public ULocale getLocale()
-- (draft) public NumberFormat getNumberFormat()
-- (draft) public MeasureFormat.FormatWidth getWidth()
+- (stable) public int getDecomposition()
+- (draft) public ULocale getLocale(ULocale.Type)
+- (draft) public int getMaxVariable()
+- (stable) public int getStrength()
+- (stable) public void setDecomposition(int)
+- (draft) public RuleBasedCollator setMaxVariable(int)
+
+RuleBasedNumberFormat
+
+- (draft) public void setContext(DisplayContext)
+
+SearchIterator
+
+- (draft) public SearchIterator.ElementComparisonType getElementComparisonType()
+- (draft) public void setElementComparisonType(SearchIterator.ElementComparisonType)
+
+SearchIterator.ElementComparisonType
+
+- (draft) public static final SearchIterator.ElementComparisonType ANY_BASE_WEIGHT_IS_WILDCARD
+- (draft) public static final SearchIterator.ElementComparisonType PATTERN_BASE_WEIGHT_IS_WILDCARD
+- (draft) public static final SearchIterator.ElementComparisonType STANDARD_ELEMENT_COMPARISON
+
+SpoofChecker.RestrictionLevel
+
+- (draft) public static final SpoofChecker.RestrictionLevel ASCII
+- (draft) public static final SpoofChecker.RestrictionLevel HIGHLY_RESTRICTIVE
+- (draft) public static final SpoofChecker.RestrictionLevel MINIMALLY_RESTRICTIVE
+- (draft) public static final SpoofChecker.RestrictionLevel MODERATELY_RESTRICTIVE
+- (draft) public static final SpoofChecker.RestrictionLevel SINGLE_SCRIPT_RESTRICTIVE
+- (draft) public static final SpoofChecker.RestrictionLevel UNRESTRICTIVE
Package com.ibm.icu.util
+- (draft) public class ICUCloneNotSupportedException
+- (draft) public class ICUException
+- (draft) public class ICUUncheckedIOException
MeasureUnit
- (draft) public static final MeasureUnit ACRE
@@ -290,6 +483,6 @@ ULocale
-Contents generated by ReportAPI tool on Mon Jan 20 12:34:51 EST 2014
Copyright (C) 2014, International Business Machines Corporation, All Rights Reserved.
+Contents generated by ReportAPI tool on Thu Mar 13 00:18:26 EDT 2014
Copyright (C) 2014, International Business Machines Corporation, All Rights Reserved.
diff --git a/icu4j/main/classes/collate/src/com/ibm/icu/text/AlphabeticIndex.java b/icu4j/main/classes/collate/src/com/ibm/icu/text/AlphabeticIndex.java
index 60e4bfb87d..dd3804dd31 100644
--- a/icu4j/main/classes/collate/src/com/ibm/icu/text/AlphabeticIndex.java
+++ b/icu4j/main/classes/collate/src/com/ibm/icu/text/AlphabeticIndex.java
@@ -164,8 +164,7 @@ public final class AlphabeticIndex implements Iterable> {
*
* @param The Record value type is unused. It can be omitted for this class
* if it was omitted for the AlphabeticIndex that built it.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public static final class ImmutableIndex implements Iterable> {
private final BucketList buckets;
@@ -180,8 +179,7 @@ public final class AlphabeticIndex implements Iterable> {
* Returns the number of index buckets and labels, including underflow/inflow/overflow.
*
* @return the number of index buckets
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public int getBucketCount() {
return buckets.getBucketCount();
@@ -193,8 +191,7 @@ public final class AlphabeticIndex implements Iterable> {
*
* @param name the string to be sorted into an index bucket
* @return the bucket number for the name
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public int getBucketIndex(CharSequence name) {
return buckets.getBucketIndex(name, collatorPrimaryOnly);
@@ -205,8 +202,7 @@ public final class AlphabeticIndex implements Iterable> {
*
* @param index bucket number
* @return the index-th bucket
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public Bucket getBucket(int index) {
if (0 <= index && index < buckets.getBucketCount()) {
@@ -218,8 +214,7 @@ public final class AlphabeticIndex implements Iterable> {
/**
* {@inheritDoc}
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public Iterator> iterator() {
return buckets.iterator();
@@ -259,8 +254,7 @@ public final class AlphabeticIndex implements Iterable> {
* collator provided to the AlphabeticIndex remains unchanged after creation of the index.
*
* @param collator The collator to use to order the contents of this index.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public AlphabeticIndex(RuleBasedCollator collator) {
this(null, collator);
@@ -615,8 +609,7 @@ public final class AlphabeticIndex implements Iterable> {
* Builds an immutable, thread-safe version of this instance, without data records.
*
* @return an immutable index instance
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public ImmutableIndex buildImmutableIndex() {
// The current AlphabeticIndex Java code never modifies the bucket list once built.
diff --git a/icu4j/main/classes/collate/src/com/ibm/icu/text/RuleBasedCollator.java b/icu4j/main/classes/collate/src/com/ibm/icu/text/RuleBasedCollator.java
index 72f24e8c0b..9b52715771 100644
--- a/icu4j/main/classes/collate/src/com/ibm/icu/text/RuleBasedCollator.java
+++ b/icu4j/main/classes/collate/src/com/ibm/icu/text/RuleBasedCollator.java
@@ -1431,6 +1431,7 @@ public final class RuleBasedCollator extends Collator {
/**
* {@inheritDoc}
+ * @stable ICU 2.8
*/
@Override
public boolean equals(Object obj) {
@@ -1868,6 +1869,8 @@ public final class RuleBasedCollator extends Collator {
/**
* {@inheritDoc}
+ * @draft ICU 53 (retain)
+ * @provisional This API might change or be removed in a future release.
*/
@Override
public ULocale getLocale(ULocale.Type type) {
diff --git a/icu4j/main/classes/collate/src/com/ibm/icu/text/StringSearch.java b/icu4j/main/classes/collate/src/com/ibm/icu/text/StringSearch.java
index c106297364..302cfdf337 100644
--- a/icu4j/main/classes/collate/src/com/ibm/icu/text/StringSearch.java
+++ b/icu4j/main/classes/collate/src/com/ibm/icu/text/StringSearch.java
@@ -118,22 +118,12 @@ import com.ibm.icu.util.ULocale;
* @see SearchIterator
* @see RuleBasedCollator
* @author Laura Werner, synwee
- * @since ICU 2.0
+ * @stable ICU 2.0
*/
// internal notes: all methods do not guarantee the correct status of the
// characteriterator. the caller has to maintain the original index position
// if necessary. methods could change the index position as it deems fit
public final class StringSearch extends SearchIterator {
-
- /**
- * DONE is returned by {@link #previous()} and {@link #next()} after all valid matches have
- * been returned, and by {@link SearchIterator#first() first()} and
- * {@link SearchIterator#last() last()} if there are no matches at all.
- * @see #previous
- * @see #next
- * @stable ICU 2.0
- */
- public static final int DONE = -1;
private Pattern pattern_;
private RuleBasedCollator collator_;
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/lang/UScript.java b/icu4j/main/classes/core/src/com/ibm/icu/lang/UScript.java
index 8e5b1cb1d2..198e93de74 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/lang/UScript.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/lang/UScript.java
@@ -1360,44 +1360,37 @@ public final class UScript {
* See UAX #31 Unicode Identifier and Pattern Syntax.
* http://www.unicode.org/reports/tr31/#Table_Candidate_Characters_for_Exclusion_from_Identifiers
*
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public enum ScriptUsage {
/**
* Not encoded in Unicode.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
NOT_ENCODED,
/**
* Unknown script usage.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
UNKNOWN,
/**
* Candidate for Exclusion from Identifiers.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
EXCLUDED,
/**
* Limited Use script.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
LIMITED_USE,
/**
* Aspirational Use script.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
ASPIRATIONAL,
/**
* Recommended script.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
RECOMMENDED
}
@@ -1410,8 +1403,7 @@ public final class UScript {
*
* @param script script code
* @return the sample character string
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public static final String getSampleString(int script) {
int sampleChar = ScriptMetadata.getScriptProps(script) & 0x1fffff;
@@ -1428,8 +1420,7 @@ public final class UScript {
* @param script script code
* @return script usage
* @see ScriptUsage
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public static final ScriptUsage getUsage(int script) {
return usageValues[(ScriptMetadata.getScriptProps(script) >> 21) & 7];
@@ -1441,8 +1432,7 @@ public final class UScript {
*
* @param script script code
* @return true if the script is right-to-left
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public static final boolean isRightToLeft(int script) {
return (ScriptMetadata.getScriptProps(script) & ScriptMetadata.RTL) != 0;
@@ -1455,8 +1445,7 @@ public final class UScript {
*
* @param script script code
* @return true if the script allows line breaks between letters
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public static final boolean breaksBetweenLetters(int script) {
return (ScriptMetadata.getScriptProps(script) & ScriptMetadata.LB_LETTERS) != 0;
@@ -1468,8 +1457,7 @@ public final class UScript {
*
* @param script script code
* @return true if the script is cased
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public static final boolean isCased(int script) {
return (ScriptMetadata.getScriptProps(script) & ScriptMetadata.CASED) != 0;
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/CompactDecimalFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/CompactDecimalFormat.java
index ab9b770851..2fd8804d82 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/CompactDecimalFormat.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/CompactDecimalFormat.java
@@ -66,20 +66,17 @@ public class CompactDecimalFormat extends DecimalFormat {
/**
* Style parameter for CompactDecimalFormat.
- * @draft ICU 50
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 50
*/
public enum CompactStyle {
/**
* Short version, like "1.2T"
- * @draft ICU 50
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 50
*/
SHORT,
/**
* Longer version, like "1.2 trillion", if available. May return same result as SHORT if not.
- * @draft ICU 50
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 50
*/
LONG
}
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/CurrencyFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/CurrencyFormat.java
index 7ce3daec84..fcf1b641da 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/CurrencyFormat.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/CurrencyFormat.java
@@ -45,8 +45,7 @@ class CurrencyFormat extends MeasureFormat {
}
/**
- * @draft ICU 53
- * @provisional
+ * {@inheritDoc}
*/
@Override
public Object clone() {
@@ -82,8 +81,7 @@ class CurrencyFormat extends MeasureFormat {
// MeasureFormat
/**
- * @draft ICU 53
- * @provisional
+ * {@inheritDoc}
*/
@Override
public StringBuilder formatMeasures(
@@ -92,8 +90,7 @@ class CurrencyFormat extends MeasureFormat {
}
/**
- * @draft ICU 53
- * @provisional
+ * {@inheritDoc}
*/
@Override
public MeasureFormat.FormatWidth getWidth() {
@@ -101,8 +98,7 @@ class CurrencyFormat extends MeasureFormat {
}
/**
- * @draft ICU 53
- * @provisional
+ * {@inheritDoc}
*/
@Override
public NumberFormat getNumberFormat() {
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/CurrencyMetaInfo.java b/icu4j/main/classes/core/src/com/ibm/icu/text/CurrencyMetaInfo.java
index 12d80785ff..efe8a04021 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/CurrencyMetaInfo.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/CurrencyMetaInfo.java
@@ -190,8 +190,7 @@ public class CurrencyMetaInfo {
/**
* Returns a filter that accepts all currencies in use on the given date.
* @param date the date as milliseconds after Jan 1, 1970
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public static CurrencyFilter onDate(long date) {
return ALL.withDate(date);
@@ -205,8 +204,7 @@ public class CurrencyMetaInfo {
* Measured in milliseconds since Jan 1, 1970 GMT.
* @param to The date on or before which a currency must have been in use.
* Measured in milliseconds since Jan 1, 1970 GMT.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public static CurrencyFilter onDateRange(long from, long to) {
return ALL.withDateRange(from, to);
@@ -215,8 +213,7 @@ public class CurrencyMetaInfo {
/**
* Returns a CurrencyFilter for finding currencies that were either once used,
* are used, or will be used as tender.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public static CurrencyFilter onTender() {
return ALL.withTender();
@@ -275,8 +272,7 @@ public class CurrencyMetaInfo {
* Returns a copy of this filter that accepts all currencies in use on
* the given date.
* @param date the date as milliseconds after Jan 1, 1970
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public CurrencyFilter withDate(long date) {
return new CurrencyFilter(this.region, this.currency, date, date, this.tenderOnly);
@@ -290,8 +286,7 @@ public class CurrencyMetaInfo {
* Measured in milliseconds since Jan 1, 1970 GMT.
* @param to The date on or before which a currency must have been in use.
* Measured in milliseconds since Jan 1, 1970 GMT.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public CurrencyFilter withDateRange(long from, long to) {
return new CurrencyFilter(this.region, this.currency, from, to, this.tenderOnly);
@@ -300,8 +295,7 @@ public class CurrencyMetaInfo {
/**
* Returns a copy of this filter that filters for currencies that were
* either once used, are used, or will be used as tender.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public CurrencyFilter withTender() {
return new CurrencyFilter(this.region, this.currency, this.from, this.to, true);
@@ -491,8 +485,7 @@ public class CurrencyMetaInfo {
/**
* Determine whether or not this currency was once used, is used,
* or will be used as tender in this region.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public boolean isTender() {
return tender;
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/DateFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/DateFormat.java
index fe00e31de7..f3e9dd5b0f 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/DateFormat.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/DateFormat.java
@@ -414,8 +414,7 @@ public abstract class DateFormat extends UFormat {
* corresponding to the {@link Calendar#ZONE_OFFSET} and
* {@link Calendar#DST_OFFSET} fields. This displays the
* localized GMT format.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public final static int TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD = 31;
@@ -424,8 +423,7 @@ public abstract class DateFormat extends UFormat {
* corresponding to the {@link Calendar#ZONE_OFFSET} and
* {@link Calendar#DST_OFFSET} fields. This displays the
* ISO 8601 local time offset format or UTC indicator ("Z").
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public final static int TIMEZONE_ISO_FIELD = 32;
@@ -434,8 +432,7 @@ public abstract class DateFormat extends UFormat {
* corresponding to the {@link Calendar#ZONE_OFFSET} and
* {@link Calendar#DST_OFFSET} fields. This displays the
* ISO 8601 local time offset format.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public final static int TIMEZONE_ISO_LOCAL_FIELD = 33;
@@ -452,28 +449,33 @@ public abstract class DateFormat extends UFormat {
* boolean attributes
*
* @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
public enum BooleanAttribute {
/**
* indicates whitespace tolerance. Also included is trailing dot tolerance.
* @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
PARSE_ALLOW_WHITESPACE,
/**
* indicates tolerance of numeric data when String data may be assumed.
* e.g. YEAR_NAME_FIELD
* @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
PARSE_ALLOW_NUMERIC,
/**
* indicates tolerance of pattern mismatch between input data and specified format pattern.
* e.g. accepting "September" for a month pattern of MMM ("Sep")
* @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
PARSE_MULTIPLE_PATTERNS_FOR_MATCH,
/**
* indicates tolerance of a partial literal match
* @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
PARSE_PARTIAL_MATCH
};
@@ -1535,7 +1537,8 @@ public abstract class DateFormat extends UFormat {
* inputs must match this object's format more closely.
* @param lenient when true, Calendar parsing is lenient
* @see com.ibm.icu.util.Calendar#setLenient
- * @draft ICU 53
+ * @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
public void setCalendarLenient(boolean lenient)
{
@@ -1545,7 +1548,8 @@ public abstract class DateFormat extends UFormat {
/**
* Returns whether date/time parsing in the encapsulated Calendar object is lenient.
- * @draft ICU 53
+ * @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
public boolean isCalendarLenient()
{
@@ -1558,6 +1562,7 @@ public abstract class DateFormat extends UFormat {
*
* @see BooleanAttribute
* @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
public DateFormat setBooleanAttribute(BooleanAttribute key, boolean value)
{
@@ -1580,6 +1585,7 @@ public abstract class DateFormat extends UFormat {
*
* @see BooleanAttribute
* @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
public boolean getBooleanAttribute(BooleanAttribute key)
{
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/DateFormatSymbols.java b/icu4j/main/classes/core/src/com/ibm/icu/text/DateFormatSymbols.java
index b2b8e1176e..5bef298197 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/DateFormatSymbols.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/DateFormatSymbols.java
@@ -125,8 +125,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
/**
* {@icu} Constant for width; only supported for weekdays.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public static final int SHORT = 3;
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 c5612f2266..063f14c7e1 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
@@ -876,6 +876,7 @@ public class DateIntervalFormat extends UFormat {
* Get the TimeZone
* @return A copy of the TimeZone associated with this date interval formatter.
* @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
public TimeZone getTimeZone()
{
@@ -894,6 +895,7 @@ public class DateIntervalFormat extends UFormat {
* Set the TimeZone for the calendar used by this DateIntervalFormat object.
* @param zone The new TimeZone, will be cloned for use by this DateIntervalFormat.
* @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
public void setTimeZone(TimeZone zone)
{
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java
index 799ecf5cb6..fd9dba8172 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/DecimalFormat.java
@@ -5284,8 +5284,7 @@ public class DecimalFormat extends NumberFormat {
* If the limit is set too high, an OutOfMemoryException may be triggered.
* The default value is 1000.
* @param newValue the new limit
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public void setParseMaxDigits(int newValue) {
if (newValue > 0) {
@@ -5296,9 +5295,8 @@ public class DecimalFormat extends NumberFormat {
/**
* Get the current maximum number of exponent digits when parsing a
* number.
- *
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @return the maximum number of exponent digits for parsing
+ * @stable ICU 51
*/
public int getParseMaxDigits() {
return PARSE_MAX_EXPONENT;
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/DisplayContext.java b/icu4j/main/classes/core/src/com/ibm/icu/text/DisplayContext.java
index ca2463a17e..9ac06c3727 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/DisplayContext.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/DisplayContext.java
@@ -1,6 +1,6 @@
/*
*******************************************************************************
- * Copyright (C) 2012, International Business Machines Corporation and *
+ * Copyright (C) 2012-2014, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@@ -9,8 +9,7 @@ package com.ibm.icu.text;
/**
* Display context settings.
* Note, the specific numeric values are internal and may change.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public enum DisplayContext {
/**
@@ -21,16 +20,14 @@ public enum DisplayContext {
* A possible setting for DIALECT_HANDLING:
* use standard names when generating a locale name,
* e.g. en_GB displays as 'English (United Kingdom)'.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
STANDARD_NAMES(Type.DIALECT_HANDLING, 0),
/**
* A possible setting for DIALECT_HANDLING:
* use dialect names, when generating a locale name,
* e.g. en_GB displays as 'British English'.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
DIALECT_NAMES(Type.DIALECT_HANDLING, 1),
/**
@@ -40,32 +37,28 @@ public enum DisplayContext {
/**
* A possible setting for CAPITALIZATION:
* The capitalization context to be used is unknown (this is the default value).
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
CAPITALIZATION_NONE(Type.CAPITALIZATION, 0),
/**
* A possible setting for CAPITALIZATION:
* The capitalization context if a date, date symbol or display name is to be
* formatted with capitalization appropriate for the middle of a sentence.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE(Type.CAPITALIZATION, 1),
/**
* A possible setting for CAPITALIZATION:
* The capitalization context if a date, date symbol or display name is to be
* formatted with capitalization appropriate for the beginning of a sentence.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE(Type.CAPITALIZATION, 2),
/**
* A possible setting for CAPITALIZATION:
* The capitalization context if a date, date symbol or display name is to be
* formatted with capitalization appropriate for a user-interface list or menu item.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
CAPITALIZATION_FOR_UI_LIST_OR_MENU(Type.CAPITALIZATION, 3),
/**
@@ -73,28 +66,24 @@ public enum DisplayContext {
* The capitalization context if a date, date symbol or display name is to be
* formatted with capitalization appropriate for stand-alone usage such as an
* isolated name on a calendar page.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
CAPITALIZATION_FOR_STANDALONE(Type.CAPITALIZATION, 4);
/**
* Type values for DisplayContext
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public enum Type {
/**
* DIALECT_HANDLING can be set to STANDARD_NAMES or DIALECT_NAMES.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
DIALECT_HANDLING,
/**
* CAPITALIZATION can be set to one of CAPITALIZATION_NONE through
* CAPITALIZATION_FOR_STANDALONE.
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
CAPITALIZATION
}
@@ -108,8 +97,7 @@ public enum DisplayContext {
/**
* Get the Type part of the enum item
* (e.g. CAPITALIZATION)
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public Type type() {
return type;
@@ -117,8 +105,7 @@ public enum DisplayContext {
/**
* Get the value part of the enum item
* (e.g. CAPITALIZATION_FOR_STANDALONE)
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public int value() {
return value;
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 9004aef1c6..c570752c3e 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
@@ -27,8 +27,7 @@ import com.ibm.icu.util.UResourceBundle;
* separately). The class is not subclassable.
*
* @author Mark Davis
- * @draft ICU 50
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 50
*/
final public class ListFormatter {
private final SimplePatternFormatter two;
@@ -133,8 +132,7 @@ final public class ListFormatter {
* @param locale
* the locale in question.
* @return ListFormatter
- * @draft ICU 50
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 50
*/
public static ListFormatter getInstance(ULocale locale) {
return getInstance(locale, Style.STANDARD);
@@ -146,8 +144,7 @@ final public class ListFormatter {
* @param locale
* the locale in question.
* @return ListFormatter
- * @draft ICU 50
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 50
*/
public static ListFormatter getInstance(Locale locale) {
return getInstance(ULocale.forLocale(locale), Style.STANDARD);
@@ -171,8 +168,7 @@ final public class ListFormatter {
* Create a list formatter that is appropriate for the default FORMAT locale.
*
* @return ListFormatter
- * @draft ICU 50
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 50
*/
public static ListFormatter getInstance() {
return getInstance(ULocale.getDefault(ULocale.Category.FORMAT));
@@ -184,8 +180,7 @@ final public class ListFormatter {
* @param items
* items to format. The toString() method is called on each.
* @return items formatted into a string
- * @draft ICU 50
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 50
*/
public String format(Object... items) {
return format(Arrays.asList(items));
@@ -197,8 +192,7 @@ final public class ListFormatter {
* @param items
* items to format. The toString() method is called on each.
* @return items formatted into a string
- * @draft ICU 50
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 50
*/
public String format(Collection> items) {
// TODO optimize this for the common case that the patterns are all of the
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/LocaleDisplayNames.java b/icu4j/main/classes/core/src/com/ibm/icu/text/LocaleDisplayNames.java
index 9e12fb4a00..7c53b2a68e 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/LocaleDisplayNames.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/LocaleDisplayNames.java
@@ -68,8 +68,7 @@ public abstract class LocaleDisplayNames {
* @param contexts one or more context settings (e.g. for dialect
* handling, capitalization, etc.
* @return a LocaleDisplayNames instance
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public static LocaleDisplayNames getInstance(ULocale locale, DisplayContext... contexts) {
return LocaleDisplayNamesImpl.getInstance(locale, contexts);
@@ -95,8 +94,7 @@ public abstract class LocaleDisplayNames {
* Returns the current value for a specified DisplayContext.Type.
* @param type the DisplayContext.Type whose value to return
* @return the current DisplayContext setting for the specified type
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public abstract DisplayContext getContext(DisplayContext.Type type);
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 17e587fbe2..c399a6e086 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
@@ -148,7 +148,7 @@ public class MeasureFormat extends UFormat {
* Formatting width enum.
*
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
// Be sure to update MeasureUnitTest.TestSerialFormatWidthEnum
// when adding an enum value.
@@ -158,7 +158,7 @@ public class MeasureFormat extends UFormat {
* Spell out everything.
*
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
WIDE("units", ListFormatter.Style.DURATION, NumberFormat.PLURALCURRENCYSTYLE),
@@ -166,7 +166,7 @@ public class MeasureFormat extends UFormat {
* Abbreviate when possible.
*
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
SHORT("unitsShort", ListFormatter.Style.DURATION_SHORT, NumberFormat.ISOCURRENCYSTYLE),
@@ -174,7 +174,7 @@ public class MeasureFormat extends UFormat {
* Brief. Use only a symbol for the unit when possible.
*
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
NARROW("unitsNarrow", ListFormatter.Style.DURATION_NARROW, NumberFormat.CURRENCYSTYLE),
@@ -184,7 +184,7 @@ public class MeasureFormat extends UFormat {
* In these cases formatMeasures formats as 5:37:23 instead of 5h, 37m, 23s.
*
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
NUMERIC("unitsNarrow", ListFormatter.Style.DURATION_NARROW, NumberFormat.CURRENCYSTYLE);
@@ -217,7 +217,7 @@ public class MeasureFormat extends UFormat {
* @param formatWidth hints how long formatted strings should be.
* @return The new MeasureFormat object.
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public static MeasureFormat getInstance(ULocale locale, FormatWidth formatWidth) {
return getInstance(locale, formatWidth, NumberFormat.getInstance(locale));
@@ -231,7 +231,7 @@ public class MeasureFormat extends UFormat {
* @param format This is defensively copied.
* @return The new MeasureFormat object.
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public static MeasureFormat getInstance(ULocale locale, FormatWidth formatWidth, NumberFormat format) {
PluralRules rules = PluralRules.forLocale(locale);
@@ -282,7 +282,7 @@ public class MeasureFormat extends UFormat {
* @see java.text.Format#format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)
*
* @draft ICU53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
@Override
public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
@@ -315,10 +315,11 @@ public class MeasureFormat extends UFormat {
}
/**
+ * Parses text from a string to produce a Measure
.
* @see java.text.Format#parseObject(java.lang.String, java.text.ParsePosition)
* @throws UnsupportedOperationException Not supported.
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
@Override
public Measure parseObject(String source, ParsePosition pos) {
@@ -337,7 +338,7 @@ public class MeasureFormat extends UFormat {
* @param measures a sequence of one or more measures.
* @return the formatted string.
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public final String formatMeasures(Measure... measures) {
return formatMeasures(
@@ -359,7 +360,7 @@ public class MeasureFormat extends UFormat {
* @return appendTo.
* @see MeasureFormat#formatMeasures(Measure...)
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public StringBuilder formatMeasures(
StringBuilder appendTo, FieldPosition fieldPosition, Measure... measures) {
@@ -400,7 +401,7 @@ public class MeasureFormat extends UFormat {
* Two MeasureFormats, a and b, are equal if and only if they have the same formatWidth,
* locale, and equal number formats.
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
@Override
public final boolean equals(Object other) {
@@ -418,8 +419,9 @@ public class MeasureFormat extends UFormat {
}
/**
+ * {@inheritDoc}
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
@Override
public final int hashCode() {
@@ -431,7 +433,7 @@ public class MeasureFormat extends UFormat {
/**
* Get the format width this instance is using.
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public MeasureFormat.FormatWidth getWidth() {
return formatWidth;
@@ -440,7 +442,7 @@ public class MeasureFormat extends UFormat {
/**
* Get the locale of this instance.
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public final ULocale getLocale() {
return getLocale(ULocale.VALID_LOCALE);
@@ -449,7 +451,7 @@ public class MeasureFormat extends UFormat {
/**
* Get a copy of the number format.
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public NumberFormat getNumberFormat() {
return numberFormat.get();
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 c0e78f6f5a..f393b0e458 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
@@ -1,6 +1,6 @@
/*
*******************************************************************************
- * Copyright (C) 2013, International Business Machines Corporation and *
+ * Copyright (C) 2013-2014, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@@ -60,7 +60,7 @@ import com.ibm.icu.util.UResourceBundle;
* (3 secs ago), and relative day periods ("yesterday afternoon"), etc.
*
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public final class RelativeDateTimeFormatter {
@@ -68,56 +68,56 @@ public final class RelativeDateTimeFormatter {
* Represents the unit for formatting a relative date. e.g "in 5 days"
* or "in 3 months"
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public static enum RelativeUnit {
/**
* Seconds
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
SECONDS,
/**
* Minutes
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
MINUTES,
/**
* Hours
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
HOURS,
/**
* Days
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
DAYS,
/**
* Weeks
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
WEEKS,
/**
* Months
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
MONTHS,
/**
* Years
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
YEARS,
}
@@ -125,91 +125,91 @@ public final class RelativeDateTimeFormatter {
/**
* Represents an absolute unit.
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public static enum AbsoluteUnit {
/**
* Sunday
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
SUNDAY,
/**
* Monday
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
MONDAY,
/**
* Tuesday
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
TUESDAY,
/**
* Wednesday
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
WEDNESDAY,
/**
* Thursday
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
THURSDAY,
/**
* Friday
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
FRIDAY,
/**
* Saturday
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
SATURDAY,
/**
* Day
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
DAY,
/**
* Week
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
WEEK,
/**
* Month
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
MONTH,
/**
* Year
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
YEAR,
/**
* Now
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
NOW,
}
@@ -218,14 +218,14 @@ public final class RelativeDateTimeFormatter {
* Represents a direction for an absolute unit e.g "Next Tuesday"
* or "Last Tuesday"
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public static enum Direction {
/**
* Two before. Not fully supported in every locale
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
LAST_2,
@@ -233,35 +233,35 @@ public final class RelativeDateTimeFormatter {
/**
* Last
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
LAST,
/**
* This
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
THIS,
/**
* Next
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
NEXT,
/**
* Two after. Not fully supported in every locale
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
NEXT_2,
/**
* Plain, which means the absence of a qualifier
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
PLAIN;
}
@@ -269,7 +269,7 @@ public final class RelativeDateTimeFormatter {
/**
* Returns a RelativeDateTimeFormatter for the default locale.
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public static RelativeDateTimeFormatter getInstance() {
return getInstance(ULocale.getDefault());
@@ -280,7 +280,7 @@ public final class RelativeDateTimeFormatter {
*
* @param locale the locale.
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public static RelativeDateTimeFormatter getInstance(ULocale locale) {
RelativeDateTimeFormatterData data = cache.get(locale);
@@ -300,7 +300,7 @@ public final class RelativeDateTimeFormatter {
* @param nf the number format object. It is defensively copied to ensure thread-safety
* and immutability of this class.
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public static RelativeDateTimeFormatter getInstance(ULocale locale, NumberFormat nf) {
RelativeDateTimeFormatterData data = cache.get(locale);
@@ -324,7 +324,7 @@ public final class RelativeDateTimeFormatter {
* @throws IllegalArgumentException if direction is something other than
* NEXT or LAST.
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public String format(double quantity, Direction direction, RelativeUnit unit) {
if (direction != Direction.LAST && direction != Direction.NEXT) {
@@ -349,7 +349,7 @@ public final class RelativeDateTimeFormatter {
* @throws IllegalArgumentException if the direction is incompatible with
* unit this can occur with NOW which can only take PLAIN.
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public String format(Direction direction, AbsoluteUnit unit) {
if (unit == AbsoluteUnit.NOW && direction != Direction.PLAIN) {
@@ -367,7 +367,7 @@ public final class RelativeDateTimeFormatter {
* @return the date and time concatenated according to the default
* calendar in this locale e.g 'yesterday, 3:45'
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public String combineDateAndTime(String relativeDateString, String timeString) {
return this.combinedDateAndTime.format(
@@ -378,7 +378,7 @@ public final class RelativeDateTimeFormatter {
* Returns a copy of the NumberFormat this object is using.
*
* @draft ICU 53
- * @provisional
+ * @provisional This API might change or be removed in a future release.
*/
public NumberFormat getNumberFormat() {
// This class is thread-safe, yet numberFormat is not. To ensure thread-safety of this
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 b88e66f2c9..2fe4361ec8 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
@@ -147,32 +147,37 @@ public class SpoofChecker {
/**
* Constants from UAX 31 for use in setRestrictionLevel.
* @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
public enum RestrictionLevel {
/**
* Only ASCII characters: U+0000..U+007F
*
* @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
ASCII,
/**
* All characters in each identifier must be from a single script.
*
* @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
- SINGLE_SCRIPT_RESTRICTIVE,
+ SINGLE_SCRIPT_RESTRICTIVE,
/**
* All characters in each identifier must be from a single script, or from the combinations: Latin + Han +
* Hiragana + Katakana; Latin + Han + Bopomofo; or Latin + Han + Hangul. Note that this level will satisfy the
* vast majority of Latin-script users; also that TR36 has ASCII instead of Latin.
*
* @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
HIGHLY_RESTRICTIVE,
/**
* Allow Latin with other scripts except Cyrillic, Greek, Cherokee Otherwise, the same as Highly Restrictive
*
* @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
MODERATELY_RESTRICTIVE,
/**
@@ -180,12 +185,14 @@ public class SpoofChecker {
* Moderately Restrictive
*
* @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
MINIMALLY_RESTRICTIVE,
/**
* Any valid identifiers, including characters outside of the Identifier Profile, such as I♥NY.org
*
* @draft ICU 53
+ * @provisional This API might change or be removed in a future release.
*/
UNRESTRICTIVE
}
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/TimeUnitFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/TimeUnitFormat.java
index 5ebaaba590..7b63d11857 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/TimeUnitFormat.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/TimeUnitFormat.java
@@ -65,14 +65,16 @@ public class TimeUnitFormat extends MeasureFormat {
/**
* Constant for full name style format.
* For example, the full name for "hour" in English is "hour" or "hours".
- * @stable ICU 4.2
+ * @deprecated ICU 53 see {@link MeasureFormat.FormatWidth}
*/
+ @Deprecated
public static final int FULL_NAME = 0;
/**
* Constant for abbreviated name style format.
* For example, the abbreviated name for "hour" in English is "hr" or "hrs".
- * @stable ICU 4.2
+ * @deprecated ICU 53 see {@link MeasureFormat.FormatWidth}
*/
+ @Deprecated
public static final int ABBREVIATED_NAME = 1;
private static final int TOTAL_STYLES = 2;
@@ -107,8 +109,9 @@ public class TimeUnitFormat extends MeasureFormat {
/**
* Create empty format using full name style, for example, "hours".
* Use setLocale and/or setFormat to modify.
- * @stable ICU 4.0
+ * @deprecated ICU 53 use {@link MeasureFormat} instead.
*/
+ @Deprecated
public TimeUnitFormat() {
mf = MeasureFormat.getInstance(ULocale.getDefault(), FormatWidth.WIDE);
isReady = false;
@@ -118,8 +121,9 @@ public class TimeUnitFormat extends MeasureFormat {
/**
* Create TimeUnitFormat given a ULocale, and using full name style.
* @param locale locale of this time unit formatter.
- * @stable ICU 4.0
+ * @deprecated ICU 53 use {@link MeasureFormat} instead.
*/
+ @Deprecated
public TimeUnitFormat(ULocale locale) {
this(locale, FULL_NAME);
}
@@ -127,8 +131,9 @@ public class TimeUnitFormat extends MeasureFormat {
/**
* Create TimeUnitFormat given a Locale, and using full name style.
* @param locale locale of this time unit formatter.
- * @stable ICU 4.0
+ * @deprecated ICU 53 use {@link MeasureFormat} instead.
*/
+ @Deprecated
public TimeUnitFormat(Locale locale) {
this(locale, FULL_NAME);
}
@@ -139,8 +144,9 @@ public class TimeUnitFormat extends MeasureFormat {
* @param style format style, either FULL_NAME or ABBREVIATED_NAME style.
* @throws IllegalArgumentException if the style is not FULL_NAME or
* ABBREVIATED_NAME style.
- * @stable ICU 4.2
+ * @deprecated ICU 53 use {@link MeasureFormat} instead.
*/
+ @Deprecated
public TimeUnitFormat(ULocale locale, int style) {
if (style < FULL_NAME || style >= TOTAL_STYLES) {
throw new IllegalArgumentException("style should be either FULL_NAME or ABBREVIATED_NAME style");
@@ -164,8 +170,9 @@ public class TimeUnitFormat extends MeasureFormat {
/**
* Create TimeUnitFormat given a Locale and a formatting style.
- * @stable ICU 4.2
+ * @deprecated ICU 53 use {@link MeasureFormat} instead.
*/
+ @Deprecated
public TimeUnitFormat(Locale locale, int style) {
this(ULocale.forLocale(locale), style);
}
@@ -174,8 +181,9 @@ public class TimeUnitFormat extends MeasureFormat {
* Set the locale used for formatting or parsing.
* @param locale locale of this time unit formatter.
* @return this, for chaining.
- * @stable ICU 4.0
+ * @deprecated ICU 53 see {@link MeasureFormat}.
*/
+ @Deprecated
public TimeUnitFormat setLocale(ULocale locale) {
if (locale != this.locale){
mf = mf.withLocale(locale);
@@ -192,8 +200,9 @@ public class TimeUnitFormat extends MeasureFormat {
* Set the locale used for formatting or parsing.
* @param locale locale of this time unit formatter.
* @return this, for chaining.
- * @stable ICU 4.0
+ * @deprecated ICU 53 see {@link MeasureFormat}.
*/
+ @Deprecated
public TimeUnitFormat setLocale(Locale locale) {
return setLocale(ULocale.forLocale(locale));
}
@@ -203,8 +212,9 @@ public class TimeUnitFormat extends MeasureFormat {
* {@link NumberFormat#getNumberInstance(ULocale)}.
* @param format the number formatter.
* @return this, for chaining.
- * @stable ICU 4.0
+ * @deprecated ICU 53 see {@link MeasureFormat}.
*/
+ @Deprecated
public TimeUnitFormat setNumberFormat(NumberFormat format) {
if (format == this.format) {
return this;
@@ -228,8 +238,9 @@ public class TimeUnitFormat extends MeasureFormat {
/**
* Format a TimeUnitAmount.
* @see java.text.Format#format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)
- * @stable ICU 4.0
+ * @deprecated ICU 53 see {@link MeasureFormat}.
*/
+ @Deprecated
public StringBuffer format(Object obj, StringBuffer toAppendTo,
FieldPosition pos) {
return mf.format(obj, toAppendTo, pos);
@@ -238,8 +249,9 @@ public class TimeUnitFormat extends MeasureFormat {
/**
* Parse a TimeUnitAmount.
* @see java.text.Format#parseObject(java.lang.String, java.text.ParsePosition)
- * @stable ICU 4.0
+ * @deprecated ICU 53 see {@link MeasureFormat}.
*/
+ @Deprecated
@Override
public TimeUnitAmount parseObject(String source, ParsePosition pos) {
if (!isReady) {
@@ -257,58 +269,58 @@ public class TimeUnitFormat extends MeasureFormat {
for (TimeUnit timeUnit : timeUnitToCountToPatterns.keySet()) {
Map countToPattern = timeUnitToCountToPatterns.get(timeUnit);
for (Entry patternEntry : countToPattern.entrySet()) {
- String count = patternEntry.getKey();
- for (int styl = FULL_NAME; styl < TOTAL_STYLES; ++styl) {
- MessageFormat pattern = (MessageFormat)(patternEntry.getValue())[styl];
- pos.setErrorIndex(-1);
- pos.setIndex(oldPos);
- // see if we can parse
- Object parsed = pattern.parseObject(source, pos);
- if ( pos.getErrorIndex() != -1 || pos.getIndex() == oldPos ) {
- // nothing parsed
- continue;
- }
- Number temp = null;
- if ( ((Object[])parsed).length != 0 ) {
- // pattern with Number as beginning,
- // such as "{0} d".
- // check to make sure that the timeUnit is consistent
- Object tempObj = ((Object[])parsed)[0];
- if (tempObj instanceof Number) {
- temp = (Number) tempObj;
- } else {
- // Since we now format the number ourselves, parseObject will likely give us back a String for
- // the number. When this happens we must parse the formatted number ourselves.
- try {
- temp = format.parse(tempObj.toString());
- } catch (ParseException e) {
- continue;
+ String count = patternEntry.getKey();
+ for (int styl = FULL_NAME; styl < TOTAL_STYLES; ++styl) {
+ MessageFormat pattern = (MessageFormat) (patternEntry.getValue())[styl];
+ pos.setErrorIndex(-1);
+ pos.setIndex(oldPos);
+ // see if we can parse
+ Object parsed = pattern.parseObject(source, pos);
+ if (pos.getErrorIndex() != -1 || pos.getIndex() == oldPos) {
+ // nothing parsed
+ continue;
+ }
+ Number temp = null;
+ if (((Object[]) parsed).length != 0) {
+ // pattern with Number as beginning,
+ // such as "{0} d".
+ // check to make sure that the timeUnit is consistent
+ Object tempObj = ((Object[]) parsed)[0];
+ if (tempObj instanceof Number) {
+ temp = (Number) tempObj;
+ } else {
+ // Since we now format the number ourselves, parseObject will likely give us back a String
+ // for
+ // the number. When this happens we must parse the formatted number ourselves.
+ try {
+ temp = format.parse(tempObj.toString());
+ } catch (ParseException e) {
+ continue;
+ }
}
}
- }
- int parseDistance = pos.getIndex() - oldPos;
- if ( parseDistance > longestParseDistance ) {
- resultNumber = temp;
- resultTimeUnit = timeUnit;
- newPos = pos.getIndex();
- longestParseDistance = parseDistance;
- countOfLongestMatch = count;
+ int parseDistance = pos.getIndex() - oldPos;
+ if (parseDistance > longestParseDistance) {
+ resultNumber = temp;
+ resultTimeUnit = timeUnit;
+ newPos = pos.getIndex();
+ longestParseDistance = parseDistance;
+ countOfLongestMatch = count;
+ }
}
}
- }
}
- /* After find the longest match, parse the number.
- * Result number could be null for the pattern without number pattern.
- * such as unit pattern in Arabic.
- * When result number is null, use plural rule to set the number.
+ /*
+ * After find the longest match, parse the number. Result number could be null for the pattern without number
+ * pattern. such as unit pattern in Arabic. When result number is null, use plural rule to set the number.
*/
if (resultNumber == null && longestParseDistance != 0) {
// set the number using plurrual count
- if ( countOfLongestMatch.equals("zero") ) {
+ if (countOfLongestMatch.equals("zero")) {
resultNumber = Integer.valueOf(0);
- } else if ( countOfLongestMatch.equals("one") ) {
+ } else if (countOfLongestMatch.equals("one")) {
resultNumber = Integer.valueOf(1);
- } else if ( countOfLongestMatch.equals("two") ) {
+ } else if (countOfLongestMatch.equals("two")) {
resultNumber = Integer.valueOf(2);
} else {
// should not happen.
@@ -348,180 +360,181 @@ public class TimeUnitFormat extends MeasureFormat {
isReady = true;
}
- private void setup(String resourceKey, Map> timeUnitToCountToPatterns,
- int style, Set pluralKeywords) {
-// fill timeUnitToCountToPatterns from resource file
-try {
- ICUResourceBundle resource = (ICUResourceBundle)UResourceBundle.getBundleInstance(ICUResourceBundle.ICU_BASE_NAME, locale);
- ICUResourceBundle unitsRes = resource.getWithFallback(resourceKey);
- int size = unitsRes.getSize();
- for ( int index = 0; index < size; ++index) {
- String timeUnitName = unitsRes.get(index).getKey();
- TimeUnit timeUnit = null;
- if ( timeUnitName.equals("year") ) {
- timeUnit = TimeUnit.YEAR;
- } else if ( timeUnitName.equals("month") ) {
- timeUnit = TimeUnit.MONTH;
- } else if ( timeUnitName.equals("day") ) {
- timeUnit = TimeUnit.DAY;
- } else if ( timeUnitName.equals("hour") ) {
- timeUnit = TimeUnit.HOUR;
- } else if ( timeUnitName.equals("minute") ) {
- timeUnit = TimeUnit.MINUTE;
- } else if ( timeUnitName.equals("second") ) {
- timeUnit = TimeUnit.SECOND;
- } else if ( timeUnitName.equals("week") ) {
- timeUnit = TimeUnit.WEEK;
- } else {
- continue;
- }
- ICUResourceBundle oneUnitRes = unitsRes.getWithFallback(timeUnitName);
- int count = oneUnitRes.getSize();
- Map countToPatterns = timeUnitToCountToPatterns.get(timeUnit);
- if (countToPatterns == null) {
- countToPatterns = new TreeMap();
- timeUnitToCountToPatterns.put(timeUnit, countToPatterns);
- }
- for ( int pluralIndex = 0; pluralIndex < count; ++pluralIndex) {
- String pluralCount = oneUnitRes.get(pluralIndex).getKey();
- if (!pluralKeywords.contains(pluralCount))
- continue;
- String pattern = oneUnitRes.get(pluralIndex).getString();
- final MessageFormat messageFormat = new MessageFormat(pattern, locale);
- // save both full name and abbreviated name in one table
- // is good space-wise, but it degrades performance,
- // since it needs to check whether the needed space
- // is already allocated or not.
- Object[] pair = countToPatterns.get(pluralCount);
- if (pair == null) {
- pair = new Object[2];
- countToPatterns.put(pluralCount, pair);
- }
- pair[style] = messageFormat;
- }
- }
-} catch ( MissingResourceException e ) {
-}
-// there should be patterns for each plural rule in each time unit.
-// For each time unit,
-// for each plural rule, following is unit pattern fall-back rule:
-// ( for example: "one" hour )
-// look for its unit pattern in its locale tree.
-// if pattern is not found in its own locale, such as de_DE,
-// look for the pattern in its parent, such as de,
-// keep looking till found or till root.
-// if the pattern is not found in root either,
-// fallback to plural count "other",
-// look for the pattern of "other" in the locale tree:
-// "de_DE" to "de" to "root".
-// If not found, fall back to value of
-// static variable DEFAULT_PATTERN_FOR_xxx, such as "{0} h".
-//
-// Following is consistency check to create pattern for each
-// plural rule in each time unit using above fall-back rule.
-//
-final TimeUnit[] timeUnits = TimeUnit.values();
-Set keywords = pluralRules.getKeywords();
-for ( int i = 0; i < timeUnits.length; ++i ) {
- // for each time unit,
- // get all the patterns for each plural rule in this locale.
- final TimeUnit timeUnit = timeUnits[i];
- Map countToPatterns = timeUnitToCountToPatterns.get(timeUnit);
- if (countToPatterns == null) {
- countToPatterns = new TreeMap();
- timeUnitToCountToPatterns.put(timeUnit, countToPatterns);
- }
- for (String pluralCount : keywords) {
- if ( countToPatterns.get(pluralCount) == null ||
- countToPatterns.get(pluralCount)[style] == null ) {
- // look through parents
- searchInTree(resourceKey, style, timeUnit, pluralCount, pluralCount, countToPatterns);
- }
- }
-}
-}
-// srcPluralCount is the original plural count on which the pattern is
-// searched for.
-// searchPluralCount is the fallback plural count.
-// For example, to search for pattern for ""one" hour",
-// "one" is the srcPluralCount,
-// if the pattern is not found even in root, fallback to
-// using patterns of plural count "other",
-// then, "other" is the searchPluralCount.
-private void searchInTree(String resourceKey, int styl,
- TimeUnit timeUnit, String srcPluralCount,
- String searchPluralCount, Map countToPatterns) {
-ULocale parentLocale=locale;
-String srcTimeUnitName = timeUnit.toString();
-while ( parentLocale != null ) {
- try {
- // look for pattern for srcPluralCount in locale tree
- ICUResourceBundle unitsRes = (ICUResourceBundle) UResourceBundle.getBundleInstance(ICUResourceBundle.ICU_BASE_NAME, parentLocale);
- unitsRes = unitsRes.getWithFallback(resourceKey);
- ICUResourceBundle oneUnitRes = unitsRes.getWithFallback(srcTimeUnitName);
- String pattern = oneUnitRes.getStringWithFallback(searchPluralCount);
- final MessageFormat messageFormat = new MessageFormat(pattern, locale);
- Object[] pair = countToPatterns.get(srcPluralCount);
- if (pair == null) {
- pair = new Object[2];
- countToPatterns.put(srcPluralCount, pair);
- }
- pair[styl] = messageFormat;
- return;
- } catch ( MissingResourceException e ) {
- }
- parentLocale=parentLocale.getFallback();
-}
-// if no unitsShort resource was found even after fallback to root locale
-// then search the units resource fallback from the current level to root
-if ( parentLocale == null && resourceKey.equals("unitsShort") ) {
- searchInTree("units", styl, timeUnit, srcPluralCount, searchPluralCount, countToPatterns);
- if ( countToPatterns != null &&
- countToPatterns.get(srcPluralCount) != null &&
- countToPatterns.get(srcPluralCount)[styl] != null ) {
- return;
- }
-}
-// if not found the pattern for this plural count at all,
-// fall-back to plural count "other"
-if ( searchPluralCount.equals("other") ) {
- // set default fall back the same as the resource in root
- MessageFormat messageFormat = null;
- if ( timeUnit == TimeUnit.SECOND ) {
- messageFormat = new MessageFormat(DEFAULT_PATTERN_FOR_SECOND, locale);
- } else if ( timeUnit == TimeUnit.MINUTE ) {
- messageFormat = new MessageFormat(DEFAULT_PATTERN_FOR_MINUTE, locale);
- } else if ( timeUnit == TimeUnit.HOUR ) {
- messageFormat = new MessageFormat(DEFAULT_PATTERN_FOR_HOUR, locale);
- } else if ( timeUnit == TimeUnit.WEEK ) {
- messageFormat = new MessageFormat(DEFAULT_PATTERN_FOR_WEEK, locale);
- } else if ( timeUnit == TimeUnit.DAY ) {
- messageFormat = new MessageFormat(DEFAULT_PATTERN_FOR_DAY, locale);
- } else if ( timeUnit == TimeUnit.MONTH ) {
- messageFormat = new MessageFormat(DEFAULT_PATTERN_FOR_MONTH, locale);
- } else if ( timeUnit == TimeUnit.YEAR ) {
- messageFormat = new MessageFormat(DEFAULT_PATTERN_FOR_YEAR, locale);
- }
- Object[] pair = countToPatterns.get(srcPluralCount);
- if (pair == null) {
- pair = new Object[2];
- countToPatterns.put(srcPluralCount, pair);
- }
- pair[styl] = messageFormat;
-} else {
- // fall back to rule "other", and search in parents
- searchInTree(resourceKey, styl, timeUnit, srcPluralCount, "other", countToPatterns);
-}
-}
+ private void setup(String resourceKey, Map> timeUnitToCountToPatterns, int style,
+ Set pluralKeywords) {
+ // fill timeUnitToCountToPatterns from resource file
+ try {
+ ICUResourceBundle resource = (ICUResourceBundle) UResourceBundle.getBundleInstance(
+ ICUResourceBundle.ICU_BASE_NAME, locale);
+ ICUResourceBundle unitsRes = resource.getWithFallback(resourceKey);
+ int size = unitsRes.getSize();
+ for (int index = 0; index < size; ++index) {
+ String timeUnitName = unitsRes.get(index).getKey();
+ TimeUnit timeUnit = null;
+ if (timeUnitName.equals("year")) {
+ timeUnit = TimeUnit.YEAR;
+ } else if (timeUnitName.equals("month")) {
+ timeUnit = TimeUnit.MONTH;
+ } else if (timeUnitName.equals("day")) {
+ timeUnit = TimeUnit.DAY;
+ } else if (timeUnitName.equals("hour")) {
+ timeUnit = TimeUnit.HOUR;
+ } else if (timeUnitName.equals("minute")) {
+ timeUnit = TimeUnit.MINUTE;
+ } else if (timeUnitName.equals("second")) {
+ timeUnit = TimeUnit.SECOND;
+ } else if (timeUnitName.equals("week")) {
+ timeUnit = TimeUnit.WEEK;
+ } else {
+ continue;
+ }
+ ICUResourceBundle oneUnitRes = unitsRes.getWithFallback(timeUnitName);
+ int count = oneUnitRes.getSize();
+ Map countToPatterns = timeUnitToCountToPatterns.get(timeUnit);
+ if (countToPatterns == null) {
+ countToPatterns = new TreeMap();
+ timeUnitToCountToPatterns.put(timeUnit, countToPatterns);
+ }
+ for (int pluralIndex = 0; pluralIndex < count; ++pluralIndex) {
+ String pluralCount = oneUnitRes.get(pluralIndex).getKey();
+ if (!pluralKeywords.contains(pluralCount))
+ continue;
+ String pattern = oneUnitRes.get(pluralIndex).getString();
+ final MessageFormat messageFormat = new MessageFormat(pattern, locale);
+ // save both full name and abbreviated name in one table
+ // is good space-wise, but it degrades performance,
+ // since it needs to check whether the needed space
+ // is already allocated or not.
+ Object[] pair = countToPatterns.get(pluralCount);
+ if (pair == null) {
+ pair = new Object[2];
+ countToPatterns.put(pluralCount, pair);
+ }
+ pair[style] = messageFormat;
+ }
+ }
+ } catch (MissingResourceException e) {
+ }
+ // there should be patterns for each plural rule in each time unit.
+ // For each time unit,
+ // for each plural rule, following is unit pattern fall-back rule:
+ // ( for example: "one" hour )
+ // look for its unit pattern in its locale tree.
+ // if pattern is not found in its own locale, such as de_DE,
+ // look for the pattern in its parent, such as de,
+ // keep looking till found or till root.
+ // if the pattern is not found in root either,
+ // fallback to plural count "other",
+ // look for the pattern of "other" in the locale tree:
+ // "de_DE" to "de" to "root".
+ // If not found, fall back to value of
+ // static variable DEFAULT_PATTERN_FOR_xxx, such as "{0} h".
+ //
+ // Following is consistency check to create pattern for each
+ // plural rule in each time unit using above fall-back rule.
+ //
+ final TimeUnit[] timeUnits = TimeUnit.values();
+ Set keywords = pluralRules.getKeywords();
+ for (int i = 0; i < timeUnits.length; ++i) {
+ // for each time unit,
+ // get all the patterns for each plural rule in this locale.
+ final TimeUnit timeUnit = timeUnits[i];
+ Map countToPatterns = timeUnitToCountToPatterns.get(timeUnit);
+ if (countToPatterns == null) {
+ countToPatterns = new TreeMap();
+ timeUnitToCountToPatterns.put(timeUnit, countToPatterns);
+ }
+ for (String pluralCount : keywords) {
+ if (countToPatterns.get(pluralCount) == null || countToPatterns.get(pluralCount)[style] == null) {
+ // look through parents
+ searchInTree(resourceKey, style, timeUnit, pluralCount, pluralCount, countToPatterns);
+ }
+ }
+ }
+ }
+
+ // srcPluralCount is the original plural count on which the pattern is
+ // searched for.
+ // searchPluralCount is the fallback plural count.
+ // For example, to search for pattern for ""one" hour",
+ // "one" is the srcPluralCount,
+ // if the pattern is not found even in root, fallback to
+ // using patterns of plural count "other",
+ // then, "other" is the searchPluralCount.
+ private void searchInTree(String resourceKey, int styl, TimeUnit timeUnit, String srcPluralCount,
+ String searchPluralCount, Map countToPatterns) {
+ ULocale parentLocale = locale;
+ String srcTimeUnitName = timeUnit.toString();
+ while (parentLocale != null) {
+ try {
+ // look for pattern for srcPluralCount in locale tree
+ ICUResourceBundle unitsRes = (ICUResourceBundle) UResourceBundle.getBundleInstance(
+ ICUResourceBundle.ICU_BASE_NAME, parentLocale);
+ unitsRes = unitsRes.getWithFallback(resourceKey);
+ ICUResourceBundle oneUnitRes = unitsRes.getWithFallback(srcTimeUnitName);
+ String pattern = oneUnitRes.getStringWithFallback(searchPluralCount);
+ final MessageFormat messageFormat = new MessageFormat(pattern, locale);
+ Object[] pair = countToPatterns.get(srcPluralCount);
+ if (pair == null) {
+ pair = new Object[2];
+ countToPatterns.put(srcPluralCount, pair);
+ }
+ pair[styl] = messageFormat;
+ return;
+ } catch (MissingResourceException e) {
+ }
+ parentLocale = parentLocale.getFallback();
+ }
+ // if no unitsShort resource was found even after fallback to root locale
+ // then search the units resource fallback from the current level to root
+ if (parentLocale == null && resourceKey.equals("unitsShort")) {
+ searchInTree("units", styl, timeUnit, srcPluralCount, searchPluralCount, countToPatterns);
+ if (countToPatterns != null && countToPatterns.get(srcPluralCount) != null
+ && countToPatterns.get(srcPluralCount)[styl] != null) {
+ return;
+ }
+ }
+ // if not found the pattern for this plural count at all,
+ // fall-back to plural count "other"
+ if (searchPluralCount.equals("other")) {
+ // set default fall back the same as the resource in root
+ MessageFormat messageFormat = null;
+ if (timeUnit == TimeUnit.SECOND) {
+ messageFormat = new MessageFormat(DEFAULT_PATTERN_FOR_SECOND, locale);
+ } else if (timeUnit == TimeUnit.MINUTE) {
+ messageFormat = new MessageFormat(DEFAULT_PATTERN_FOR_MINUTE, locale);
+ } else if (timeUnit == TimeUnit.HOUR) {
+ messageFormat = new MessageFormat(DEFAULT_PATTERN_FOR_HOUR, locale);
+ } else if (timeUnit == TimeUnit.WEEK) {
+ messageFormat = new MessageFormat(DEFAULT_PATTERN_FOR_WEEK, locale);
+ } else if (timeUnit == TimeUnit.DAY) {
+ messageFormat = new MessageFormat(DEFAULT_PATTERN_FOR_DAY, locale);
+ } else if (timeUnit == TimeUnit.MONTH) {
+ messageFormat = new MessageFormat(DEFAULT_PATTERN_FOR_MONTH, locale);
+ } else if (timeUnit == TimeUnit.YEAR) {
+ messageFormat = new MessageFormat(DEFAULT_PATTERN_FOR_YEAR, locale);
+ }
+ Object[] pair = countToPatterns.get(srcPluralCount);
+ if (pair == null) {
+ pair = new Object[2];
+ countToPatterns.put(srcPluralCount, pair);
+ }
+ pair[styl] = messageFormat;
+ } else {
+ // fall back to rule "other", and search in parents
+ searchInTree(resourceKey, styl, timeUnit, srcPluralCount, "other", countToPatterns);
+ }
+ }
// boilerplate code to make TimeUnitFormat otherwise follow the contract of
// MeasureFormat
/**
- * @draft ICU 53
- * @provisional
+ * @internal
+ * @deprecated This API is ICU internal only.
*/
+ @Deprecated
@Override
public StringBuilder formatMeasures(
StringBuilder appendTo, FieldPosition fieldPosition, Measure... measures) {
@@ -529,27 +542,30 @@ if ( searchPluralCount.equals("other") ) {
}
/**
- * @draft ICU 53
- * @provisional
+ * @internal
+ * @deprecated This API is ICU internal only.
*/
+ @Deprecated
@Override
public MeasureFormat.FormatWidth getWidth() {
return mf.getWidth();
}
/**
- * @draft ICU 53
- * @provisional
+ * @internal
+ * @deprecated This API is ICU internal only.
*/
+ @Deprecated
@Override
public NumberFormat getNumberFormat() {
return mf.getNumberFormat();
}
/**
- * @draft ICU 53
- * @provisional
+ * @internal
+ * @deprecated This API is ICU internal only.
*/
+ @Deprecated
@Override
public Object clone() {
TimeUnitFormat result = (TimeUnitFormat) super.clone();
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/TimeZoneFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/TimeZoneFormat.java
index 7d488db29f..82c6e563a6 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/TimeZoneFormat.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/TimeZoneFormat.java
@@ -1,6 +1,6 @@
/*
*******************************************************************************
- * Copyright (C) 2011-2013, International Business Machines Corporation and *
+ * Copyright (C) 2011-2014, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@@ -115,106 +115,92 @@ public class TimeZoneFormat extends UFormat implements Freezable
/**
* Short localized GMT offset format, such as "GMT-5", "UTC+1:30"
* This style is equivalent to the LDML date format pattern "O".
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
LOCALIZED_GMT_SHORT (0x0040),
/**
* Short ISO 8601 local time difference (basic format) or the UTC indicator.
* For example, "-05", "+0530", and "Z"(UTC).
* This style is equivalent to the LDML date format pattern "X".
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
ISO_BASIC_SHORT (ISO_Z_STYLE_FLAG),
/**
* Short ISO 8601 locale time difference (basic format).
* For example, "-05" and "+0530".
* This style is equivalent to the LDML date format pattern "x".
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
ISO_BASIC_LOCAL_SHORT (ISO_LOCAL_STYLE_FLAG),
/**
* Fixed width ISO 8601 local time difference (basic format) or the UTC indicator.
* For example, "-0500", "+0530", and "Z"(UTC).
* This style is equivalent to the LDML date format pattern "XX".
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
ISO_BASIC_FIXED (ISO_Z_STYLE_FLAG),
/**
* Fixed width ISO 8601 local time difference (basic format).
* For example, "-0500" and "+0530".
* This style is equivalent to the LDML date format pattern "xx".
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
ISO_BASIC_LOCAL_FIXED (ISO_LOCAL_STYLE_FLAG),
/**
* ISO 8601 local time difference (basic format) with optional seconds field, or the UTC indicator.
* For example, "-0500", "+052538", and "Z"(UTC).
* This style is equivalent to the LDML date format pattern "XXXX".
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
ISO_BASIC_FULL (ISO_Z_STYLE_FLAG),
/**
* ISO 8601 local time difference (basic format) with optional seconds field.
* For example, "-0500" and "+052538".
* This style is equivalent to the LDML date format pattern "xxxx".
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
ISO_BASIC_LOCAL_FULL (ISO_LOCAL_STYLE_FLAG),
/**
* Fixed width ISO 8601 local time difference (extended format) or the UTC indicator.
* For example, "-05:00", "+05:30", and "Z"(UTC).
* This style is equivalent to the LDML date format pattern "XXX".
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
ISO_EXTENDED_FIXED (ISO_Z_STYLE_FLAG),
/**
* Fixed width ISO 8601 local time difference (extended format).
* For example, "-05:00" and "+05:30".
* This style is equivalent to the LDML date format pattern "xxx" and "ZZZZZ".
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
ISO_EXTENDED_LOCAL_FIXED (ISO_LOCAL_STYLE_FLAG),
/**
* ISO 8601 local time difference (extended format) with optional seconds field, or the UTC indicator.
* For example, "-05:00", "+05:25:38", and "Z"(UTC).
* This style is equivalent to the LDML date format pattern "XXXXX".
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
ISO_EXTENDED_FULL (ISO_Z_STYLE_FLAG),
/**
* ISO 8601 local time difference (extended format) with optional seconds field.
* For example, "-05:00" and "+05:25:38".
* This style is equivalent to the LDML date format pattern "xxxxx".
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
ISO_EXTENDED_LOCAL_FULL (ISO_LOCAL_STYLE_FLAG),
/**
* Time Zone ID, such as "America/Los_Angeles".
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
ZONE_ID (0x0200),
/**
* Short Time Zone ID (BCP 47 Unicode location extension, time zone type value), such as "uslax".
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
ZONE_ID_SHORT (0x0400),
/**
* Exemplar location, such as "Los Angeles" and "Paris".
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
EXEMPLAR_LOCATION (0x0800);
@@ -231,7 +217,6 @@ public class TimeZoneFormat extends UFormat implements Freezable
* @see TimeZoneFormat#getGMTOffsetPattern(GMTOffsetPatternType)
* @see TimeZoneFormat#setGMTOffsetPattern(GMTOffsetPatternType, String)
* @stable ICU 49
- * @provisional This API might change or be removed in a future release.
*/
public enum GMTOffsetPatternType {
/**
@@ -256,14 +241,12 @@ public class TimeZoneFormat extends UFormat implements Freezable
NEGATIVE_HMS ("-H:mm:ss", "Hms", false),
/**
* Positive offset with hours field
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
POSITIVE_H ("+H", "H", true),
/**
* Negative offset with hours field
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
NEGATIVE_H ("-H", "H", false);
@@ -731,8 +714,7 @@ public class TimeZoneFormat extends UFormat implements Freezable
* (-24 hours < offset < +24 hours).
* @see #formatOffsetISO8601Extended(int, boolean, boolean, boolean)
* @see #parseOffsetISO8601(String, ParsePosition)
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public final String formatOffsetISO8601Basic(int offset, boolean useUtcIndicator, boolean isShort, boolean ignoreSeconds) {
return formatOffsetISO8601(offset, true, useUtcIndicator, isShort, ignoreSeconds);
@@ -751,8 +733,7 @@ public class TimeZoneFormat extends UFormat implements Freezable
* (-24 hours < offset < +24 hours).
* @see #formatOffsetISO8601Basic(int, boolean, boolean, boolean)
* @see #parseOffsetISO8601(String, ParsePosition)
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public final String formatOffsetISO8601Extended(int offset, boolean useUtcIndicator, boolean isShort, boolean ignoreSeconds) {
return formatOffsetISO8601(offset, false, useUtcIndicator, isShort, ignoreSeconds);
@@ -798,8 +779,7 @@ public class TimeZoneFormat extends UFormat implements Freezable
* @see #parseOffsetLocalizedGMT(String, ParsePosition)
* @throws IllegalArgumentException if the specified offset is out of supported range
* (-24 hours < offset < +24 hours).
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public String formatOffsetShortLocalizedGMT(int offset) {
return formatOffsetLocalizedGMT(offset, true);
@@ -1016,8 +996,7 @@ public class TimeZoneFormat extends UFormat implements Freezable
* @return the offset from GMT(UTC) in milliseconds for the given short localized GMT
* offset format string.
* @see #formatOffsetShortLocalizedGMT(int)
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
public int parseOffsetShortLocalizedGMT(String text, ParsePosition pos) {
return parseOffsetLocalizedGMT(text, pos, true, null);
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 82882f838d..0e7a7083d9 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
@@ -1,6 +1,6 @@
/*
*******************************************************************************
- * Copyright (C) 2011-2013, International Business Machines Corporation and *
+ * Copyright (C) 2011-2014, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@@ -121,8 +121,7 @@ public abstract class TimeZoneNames implements Serializable {
/**
* Exemplar location name, such as "Los Angeles".
*
- * @draft ICU 51
- * @provisional This API might change or be removed in a future release.
+ * @stable ICU 51
*/
EXEMPLAR_LOCATION,
}
@@ -309,7 +308,7 @@ public abstract class TimeZoneNames implements Serializable {
* @return A collection of matches.
* @see NameType
* @see MatchInfo
- * @draft ICU 49
+ * @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) {
@@ -319,7 +318,7 @@ 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
+ * @draft ICU 49 (Retain)
* @provisional This API might change or be removed in a future release.
*/
public static class MatchInfo {
@@ -339,7 +338,7 @@ public abstract class TimeZoneNames implements Serializable {
* or 2) both tzID
and mzID
are null
,
* or 3) matchLength
is 0 or smaller.
* @see NameType
- * @draft ICU 49
+ * @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) {
@@ -366,7 +365,7 @@ public abstract class TimeZoneNames implements Serializable {
*
* @return the time zone ID, or null
.
* @see #mzID()
- * @draft ICU 49
+ * @draft ICU 49 (Retain)
* @provisional This API might change or be removed in a future release.
*/
public String tzID() {
@@ -381,7 +380,7 @@ public abstract class TimeZoneNames implements Serializable {
*
* @return the meta zone ID, or null
.
* @see #tzID()
- * @draft ICU 49
+ * @draft ICU 49 (Retain)
* @provisional This API might change or be removed in a future release.
*/
public String mzID() {
@@ -392,7 +391,7 @@ public abstract class TimeZoneNames implements Serializable {
* Returns the time zone name type.
* @return the time zone name type enum.
* @see NameType
- * @draft ICU 49
+ * @draft ICU 49 (Retain)
* @provisional This API might change or be removed in a future release.
*/
public NameType nameType() {
@@ -402,7 +401,7 @@ public abstract class TimeZoneNames implements Serializable {
/**
* Returns the match length.
* @return the match length.
- * @draft ICU 49
+ * @draft ICU 49 (Retain)
* @provisional This API might change or be removed in a future release.
*/
public int matchLength() {
@@ -413,7 +412,7 @@ public abstract class TimeZoneNames implements Serializable {
/**
* Sole constructor for invocation by subclass constructors.
*
- * @draft ICU 49
+ * @draft ICU 49 (Retain)
* @provisional This API might change or be removed in a future release.
*/
protected TimeZoneNames() {