ICU-10393 API status promotion from draft to stable in ICU4J 52.

X-SVN-Rev: 34384
This commit is contained in:
Yoshito Umaoka 2013-09-18 19:55:38 +00:00
parent 0989e56a2f
commit 87fff22f2f
10 changed files with 268 additions and 243 deletions

View File

@ -2,38 +2,129 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ICU4J API Comparison: ICU4J 51.1 with ICU4J 52.0.1</title>
<title>ICU4J API Comparison: ICU4J 51.1 with ICU4J 52.1</title>
<!-- Copyright 2013, IBM, All Rights Reserved. -->
</head>
<body>
<h1>ICU4J API Comparison: ICU4J 51.1 with ICU4J 52.0.1</h1>
<h1>ICU4J API Comparison: ICU4J 51.1 with ICU4J 52.1</h1>
<hr/>
<h2>Removed from ICU4J 51.1</h2>
<h3>Package com.ibm.icu.text</h3>
<ul>
ListFormatter
SimpleDateFormat
<ul>
<li><span style='color:orange'>(draft)</span> public java.lang.String <i>format</i>(java.util.Collection<java.lang.Object>)</li>
<li><span style='color:orange'>(draft)</span> protected int <i>matchString</i>(java.lang.String, int, int, java.lang.String[], java.lang.String, Calendar)</li>
<li><span style='color:orange'>(draft)</span> protected int <i>subParse</i>(java.lang.String, int, char, int, boolean, boolean, boolean[], Calendar, MessageFormat)</li>
</ul>
</ul>
<h3>Package com.ibm.icu.util</h3>
<ul>
Currency
<ul>
<li><span style='color:green'>(stable)</span> public boolean <i>equals</i>(java.lang.Object)</li>
<li><span style='color:green'>(stable)</span> public int <i>hashCode</i>()</li>
</ul>
Region
<ul>
<li><span style='color:orange'>(draft)</span> public static final int UNDEFINED_NUMERIC_CODE</li>
</ul>
TimeUnit
<ul>
<li><span style='color:green'>(stable)</span> public java.lang.String <i>toString</i>()</li>
</ul>
</ul>
<hr/>
<h2>Deprecated or Obsoleted in ICU4J 52.0.1</h2>
<h2>Deprecated or Obsoleted in ICU4J 52.1</h2>
<p>(no API obsoleted)</p>
<hr/>
<h2>Changed in ICU4J 52.0.1 (old, new)</h2>
<p>(no API changed)</p>
<h2>Changed in ICU4J 52.1 (old, new)</h2>
<h3>Package com.ibm.icu.text</h3>
<ul>
ListFormatter
<ul>
<li> <span style='color:orange'>(draft)</span> public java.lang.String <i>format</i>(java.util.Collection<java.lang.Object>)</br>
<span style='color:orange'>(draft)</span> public java.lang.String <i>format</i>(java.util.Collection<?>)</li>
</ul>
</ul>
<h3>Package com.ibm.icu.util</h3>
<ul>
<li> <span style='color:green'>(stable)</span> public abstract class <i>MeasureUnit</i> extends java.lang.Object</br>
<span style='color:green'>(stable)</span> public class <i>MeasureUnit</i> extends java.lang.Object implements java.lang.Comparable, java.io.Serializable</li>
</ul>
<hr/>
<h2>Promoted to stable in ICU4J 52.0.1</h2>
<p>(no API promoted to stable)</p>
<h2>Promoted to stable in ICU4J 52.1</h2>
<h3>Package com.ibm.icu.text</h3>
<ul>
<li><span style='color:green'>(stable)</span> public static final class <i>PluralRules.PluralType</i></li>
<li><span style='color:green'>(stable)</span> public class <i>TimeZoneFormat</i></li>
<li><span style='color:green'>(stable)</span> public static final class <i>TimeZoneFormat.GMTOffsetPatternType</i></li>
<li><span style='color:green'>(stable)</span> public static final class <i>TimeZoneFormat.ParseOption</i></li>
<li><span style='color:green'>(stable)</span> public static final class <i>TimeZoneFormat.Style</i></li>
<li><span style='color:green'>(stable)</span> public static final class <i>TimeZoneFormat.TimeType</i></li>
<li><span style='color:green'>(stable)</span> public abstract class <i>TimeZoneNames</i></li>
<li><span style='color:green'>(stable)</span> public static final class <i>TimeZoneNames.NameType</i></li>
CompactDecimalFormat
<ul>
<li><span style='color:green'>(stable)</span> public java.text.AttributedCharacterIterator <i>formatToCharacterIterator</i>(java.lang.Object)</li>
<li><span style='color:green'>(stable)</span> public static CompactDecimalFormat <i>getInstance</i>(ULocale, CompactDecimalFormat.CompactStyle)</li>
<li><span style='color:green'>(stable)</span> public static CompactDecimalFormat <i>getInstance</i>(java.util.Locale, CompactDecimalFormat.CompactStyle)</li>
</ul>
DateFormat
<ul>
<li><span style='color:green'>(stable)</span> public static final java.lang.String ABBR_GENERIC_TZ</li>
<li><span style='color:green'>(stable)</span> public static final java.lang.String ABBR_QUARTER</li>
<li><span style='color:green'>(stable)</span> public static final java.lang.String ABBR_SPECIFIC_TZ</li>
<li><span style='color:green'>(stable)</span> public static final java.lang.String ABBR_UTC_TZ</li>
<li><span style='color:green'>(stable)</span> public static final java.lang.String ABBR_WEEKDAY</li>
<li><span style='color:green'>(stable)</span> public static final java.lang.String GENERIC_TZ</li>
<li><span style='color:green'>(stable)</span> public static final java.lang.String HOUR24</li>
<li><span style='color:green'>(stable)</span> public static final java.lang.String LOCATION_TZ</li>
<li><span style='color:green'>(stable)</span> public static final java.lang.String MINUTE</li>
<li><span style='color:green'>(stable)</span> public static final java.lang.String QUARTER</li>
<li><span style='color:green'>(stable)</span> public static final java.lang.String SECOND</li>
<li><span style='color:green'>(stable)</span> public static final java.lang.String SPECIFIC_TZ</li>
<li><span style='color:green'>(stable)</span> public static final java.lang.String WEEKDAY</li>
</ul>
MessagePattern.ArgType
<ul>
<li><span style='color:green'>(stable)</span> public boolean <i>hasPluralStyle</i>()</li>
</ul>
PluralFormat
<ul>
<li><span style='color:green'>(stable)</span> public <i>PluralFormat</i>(ULocale, PluralRules.PluralType)</li>
<li><span style='color:green'>(stable)</span> public <i>PluralFormat</i>(ULocale, PluralRules.PluralType, java.lang.String)</li>
</ul>
PluralRules
<ul>
<li><span style='color:green'>(stable)</span> public static PluralRules <i>forLocale</i>(ULocale, PluralRules.PluralType)</li>
</ul>
SimpleDateFormat
<ul>
<li><span style='color:green'>(stable)</span> public TimeZoneFormat <i>getTimeZoneFormat</i>()</li>
<li><span style='color:green'>(stable)</span> public void <i>setTimeZoneFormat</i>(TimeZoneFormat)</li>
</ul>
</ul>
<h3>Package com.ibm.icu.util</h3>
<ul>
<li><span style='color:green'>(stable)</span> public class <i>Region</i></li>
<li><span style='color:green'>(stable)</span> public static final class <i>Region.RegionType</i></li>
</ul>
<hr/>
<h2>Added in ICU4J 52.0.1</h2>
<h2>Added in ICU4J 52.1</h2>
<h3>Package com.ibm.icu.lang</h3>
<ul>
@ -70,6 +161,7 @@ UScript
<h3>Package com.ibm.icu.text</h3>
<ul>
<li><span style='color:orange'>(draft)</span> public class <i>PluralSamples</i></li>
BreakIterator
<ul>
<li><span style='color:orange'>(draft)</span> public int <i>getRuleStatus</i>()</li>
@ -77,18 +169,63 @@ BreakIterator
</ul>
ListFormatter
<ul>
<li><span style='color:orange'>(draft)</span> public java.lang.String <i>format</i>(java.util.Collection<?>)</li>
<li><span style='color:orange'>(draft)</span> public java.lang.String <i>getPatternForNumItems</i>(int)</li>
</ul>
TimeUnitFormat
ListFormatter.Style
<ul>
<li><span style='color:orange'>(draft)</span> public static final int NUMERIC</li>
<li><span style='color:orange'>(draft)</span> public java.lang.String <i>formatTimePeriod</i>(TimePeriod)</li>
<li><span style='color:orange'>(draft)</span> public java.lang.String <i>getName</i>()</li>
</ul>
PluralRules
<ul>
<li><span style='color:orange'>(draft)</span> public boolean <i>addSample</i>(java.lang.String, java.lang.Number, int, java.util.Set<java.lang.Double>)</li>
<li><span style='color:green'>(stable)</span> public java.util.Collection<java.lang.Double> <i>getAllKeywordValues</i>(java.lang.String, PluralRules.SampleType)</li>
</ul>
PluralRules.FixedDecimal
<ul>
<li><span style='color:orange'>(draft)</span> public final long decimalDigits</li>
<li><span style='color:orange'>(draft)</span> public final long decimalDigitsWithoutTrailingZeros</li>
<li><span style='color:orange'>(draft)</span> public final boolean hasIntegerValue</li>
<li><span style='color:orange'>(draft)</span> public final long integerValue</li>
<li><span style='color:orange'>(draft)</span> public final boolean isNegative</li>
<li><span style='color:orange'>(draft)</span> public final double source</li>
<li><span style='color:orange'>(draft)</span> public final int visibleDecimalDigitCount</li>
<li><span style='color:orange'>(draft)</span> public final int visibleDecimalDigitCountWithoutTrailingZeros</li>
<li><span style='color:orange'>(draft)</span> public double <i>doubleValue</i>()</li>
<li><span style='color:orange'>(draft)</span> public float <i>floatValue</i>()</li>
<li><span style='color:orange'>(draft)</span> public long <i>getShiftedValue</i>()</li>
<li><span style='color:orange'>(draft)</span> public int <i>intValue</i>()</li>
<li><span style='color:orange'>(draft)</span> public long <i>longValue</i>()</li>
</ul>
PluralRules.FixedDecimalRange
<ul>
<li><span style='color:orange'>(draft)</span> public final PluralRules.FixedDecimal end</li>
<li><span style='color:orange'>(draft)</span> public final PluralRules.FixedDecimal start</li>
<li><span style='color:orange'>(draft)</span> public <i>PluralRules.FixedDecimalRange</i>(PluralRules.FixedDecimal, PluralRules.FixedDecimal)</li>
<li><span style='color:orange'>(draft)</span> public java.lang.String <i>toString</i>()</li>
</ul>
PluralRules.FixedDecimalSamples
<ul>
<li><span style='color:orange'>(draft)</span> public final boolean bounded</li>
<li><span style='color:orange'>(draft)</span> public final PluralRules.SampleType sampleType</li>
<li><span style='color:orange'>(draft)</span> public final java.util.Set<PluralRules.FixedDecimalRange> samples</li>
<li><span style='color:orange'>(draft)</span> public java.util.Set<java.lang.Double> <i>addSamples</i>(java.util.Set<java.lang.Double>)</li>
<li><span style='color:orange'>(draft)</span> public java.util.Set<PluralRules.FixedDecimalRange> <i>getSamples</i>()</li>
<li><span style='color:orange'>(draft)</span> public void <i>getStartEndSamples</i>(java.util.Set<PluralRules.FixedDecimal>)</li>
<li><span style='color:orange'>(draft)</span> public java.lang.String <i>toString</i>()</li>
</ul>
</ul>
<h3>Package com.ibm.icu.util</h3>
<ul>
<li><span style='color:orange'>(draft)</span> public final class <i>TimePeriod</i></li>
<li><span style='color:orange'>(draft)</span> public static final class <i>IslamicCalendar.CalculationType</i></li>
IslamicCalendar
<ul>
<li><span style='color:orange'>(draft)</span> public void <i>setType</i>(IslamicCalendar.CalculationType)</li>
</ul>
MeasureUnit.Factory
<ul>
<li><span style='color:orange'>(draft)</span> public MeasureUnit <i>create</i>(java.lang.String, java.lang.String)</li>
</ul>
TimeZone
<ul>
<li><span style='color:orange'>(draft)</span> public static java.lang.String <i>getIDForWindowsID</i>(java.lang.String, java.lang.String)</li>
@ -101,6 +238,6 @@ VersionInfo
</ul>
<hr/>
<p><i><font size="-1">Contents generated by ReportAPI tool on Tue Jul 09 18:14:18 EDT 2013<br/>Copyright (C) 2013, International Business Machines Corporation, All Rights Reserved.</font></i></p>
<p><i><font size="-1">Contents generated by ReportAPI tool on Wed Sep 18 14:55:01 EDT 2013<br/>Copyright (C) 2013, International Business Machines Corporation, All Rights Reserved.</font></i></p>
</body>
</html>

View File

@ -90,8 +90,7 @@ public class CompactDecimalFormat extends DecimalFormat {
*
* @param locale the desired locale
* @param style the compact style
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static CompactDecimalFormat getInstance(ULocale locale, CompactStyle style) {
return new CompactDecimalFormat(locale, style);
@ -103,8 +102,7 @@ public class CompactDecimalFormat extends DecimalFormat {
*
* @param locale the desired locale
* @param style the compact style
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static CompactDecimalFormat getInstance(Locale locale, CompactStyle style) {
return new CompactDecimalFormat(ULocale.forLocale(locale), style);
@ -253,8 +251,7 @@ public class CompactDecimalFormat extends DecimalFormat {
/**
* {@inheritDoc}
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
@Override
public AttributedCharacterIterator formatToCharacterIterator(Object obj) {

View File

@ -818,15 +818,13 @@ public abstract class DateFormat extends UFormat {
/**
* {@icu} Constant for date skeleton with quarter.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static final String QUARTER = "QQQQ";
/**
* {@icu} Constant for date skeleton with abbreviated quarter.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static final String ABBR_QUARTER = "QQQ";
@ -907,15 +905,13 @@ public abstract class DateFormat extends UFormat {
/**
* {@icu} Constant for date skeleton with weekday.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static final String WEEKDAY = "EEEE";
/**
* {@icu} Constant for date skeleton with abbreviated weekday.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static final String ABBR_WEEKDAY = "E";
@ -994,15 +990,13 @@ public abstract class DateFormat extends UFormat {
/**
* {@icu} Constant for date skeleton with hour in 24-hour presentation.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static final String HOUR24 = "H";
/**
* {@icu} Constant for date skeleton with minute.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static final String MINUTE = "m";
@ -1022,8 +1016,7 @@ public abstract class DateFormat extends UFormat {
/**
* {@icu} Constant for date skeleton with second.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static final String SECOND = "s";
@ -1059,8 +1052,7 @@ public abstract class DateFormat extends UFormat {
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static final String LOCATION_TZ = "VVVV";
@ -1069,8 +1061,7 @@ public abstract class DateFormat extends UFormat {
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static final String GENERIC_TZ = "vvvv";
@ -1079,8 +1070,7 @@ public abstract class DateFormat extends UFormat {
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static final String ABBR_GENERIC_TZ = "v";
@ -1089,8 +1079,7 @@ public abstract class DateFormat extends UFormat {
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static final String SPECIFIC_TZ = "zzzz";
@ -1099,8 +1088,7 @@ public abstract class DateFormat extends UFormat {
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static final String ABBR_SPECIFIC_TZ = "z";
@ -1109,8 +1097,7 @@ public abstract class DateFormat extends UFormat {
* used in combinations date + time + zone, or time + zone.
* @see <a href="http://unicode.org/reports/tr35/#Date_Format_Patterns">LDML Date Format Patterns</a>
* @see <a href="http://unicode.org/reports/tr35/#Time_Zone_Fallback">LDML Time Zone Fallback</a>
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static final String ABBR_UTC_TZ = "ZZZZ";

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2010-2012, International Business Machines
* Copyright (C) 2010-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* created on: 2010aug21
@ -837,16 +837,14 @@ public final class MessagePattern implements Cloneable, Freezable<MessagePattern
/**
* The argument is an ordinal-number PluralFormat
* with the same style parts sequence and semantics as {@link ArgType#PLURAL}.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
SELECTORDINAL;
/**
* @return true if the argument type has a plural style part sequence and semantics,
* for example {@link ArgType#PLURAL} and {@link ArgType#SELECTORDINAL}.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public boolean hasPluralStyle() {
return this == PLURAL || this == SELECTORDINAL;

View File

@ -230,8 +230,7 @@ public class PluralFormat extends UFormat {
* @param ulocale the default number formatting will be done using this
* locale.
* @param type The plural type (e.g., cardinal or ordinal).
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public PluralFormat(ULocale ulocale, PluralType type) {
init(null, type, ulocale);
@ -311,8 +310,7 @@ public class PluralFormat extends UFormat {
* @param type The plural type (e.g., cardinal or ordinal).
* @param pattern the pattern for this <code>PluralFormat</code>.
* @throws IllegalArgumentException if the pattern is invalid.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public PluralFormat(ULocale ulocale, PluralType type, String pattern) {
init(null, type, ulocale);

View File

@ -314,20 +314,17 @@ public class PluralRules implements Serializable {
/**
* Type of plurals and PluralRules.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public enum PluralType {
/**
* Plural rules for cardinal numbers: 1 file vs. 2 files.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
CARDINAL,
/**
* Plural rules for ordinal numbers: 1st file, 2nd file, 3rd file, 4th file, etc.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
ORDINAL
};
@ -1635,8 +1632,7 @@ public class PluralRules implements Serializable {
* for the closest parent in the locale hierarchy that has one will
* be returned. The final fallback always returns the default
* rules.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static PluralRules forLocale(ULocale locale, PluralType type) {
return Factory.getDefaultFactory().forLocale(locale, type);

View File

@ -3322,8 +3322,7 @@ public class SimpleDateFormat extends DateFormat {
*
* @return the time zone formatter which this date/time
* formatter uses.
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public TimeZoneFormat getTimeZoneFormat() {
return tzFormat().freeze();
@ -3333,8 +3332,7 @@ public class SimpleDateFormat extends DateFormat {
* {@icu} Allows you to set the time zone formatter.
*
* @param tzfmt the new time zone formatter
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public void setTimeZoneFormat(TimeZoneFormat tzfmt) {
if (tzfmt.isFrozen()) {

View File

@ -58,8 +58,7 @@ import com.ibm.icu.util.ULocale;
*
* @see SimpleDateFormat
* @see TimeZoneNames
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>, Serializable {
@ -74,50 +73,43 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* @see TimeZoneFormat#format(Style, TimeZone, long)
* @see TimeZoneFormat#format(Style, TimeZone, long, Output)
* @see TimeZoneFormat#parse(Style, String, ParsePosition, Output)
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public enum Style {
/**
* Generic location format, such as "United States Time (New York)" and "Italy Time".
* This style is equivalent to the LDML date format pattern "VVVV".
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
GENERIC_LOCATION (0x0001),
/**
* Generic long non-location format, such as "Eastern Time".
* This style is equivalent to the LDML date format pattern "vvvv".
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
GENERIC_LONG (0x0002),
/**
* Generic short non-location format, such as "ET".
* This style is equivalent to the LDML date format pattern "v".
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
GENERIC_SHORT (0x0004),
/**
* Specific long format, such as "Eastern Standard Time".
* This style is equivalent to the LDML date format pattern "zzzz".
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
SPECIFIC_LONG (0x0008),
/**
* Specific short format, such as "EST", "PDT".
* This style is equivalent to the LDML date format pattern "z".
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
SPECIFIC_SHORT (0x0010),
/**
* Localized GMT offset format, such as "GMT-05:00", "UTC+0100"
* This style is equivalent to the LDML date format pattern "OOOO" and "ZZZZ"
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
LOCALIZED_GMT (0x0020),
/**
@ -238,32 +230,28 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
*
* @see TimeZoneFormat#getGMTOffsetPattern(GMTOffsetPatternType)
* @see TimeZoneFormat#setGMTOffsetPattern(GMTOffsetPatternType, String)
* @draft ICU 49
* @stable ICU 49
* @provisional This API might change or be removed in a future release.
*/
public enum GMTOffsetPatternType {
/**
* Positive offset with hours and minutes fields
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
POSITIVE_HM ("+H:mm", "Hm", true),
/**
* Positive offset with hours, minutes and seconds fields
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
POSITIVE_HMS ("+H:mm:ss", "Hms", true),
/**
* Negative offset with hours and minutes fields
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
NEGATIVE_HM ("-H:mm", "Hm", false),
/**
* Negative offset with hours, minutes and seconds fields
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
NEGATIVE_HMS ("-H:mm:ss", "Hms", false),
/**
@ -306,42 +294,36 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* Time type enum used for receiving time type (standard time, daylight time or unknown)
* in <code>TimeZoneFormat</code> APIs.
*
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public enum TimeType {
/**
* Unknown
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
UNKNOWN,
/**
* Standard time
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
STANDARD,
/**
* Daylight saving time
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
DAYLIGHT;
}
/**
* Parse option enum, used for specifying optional parse behavior.
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public enum ParseOption {
/**
* When a time zone display name is not found within a set of display names
* used for the specified style, look for the name from display names used
* by other styles.
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
ALL_STYLES;
}
@ -433,8 +415,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
/**
* The protected constructor for subclassing.
* @param locale the locale
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
protected TimeZoneFormat(ULocale locale) {
_locale = locale;
@ -504,8 +485,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
*
* @param locale the locale.
* @return a frozen instance of <code>TimeZoneFormat</code> for the given locale.
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public static TimeZoneFormat getInstance(ULocale locale) {
if (locale == null) {
@ -519,8 +499,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
*
* @return the time zone display name data.
* @see #setTimeZoneNames(TimeZoneNames)
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public TimeZoneNames getTimeZoneNames() {
return _tznames;
@ -553,8 +532,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* @return this object.
* @throws UnsupportedOperationException when this object is frozen.
* @see #getTimeZoneNames()
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public TimeZoneFormat setTimeZoneNames(TimeZoneNames tznames) {
if (isFrozen()) {
@ -571,8 +549,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
*
* @return the localized GMT format pattern.
* @see #setGMTPattern(String)
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public String getGMTPattern() {
return _gmtPattern;
@ -587,8 +564,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* @throws IllegalArgumentException when the pattern string does not contain "{0}"
* @throws UnsupportedOperationException when this object is frozen.
* @see #getGMTPattern()
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public TimeZoneFormat setGMTPattern(String pattern) {
if (isFrozen()) {
@ -603,8 +579,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
*
* @param type the offset pattern enum
* @see #setGMTOffsetPattern(GMTOffsetPatternType, String)
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public String getGMTOffsetPattern(GMTOffsetPatternType type) {
return _gmtOffsetPatterns[type.ordinal()];
@ -619,8 +594,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* @throws IllegalArgumentException when the pattern string does not have required time field letters.
* @throws UnsupportedOperationException when this object is frozen.
* @see #getGMTOffsetPattern(GMTOffsetPatternType)
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public TimeZoneFormat setGMTOffsetPattern(GMTOffsetPatternType type, String pattern) {
if (isFrozen()) {
@ -645,8 +619,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
*
* @return the decimal digits for localized GMT format.
* @see #setGMTOffsetDigits(String)
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public String getGMTOffsetDigits() {
StringBuilder buf = new StringBuilder(_gmtOffsetDigits.length);
@ -664,8 +637,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* @throws IllegalArgumentException when the string did not contain ten characters.
* @throws UnsupportedOperationException when this object is frozen.
* @see #getGMTOffsetDigits()
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public TimeZoneFormat setGMTOffsetDigits(String digits) {
if (isFrozen()) {
@ -687,8 +659,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
*
* @return the localized GMT string string for GMT(UTC) itself.
* @see #setGMTZeroFormat(String)
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public String getGMTZeroFormat() {
return _gmtZeroFormat;
@ -701,8 +672,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* @return this object.
* @throws UnsupportedOperationException when this object is frozen.
* @see #getGMTZeroFormat()
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public TimeZoneFormat setGMTZeroFormat(String gmtZeroFormat) {
if (isFrozen()) {
@ -727,8 +697,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* @param options the default parse options.
* @return this object.
* @see ParseOption
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public TimeZoneFormat setDefaultParseOptions(EnumSet<ParseOption> options) {
// Currently, only ALL_STYLES is supported
@ -740,8 +709,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* Returns the default parse options used by this <code>TimeZoneFormat</code> instance.
* @return the default parse options.
* @see ParseOption
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public EnumSet<ParseOption> getDefaultParseOptions() {
if (_parseAllStyles) {
@ -807,8 +775,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* @see #parseOffsetLocalizedGMT(String, ParsePosition)
* @throws IllegalArgumentException if the specified offset is out of supported range
* (-24 hours &lt; offset &lt; +24 hours).
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public String formatOffsetLocalizedGMT(int offset) {
return formatOffsetLocalizedGMT(offset, false);
@ -856,8 +823,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* @return the display name of the time zone.
* @see Style
* @see #format(Style, TimeZone, long, Output)
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public final String format(Style style, TimeZone tz, long date) {
return format(style, tz, date, null);
@ -878,8 +844,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* @return the display name of the time zone.
* @see Style
* @see #format(Style, TimeZone, long)
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public String format(Style style, TimeZone tz, long date, Output<TimeType> timeType) {
String result = null;
@ -1011,8 +976,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* time zone string.
* @see #formatOffsetISO8601Basic(int, boolean, boolean, boolean)
* @see #formatOffsetISO8601Extended(int, boolean, boolean, boolean)
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public final int parseOffsetISO8601(String text, ParsePosition pos) {
return parseOffsetISO8601(text, pos, false, null);
@ -1029,8 +993,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* @return the offset from GMT(UTC) in milliseconds for the given localized GMT
* offset format string.
* @see #formatOffsetLocalizedGMT(int)
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public int parseOffsetLocalizedGMT(String text, ParsePosition pos) {
return parseOffsetLocalizedGMT(text, pos, false, null);
@ -1067,8 +1030,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* @return A <code>TimeZone</code>, or null if the input could not be parsed.
* @see Style
* @see #format(Style, TimeZone, long, Output)
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public TimeZone parse(Style style, String text, ParsePosition pos, EnumSet<ParseOption> options, Output<TimeType> timeType) {
if (timeType == null) {
@ -1476,8 +1438,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* @see #parse(Style, String, ParsePosition, EnumSet, Output)
* @see #format(Style, TimeZone, long, Output)
* @see #setDefaultParseOptions(EnumSet)
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public TimeZone parse(Style style, String text, ParsePosition pos, Output<TimeType> timeType) {
return parse(style, text, pos, null, timeType);
@ -1494,8 +1455,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* @param pos the position.
* @return A <code>TimeZone</code>, or null if the input could not be parsed.
* @see #parse(Style, String, ParsePosition, EnumSet, Output)
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public final TimeZone parse(String text, ParsePosition pos) {
return parse(Style.GENERIC_LOCATION, text, pos, EnumSet.of(ParseOption.ALL_STYLES), null);
@ -1509,8 +1469,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* @return A <code>TimeZone</code>.
* @throws ParseException when the input could not be parsed as a time zone string.
* @see #parse(String, ParsePosition)
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public final TimeZone parse(String text) throws ParseException {
ParsePosition pos = new ParsePosition(0);
@ -1525,8 +1484,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
/**
* {@inheritDoc}
*
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
@Override
public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
@ -1557,8 +1515,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
/**
* {@inheritDoc}
*
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
@Override
public AttributedCharacterIterator formatToCharacterIterator(Object obj) {
@ -1576,8 +1533,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
/**
* {@inheritDoc}
*
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
@Override
public Object parseObject(String source, ParsePosition pos) {
@ -3210,8 +3166,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
/**
* {@inheritDoc}
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public boolean isFrozen() {
return _frozen;
@ -3219,8 +3174,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
/**
* {@inheritDoc}
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public TimeZoneFormat freeze() {
_frozen = true;
@ -3229,8 +3183,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
/**
* {@inheritDoc}
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public TimeZoneFormat cloneAsThawed() {
TimeZoneFormat copy = (TimeZoneFormat)super.clone();

View File

@ -70,8 +70,7 @@ import com.ibm.icu.util.ULocale;
* {@link #getMetaZoneID(String, long)}, and {@link #getReferenceZoneID(String, String)} won't be changed no matter
* what locale is used for getting an instance of <code>TimeZoneNames</code>.
*
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public abstract class TimeZoneNames implements Serializable {
@ -80,50 +79,43 @@ public abstract class TimeZoneNames implements Serializable {
/**
* Time zone display name types
*
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public enum NameType {
/**
* Long display name, such as "Eastern Time".
*
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
LONG_GENERIC,
/**
* Long display name for standard time, such as "Eastern Standard Time".
*
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
LONG_STANDARD,
/**
* Long display name for daylight saving time, such as "Eastern Daylight Time".
*
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
LONG_DAYLIGHT,
/**
* Short display name, such as "ET".
*
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
SHORT_GENERIC,
/**
* Short display name for standard time, such as "EST".
*
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
SHORT_STANDARD,
/**
* Short display name for daylight saving time, such as "EDT".
*
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
SHORT_DAYLIGHT,
/**
@ -173,8 +165,7 @@ public abstract class TimeZoneNames implements Serializable {
* @param locale
* The locale.
* @return An instance of <code>TimeZoneDisplayNames</code>
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public static TimeZoneNames getInstance(ULocale locale) {
String key = locale.getBaseName();
@ -184,8 +175,7 @@ public abstract class TimeZoneNames implements Serializable {
/**
* Returns an immutable set of all available meta zone IDs.
* @return An immutable set of all available meta zone IDs.
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public abstract Set<String> getAvailableMetaZoneIDs();
@ -195,8 +185,7 @@ public abstract class TimeZoneNames implements Serializable {
* @param tzID
* The canonical time zone ID.
* @return An immutable set of all available meta zone IDs used by the given time zone.
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public abstract Set<String> getAvailableMetaZoneIDs(String tzID);
@ -210,8 +199,7 @@ public abstract class TimeZoneNames implements Serializable {
* @return The meta zone ID for the given time zone ID at the given date. If the time zone does not have a
* corresponding meta zone at the given date or the implementation does not support meta zones, null is
* returned.
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public abstract String getMetaZoneID(String tzID, long date);
@ -229,8 +217,7 @@ public abstract class TimeZoneNames implements Serializable {
* The region.
* @return The reference zone ID ("golden zone" in the LDML specification) for the given time zone ID for the
* region. If the meta zone is unknown or the implementation does not support meta zones, null is returned.
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public abstract String getReferenceZoneID(String mzID, String region);
@ -244,8 +231,7 @@ public abstract class TimeZoneNames implements Serializable {
* @return The display name of the meta zone. When this object does not have a localized display name for the given
* meta zone with the specified type or the implementation does not provide any display names associated
* with meta zones, null is returned.
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public abstract String getMetaZoneDisplayName(String mzID, NameType type);
@ -265,8 +251,7 @@ public abstract class TimeZoneNames implements Serializable {
* The date
* @return The display name for the time zone at the given date. When this object does not have a localized display
* name for the time zone with the specified type and date, null is returned.
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public final String getDisplayName(String tzID, NameType type, long date) {
String name = getTimeZoneDisplayName(tzID, type);
@ -287,8 +272,7 @@ public abstract class TimeZoneNames implements Serializable {
* The display name type. See {@link TimeZoneNames.NameType}.
* @return The display name for the time zone. When this object does not have a localized display name for the given
* time zone with the specified type, null is returned.
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public abstract String getTimeZoneDisplayName(String tzID, NameType type);
@ -309,8 +293,7 @@ public abstract class TimeZoneNames implements Serializable {
* The canonical time zone ID
* @return The exemplar location name for the given time zone, or null when a localized location name is not
* available and the fallback logic described above cannot extract location from the ID.
* @draft ICU 49
* @provisional This API might change or be removed in a future release.
* @stable ICU 49
*/
public String getExemplarLocationName(String tzID) {
return TimeZoneNamesImpl.getDefaultExemplarLocationName(tzID);

View File

@ -52,8 +52,7 @@ import com.ibm.icu.impl.ICUResourceBundle;
* ( WORLD, CONTINENT, or SUBCONTINENT ) will always be the containing region instead.
*
* @author John Emmons
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public class Region implements Comparable<Region> {
@ -62,55 +61,47 @@ public class Region implements Comparable<Region> {
* RegionType is an enumeration defining the different types of regions. Current possible
* values are WORLD, CONTINENT, SUBCONTINENT, TERRITORY, GROUPING, DEPRECATED, and UNKNOWN.
*
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public enum RegionType {
/**
* Type representing the unknown region.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
UNKNOWN,
/**
* Type representing a territory.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
TERRITORY,
/**
* Type representing the whole world.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
WORLD,
/**
* Type representing a continent.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
CONTINENT,
/**
* Type representing a sub-continent.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
SUBCONTINENT,
/**
* Type representing a grouping of territories that is not to be used in
* the normal WORLD/CONTINENT/SUBCONTINENT/TERRITORY containment tree.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
GROUPING,
/**
* Type representing a region whose code has been deprecated, usually
* due to a country splitting into multiple territories or changing its name.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
DEPRECATED,
}
@ -337,8 +328,7 @@ public class Region implements Comparable<Region> {
* @return The corresponding region.
* @throws NullPointerException if the supplied id is null.
* @throws IllegalArgumentException if the supplied ID cannot be canonicalized to a Region ID that is known by ICU.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static Region getInstance(String id) {
@ -371,8 +361,7 @@ public class Region implements Comparable<Region> {
* @param code The numeric code of the region to be retrieved.
* @return The corresponding region.
* @throws IllegalArgumentException if the supplied numeric code is not recognized.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static Region getInstance(int code) {
@ -408,8 +397,7 @@ public class Region implements Comparable<Region> {
*
* @param type The type of regions to be returned ( TERRITORY, MACROREGION, etc. )
* @return An unmodifiable set of all known regions that match the given type.
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public static Set<Region> getAvailable(RegionType type) {
@ -424,8 +412,7 @@ public class Region implements Comparable<Region> {
* @return The region that geographically contains this region. Returns NULL if this region is
* code "001" (World) or "ZZ" (Unknown region). For example, calling this method with region "IT" (Italy)
* returns the region "039" (Southern Europe).
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public Region getContainingRegion() {
@ -438,8 +425,7 @@ public class Region implements Comparable<Region> {
* @return The region that geographically contains this region and matches the given type. May return NULL if
* no containing region can be found that matches the given type. For example, calling this method with region "IT" (Italy)
* and type CONTINENT returns the region "150" (Europe).
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public Region getContainingRegion(RegionType type) {
@ -464,8 +450,7 @@ public class Region implements Comparable<Region> {
* the various sub regions of Europe - "039" (Southern Europe) - "151" (Eastern Europe)
* - "154" (Northern Europe) and "155" (Western Europe).
*
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public Set<Region> getContainedRegions() {
@ -480,8 +465,7 @@ public class Region implements Comparable<Region> {
* if this region doesn't have any sub-regions that match the given type.
* For example, calling this method with region "150" (Europe) and type "TERRITORY" returns a set
* containing all the territories in Europe ( "FR" (France) - "IT" (Italy) - "DE" (Germany) etc. )
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public Set<Region> getContainedRegions(RegionType type) {
@ -505,9 +489,8 @@ public class Region implements Comparable<Region> {
* @return For deprecated regions, return an unmodifiable list of the regions that are the preferred replacement regions for this region.
* Returns null for a non-deprecated region. For example, calling this method with region "SU" (Soviet Union) would
* return a list of the regions containing "RU" (Russia), "AM" (Armenia), "AZ" (Azerbaijan), etc...
*
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
*
* @stable ICU 50
*/
public List<Region> getPreferredValues() {
@ -523,8 +506,7 @@ public class Region implements Comparable<Region> {
/**
* @return Returns true if this region contains the supplied other region anywhere in the region hierarchy.
*
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public boolean contains(Region other) {
@ -547,8 +529,7 @@ public class Region implements Comparable<Region> {
*
* @return The string representation of this region, which is its ID.
*
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public String toString() {
@ -561,8 +542,7 @@ public class Region implements Comparable<Region> {
* @return The numeric code for this region. Returns a negative value if the given region does not have a numeric
* code assigned to it. This is a very rare case and only occurs for a few very small territories.
*
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public int getNumericCode() {
@ -573,8 +553,7 @@ public class Region implements Comparable<Region> {
*
* @return This region's type classification, such as MACROREGION or TERRITORY.
*
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public RegionType getType() {
@ -583,8 +562,7 @@ public class Region implements Comparable<Region> {
/**
* {@inheritDoc}
* @draft ICU 50
* @provisional This API might change or be removed in a future release.
* @stable ICU 50
*/
public int compareTo(Region other) {
return id.compareTo(other.id);