ICU-11918 ICU4J API promotion from draft to stable

X-SVN-Rev: 37985
This commit is contained in:
Scott Russell 2015-09-22 13:52:13 +00:00
parent 09b798d757
commit 990774fbd4
28 changed files with 190 additions and 373 deletions

View file

@ -5286,8 +5286,7 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
* @return lowercase version of the argument string
* @see #TITLECASE_NO_LOWERCASE
* @see #TITLECASE_NO_BREAK_ADJUSTMENT
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static String toTitleCase(Locale locale, String str,
BreakIterator titleIter,

View file

@ -1071,8 +1071,7 @@ public final class UScript {
*
* @param nameOrAbbr name of the script or ISO 15924 code
* @return The script code value, or INVALID_CODE if the code cannot be found.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final int getCodeFromName(String nameOrAbbr) {
int propNum = UCharacter.getPropertyValueEnumNoThrow(UProperty.SCRIPT, nameOrAbbr);

View file

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2009-2014, International Business Machines Corporation and *
* Copyright (C) 2009-2015, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -46,8 +46,7 @@ public abstract class CurrencyDisplayNames {
*
* @param locale the locale into which to localize the names
* @return a CurrencyDisplayNames
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static CurrencyDisplayNames getInstance(Locale locale) {
return getInstance(locale, true);
@ -83,8 +82,7 @@ public abstract class CurrencyDisplayNames {
* @param locale the JDK locale into which to localize the names
* @param noSubstitute if true, do not return substitute values.
* @return a CurrencyDisplayNames
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static CurrencyDisplayNames getInstance(Locale locale, boolean noSubstitute) {
return getInstance(ULocale.forLocale(locale), noSubstitute);

View file

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2009-2014, International Business Machines Corporation and *
* Copyright (C) 2009-2015, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -547,8 +547,7 @@ public class CurrencyMetaInfo {
* @param isoCode the currency code
* @param currencyUsage the currency usage
* @return the CurrencyDigits
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public CurrencyDigits currencyDigits(String isoCode, CurrencyUsage currencyUsage) {
return defaultDigits;

View file

@ -2089,8 +2089,7 @@ public abstract class DateFormat extends UFormat {
* {@link DateTimePatternGenerator}.) This can be {@link DateFormat#ABBR_MONTH},
* {@link DateFormat#MONTH_WEEKDAY_DAY}, etc.
*
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public final static DateFormat getInstanceForSkeleton(String skeleton) {
return getPatternInstance(skeleton, ULocale.getDefault(Category.FORMAT));
@ -2106,8 +2105,7 @@ public abstract class DateFormat extends UFormat {
*
* @param locale The locale for which the date/time format is desired.
*
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public final static DateFormat getInstanceForSkeleton(String skeleton, Locale locale) {
return getPatternInstance(skeleton, ULocale.forLocale(locale));
@ -2123,8 +2121,7 @@ public abstract class DateFormat extends UFormat {
*
* @param locale The locale for which the date/time format is desired.
*
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public final static DateFormat getInstanceForSkeleton(String skeleton, ULocale locale) {
DateTimePatternGenerator generator = DateTimePatternGenerator.getInstance(locale);
@ -2145,8 +2142,7 @@ public abstract class DateFormat extends UFormat {
*
* @param locale The locale for which the date/time format is desired.
*
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public final static DateFormat getInstanceForSkeleton(Calendar cal, String skeleton, Locale locale) {
return getPatternInstance(cal, skeleton, ULocale.forLocale(locale));
@ -2165,8 +2161,7 @@ public abstract class DateFormat extends UFormat {
*
* @param locale The locale for which the date/time format is desired.
*
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public final static DateFormat getInstanceForSkeleton(
Calendar cal, String skeleton, ULocale locale) {

View file

@ -1072,8 +1072,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* @param width The requested name width: WIDE, ABBREVIATED, SHORT, NARROW.
* @return The year name strings, or null if they are not
* available for this calendar.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public String[] getYearNames(int context, int width) {
// context & width ignored for now, one set of names for all uses
@ -1088,8 +1087,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* @param yearNames The new cyclic year name strings.
* @param context The usage context: FORMAT, STANDALONE (currently only FORMAT is supported).
* @param width The name width: WIDE, ABBREVIATED, NARROW (currently only ABBREVIATED is supported).
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public void setYearNames(String[] yearNames, int context, int width) {
if (context == FORMAT && width == ABBREVIATED) {
@ -1104,8 +1102,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* @param width The requested name width: WIDE, ABBREVIATED, SHORT, NARROW.
* @return The zodiac name strings, or null if they are not
* available for this calendar.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public String[] getZodiacNames(int context, int width) {
// context & width ignored for now, one set of names for all uses
@ -1120,8 +1117,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* @param zodiacNames The new zodiac name strings.
* @param context The usage context: FORMAT, STANDALONE (currently only FORMAT is supported).
* @param width The name width: WIDE, ABBREVIATED, NARROW (currently only ABBREVIATED is supported).
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public void setZodiacNames(String[] zodiacNames, int context, int width) {
if (context == FORMAT && width == ABBREVIATED) {

View file

@ -355,8 +355,7 @@ public class DateIntervalInfo implements Cloneable, Freezable<DateIntervalInfo>,
* @param locale the interval patterns are loaded from the appropriate
* calendar data (specified calendar or default calendar)
* in this locale.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public DateIntervalInfo(Locale locale)
{

View file

@ -90,8 +90,7 @@ public class DateTimePatternGenerator implements Freezable<DateTimePatternGenera
/**
* Construct a flexible generator according to data for a given locale.
* @param locale The JDK locale to pass.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static DateTimePatternGenerator getInstance(Locale locale) {
return getInstance(ULocale.forLocale(locale));

View file

@ -3803,8 +3803,7 @@ public class DecimalFormat extends NumberFormat {
* pattern.
* @param value true if input must contain a match to decimal mark in pattern
* Default is false.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public void setDecimalPatternMatchRequired(boolean value) {
parseRequireDecimalPoint = value;
@ -3814,8 +3813,7 @@ public class DecimalFormat extends NumberFormat {
* {@icu} Returns whether the input to parsing must contain a decimal mark if there
* is a decimal mark in the pattern.
* @return true if input must contain a match to decimal mark in pattern
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public boolean isDecimalPatternMatchRequired() {
return parseRequireDecimalPoint;
@ -5317,8 +5315,7 @@ public class DecimalFormat extends NumberFormat {
* This takes effect immediately, if this format is a
* currency format.
* @param newUsage new currency context object to use.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public void setCurrencyUsage(CurrencyUsage newUsage) {
if (newUsage == null) {
@ -5338,8 +5335,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Returns the <tt>Currency Usage</tt> object used to display currency
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public CurrencyUsage getCurrencyUsage() {
return currencyUsage;

View file

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 1996-2014, International Business Machines Corporation and *
* Copyright (C) 1996-2015, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -547,8 +547,7 @@ public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Returns the multiplication sign
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public String getExponentMultiplicationSign() {
return exponentMultiplicationSign;
@ -556,8 +555,7 @@ public class DecimalFormatSymbols implements Cloneable, Serializable {
/**
* Sets the multiplication sign
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public void setExponentMultiplicationSign(String exponentMultiplicationSign) {
this.exponentMultiplicationSign = exponentMultiplicationSign;

View file

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2012-2014, International Business Machines Corporation and *
* Copyright (C) 2012-2015, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -77,16 +77,14 @@ public enum DisplayContext {
* A possible setting for DISPLAY_LENGTH:
* use full names when generating a locale name,
* e.g. "United States" for US.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
LENGTH_FULL(Type.DISPLAY_LENGTH, 0),
/**
* A possible setting for DISPLAY_LENGTH:
* use short names when generating a locale name,
* e.g. "U.S." for US.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
LENGTH_SHORT(Type.DISPLAY_LENGTH, 1);
@ -108,8 +106,7 @@ public enum DisplayContext {
CAPITALIZATION,
/**
* DISPLAY_LENGTH can be set to LENGTH_FULL or LENGTH_SHORT.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
DISPLAY_LENGTH
}

View file

@ -63,8 +63,7 @@ public abstract class LocaleDisplayNames {
* {@link DisplayContext#STANDARD_NAMES}.
* @param locale the display JDK locale
* @return a LocaleDisplayNames instance
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static LocaleDisplayNames getInstance(Locale locale) {
return getInstance(ULocale.forLocale(locale));
@ -130,8 +129,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 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static LocaleDisplayNames getInstance(Locale locale, DisplayContext... contexts) {
return getInstance(ULocale.forLocale(locale), contexts);

View file

@ -232,8 +232,7 @@ public class MeasureFormat extends UFormat {
* @param locale the JDK locale.
* @param formatWidth hints how long formatted strings should be.
* @return The new MeasureFormat object.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static MeasureFormat getInstance(Locale locale, FormatWidth formatWidth) {
return getInstance(ULocale.forLocale(locale), formatWidth);
@ -287,8 +286,7 @@ public class MeasureFormat extends UFormat {
* @param formatWidth hints how long formatted strings should be.
* @param format This is defensively copied.
* @return The new MeasureFormat object.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static MeasureFormat getInstance(Locale locale, FormatWidth formatWidth, NumberFormat format) {
return getInstance(ULocale.forLocale(locale), formatWidth, format);
@ -645,8 +643,7 @@ public class MeasureFormat extends UFormat {
* JDK locale.
* @param locale desired JDK locale
* @return a formatter object
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static MeasureFormat getCurrencyFormat(Locale locale) {
return getCurrencyFormat(ULocale.forLocale(locale));

View file

@ -221,8 +221,7 @@ public abstract class NumberFormat extends UFormat {
/**
* {@icu} Constant to specify currency cash style of format which uses currency
* ISO code to represent currency, for example: "NT$3" instead of "NT$3.23".
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final int CASHCURRENCYSTYLE = 8;
/**

View file

@ -205,8 +205,7 @@ public class PluralFormat extends UFormat {
* @param locale the <code>PluralFormat</code> will be configured with
* rules for this locale. This locale will also be used for standard
* number formatting.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public PluralFormat(Locale locale) {
this(ULocale.forLocale(locale));
@ -244,8 +243,7 @@ public class PluralFormat extends UFormat {
* locale.
* @param rules defines the behavior of the <code>PluralFormat</code>
* object.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public PluralFormat(Locale locale, PluralRules rules) {
this(ULocale.forLocale(locale), rules);
@ -269,8 +267,7 @@ public class PluralFormat extends UFormat {
* @param locale the default number formatting will be done using this
* locale.
* @param type The plural type (e.g., cardinal or ordinal).
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public PluralFormat(Locale locale, PluralType type) {
this(ULocale.forLocale(locale), type);

View file

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2007-2014, International Business Machines Corporation and
* Copyright (C) 2007-2015, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*/
@ -1905,8 +1905,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 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static PluralRules forLocale(Locale locale) {
return forLocale(ULocale.forLocale(locale));
@ -1950,8 +1949,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 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static PluralRules forLocale(Locale locale, PluralType type) {
return forLocale(ULocale.forLocale(locale), type);

View file

@ -67,30 +67,26 @@ public final class RelativeDateTimeFormatter {
/**
* The formatting style
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*
*/
public static enum Style {
/**
* Everything spelled out.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
LONG,
/**
* Abbreviations used when possible.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
SHORT,
/**
* Use single letters when possible.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
NARROW,
}
@ -292,8 +288,7 @@ public final class RelativeDateTimeFormatter {
*
* @param locale the JDK locale.
* @return An instance of RelativeDateTimeFormatter.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static RelativeDateTimeFormatter getInstance(Locale locale) {
return getInstance(ULocale.forLocale(locale));
@ -322,8 +317,7 @@ public final class RelativeDateTimeFormatter {
* and immutability of this class. May be null.
* @param style the style.
* @param capitalizationContext the capitalization context.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static RelativeDateTimeFormatter getInstance(
ULocale locale,
@ -358,8 +352,7 @@ public final class RelativeDateTimeFormatter {
* @param nf the number format object. It is defensively copied to ensure thread-safety
* and immutability of this class.
* @return An instance of RelativeDateTimeFormatter.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static RelativeDateTimeFormatter getInstance(Locale locale, NumberFormat nf) {
return getInstance(ULocale.forLocale(locale), nf);
@ -444,8 +437,7 @@ public final class RelativeDateTimeFormatter {
/**
* Return capitalization context.
*
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public DisplayContext getCapitalizationContext() {
return capitalizationContext;
@ -454,8 +446,7 @@ public final class RelativeDateTimeFormatter {
/**
* Return style
*
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public Style getFormatStyle() {
return style;

View file

@ -4054,8 +4054,7 @@ public class SimpleDateFormat extends DateFormat {
* @param fields the fields to override
* @param overrideNF the NumbeferFormat used
* @exception IllegalArgumentException when the fields contain invalid field
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public void setNumberFormat(String fields, NumberFormat overrideNF) {
overrideNF.setGroupingUsed(false);
@ -4089,8 +4088,7 @@ public class SimpleDateFormat extends DateFormat {
*
* @param field the field the user wants
* @return override NumberFormat used for the field
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public NumberFormat getNumberFormat(char field) {
Character ovrField;

View file

@ -584,8 +584,7 @@ public class SpoofChecker {
* is null, no restrictions will be placed on the allowed characters.
*
* @return self
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public Builder setAllowedJavaLocales(Set<Locale> locales) {
HashSet<ULocale> ulocales = new HashSet<ULocale>(locales.size());
@ -1499,8 +1498,7 @@ public class SpoofChecker {
* have been specified, an empty set will be returned.
*
* @return A set of locales corresponding to the acceptable scripts.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public Set<Locale> getAllowedJavaLocales() {
HashSet<Locale> locales = new HashSet<Locale>(fAllowedLocales.size());

View file

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2011-2014, International Business Machines Corporation and *
* Copyright (C) 2011-2015, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -316,8 +316,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
* look for the IANA tz database compatible zone abbreviations in addition
* to the localized names coming from the {@link TimeZoneNames} currently
* used by the {@link TimeZoneFormat}.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
TZ_DATABASE_ABBREVIATIONS;
}
@ -498,8 +497,7 @@ public class TimeZoneFormat extends UFormat implements Freezable<TimeZoneFormat>
*
* @param locale the JDK locale.
* @return a frozen instance of <code>TimeZoneFormat</code> for the given locale.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static TimeZoneFormat getInstance(Locale locale) {
return getInstance(ULocale.forLocale(locale));

View file

@ -179,8 +179,7 @@ public abstract class TimeZoneNames implements Serializable {
* @param locale
* The JDK locale.
* @return An instance of <code>TimeZoneDisplayNames</code>
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static TimeZoneNames getInstance(Locale locale) {
return getInstance(ULocale.forLocale(locale));
@ -195,8 +194,7 @@ public abstract class TimeZoneNames implements Serializable {
* as Israel Standard Time for Israel, while it is parsed as India Standard Time for
* all other regions). The zone names returned by this instance are not localized.
*
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static TimeZoneNames getTZDBInstance(ULocale locale) {
return new TZDBTimeZoneNames(locale);

View file

@ -2615,8 +2615,7 @@ public final class UTF16 {
* @return the code point IF the string is non-null and consists of a single code point.
* otherwise returns -1.
* @param s to test
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static int getSingleCodePoint(CharSequence s) {
if (s == null || s.length() == 0) {
@ -2650,8 +2649,7 @@ public final class UTF16 {
* @param codePoint to test
* @param s to test
* @return equivalent of code point comparator comparing two strings.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static int compareCodePoint(int codePoint, CharSequence s) {
if (s == null) {

View file

@ -4209,22 +4209,19 @@ public class UnicodeSet extends UnicodeFilter implements Iterable<String>, Compa
* A struct-like class used for iteration through ranges, for faster iteration than by String.
* Read about the restrictions on usage in {@link UnicodeSet#ranges()}.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public static class EntryRange {
/**
* The starting code point of the range.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public int codepoint;
/**
* The ending code point of the range
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public int codepointEnd;
@ -4234,8 +4231,7 @@ public class UnicodeSet extends UnicodeFilter implements Iterable<String>, Compa
/**
* {@inheritDoc}
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
@Override
public String toString() {
@ -4267,8 +4263,7 @@ public class UnicodeSet extends UnicodeFilter implements Iterable<String>, Compa
* }
* </pre>
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public Iterable<EntryRange> ranges() {
return new EntryRangeIterable();

View file

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2014, International Business Machines Corporation and
* Copyright (C) 2014-2015, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*/
@ -38,8 +38,7 @@ import com.ibm.icu.util.OutputInt;
* </table>
* </p>The entire string is traversed.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public class UnicodeSetSpanner {
@ -52,8 +51,7 @@ public class UnicodeSetSpanner {
* @param source
* the original UnicodeSet
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public UnicodeSetSpanner(UnicodeSet source) {
unicodeSet = source;
@ -64,8 +62,7 @@ public class UnicodeSetSpanner {
*
* @return the construction set.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public UnicodeSet getUnicodeSet() {
return unicodeSet;
@ -75,8 +72,7 @@ public class UnicodeSetSpanner {
/**
* {@inheritDoc}
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
@Override
public boolean equals(Object other) {
@ -86,8 +82,7 @@ public class UnicodeSetSpanner {
/**
* {@inheritDoc}
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
@Override
public int hashCode() {
@ -98,16 +93,14 @@ public class UnicodeSetSpanner {
* Options for replaceFrom and countIn to control how to treat each matched span.
* It is similar to whether one is replacing [abc] by x, or [abc]* by x.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public enum CountMethod {
/**
* Collapse spans. That is, modify/count the entire matching span as a single item, instead of separate
* set elements.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
WHOLE_SPAN,
/**
@ -121,8 +114,7 @@ public class UnicodeSetSpanner {
* <li>spanning with [ab{ab}] will also count two MIN_ELEMENTS.</li>
* </ul>
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
MIN_ELEMENTS,
// Note: could in the future have an additional option MAX_ELEMENTS
@ -136,8 +128,7 @@ public class UnicodeSetSpanner {
* the sequence to count characters in
* @return the count. Zero if there are none.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public int countIn(CharSequence sequence) {
return countIn(sequence, CountMethod.MIN_ELEMENTS, SpanCondition.SIMPLE);
@ -152,8 +143,7 @@ public class UnicodeSetSpanner {
* whether to treat an entire span as a match, or individual elements as matches
* @return the count. Zero if there are none.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public int countIn(CharSequence sequence, CountMethod countMethod) {
return countIn(sequence, countMethod, SpanCondition.SIMPLE);
@ -172,8 +162,7 @@ public class UnicodeSetSpanner {
* <br><b>WARNING: </b> when a UnicodeSet contains strings, there may be unexpected behavior in edge cases.
* @return the count. Zero if there are none.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public int countIn(CharSequence sequence, CountMethod countMethod, SpanCondition spanCondition) {
int count = 0;
@ -208,8 +197,7 @@ public class UnicodeSetSpanner {
* charsequence to replace matching spans in.
* @return modified string.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public String deleteFrom(CharSequence sequence) {
return replaceFrom(sequence, "", CountMethod.WHOLE_SPAN, SpanCondition.SIMPLE);
@ -224,8 +212,7 @@ public class UnicodeSetSpanner {
* specify whether to modify the matching spans (CONTAINED or SIMPLE) or the non-matching (NOT_CONTAINED)
* @return modified string.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public String deleteFrom(CharSequence sequence, SpanCondition spanCondition) {
return replaceFrom(sequence, "", CountMethod.WHOLE_SPAN, spanCondition);
@ -241,8 +228,7 @@ public class UnicodeSetSpanner {
* replacement sequence. To delete, use ""
* @return modified string.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public String replaceFrom(CharSequence sequence, CharSequence replacement) {
return replaceFrom(sequence, replacement, CountMethod.MIN_ELEMENTS, SpanCondition.SIMPLE);
@ -260,8 +246,7 @@ public class UnicodeSetSpanner {
* whether to treat an entire span as a match, or individual elements as matches
* @return modified string.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public String replaceFrom(CharSequence sequence, CharSequence replacement, CountMethod countMethod) {
return replaceFrom(sequence, replacement, countMethod, SpanCondition.SIMPLE);
@ -281,8 +266,7 @@ public class UnicodeSetSpanner {
* (NOT_CONTAINED)
* @return modified string.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public String replaceFrom(CharSequence sequence, CharSequence replacement, CountMethod countMethod,
SpanCondition spanCondition) {
@ -326,29 +310,25 @@ public class UnicodeSetSpanner {
/**
* Options for the trim() method
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public enum TrimOption {
/**
* Trim leading spans.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
LEADING,
/**
* Trim leading and trailing spans.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
BOTH,
/**
* Trim trailing spans.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
TRAILING;
}
@ -368,8 +348,7 @@ public class UnicodeSetSpanner {
* the sequence to trim
* @return a subsequence
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public CharSequence trim(CharSequence sequence) {
return trim(sequence, TrimOption.BOTH, SpanCondition.SIMPLE);
@ -393,8 +372,7 @@ public class UnicodeSetSpanner {
* LEADING, TRAILING, or BOTH
* @return a subsequence
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public CharSequence trim(CharSequence sequence, TrimOption trimOption) {
return trim(sequence, trimOption, SpanCondition.SIMPLE);
@ -420,8 +398,7 @@ public class UnicodeSetSpanner {
* SIMPLE, CONTAINED or NOT_CONTAINED
* @return a subsequence
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public CharSequence trim(CharSequence sequence, TrimOption trimOption, SpanCondition spanCondition) {
int endLeadContained, startTrailContained;

View file

@ -4659,51 +4659,44 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
/**
* Simple, immutable struct-like class for access to the CLDR weekend data.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public static final class WeekData {
/**
* the first day of the week, where 1 = {@link #SUNDAY} and 7 = {@link #SATURDAY}
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public final int firstDayOfWeek;
/**
* the minimal number of days in the first week
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public final int minimalDaysInFirstWeek;
/**
* the onset day, where 1 = {@link #SUNDAY} and 7 = {@link #SATURDAY}
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public final int weekendOnset;
/**
* the onset time in millis during the onset day
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public final int weekendOnsetMillis;
/**
* the cease day, where 1 = {@link #SUNDAY} and 7 = {@link #SATURDAY}
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public final int weekendCease;
/**
* the cease time in millis during the cease day. Exclusive, so the max is 24:00:00.000.
* Note that this will format as 00:00 the next day.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public final int weekendCeaseMillis;
@ -4717,8 +4710,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
* @param weekendCease the cease day, where 1 = Sunday and 7 = Saturday
* @param weekendCeaseMillis the cease time in millis during the cease day.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public WeekData(int fdow, int mdifw,
int weekendOnset, int weekendOnsetMillis,
@ -4734,8 +4726,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
/**
* {@inheritDoc}
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
@Override
public int hashCode() {
@ -4746,8 +4737,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
/**
* {@inheritDoc}
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
@Override
public boolean equals(Object other) {
@ -4769,8 +4759,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
/**
* {@inheritDoc}
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
@Override
public String toString() {
@ -4789,8 +4778,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
* @param region The input region. The results are undefined if the region code is not valid.
* @return the WeekData for the input region. It is never null.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public static WeekData getWeekDataForRegion(String region) {
return WEEK_DATA_CACHE.createInstance(region, region);
@ -4800,8 +4788,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
* {@icu} Return simple, immutable struct-like class for access to the weekend data in this calendar.
* @return the WeekData for this calendar.
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public WeekData getWeekData() {
return new WeekData(firstDayOfWeek, minimalDaysInFirstWeek, weekendOnset, weekendOnsetMillis, weekendCease, weekendCeaseMillis);
@ -4812,8 +4799,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
* @param wdata The week data to use
* @return this, for chaining
*
* @draft ICU 54
* @provisional This is a draft API and might change in a future release of ICU.
* @stable ICU 54
*/
public Calendar setWeekData(WeekData wdata) {
setFirstDayOfWeek(wdata.firstDayOfWeek);

View file

@ -91,23 +91,20 @@ public class Currency extends MeasureUnit {
/**
* Currency Usage used for Decimal Format
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public enum CurrencyUsage{
/**
* a setting to specify currency usage which determines currency digit and rounding
* for standard usage, for example: "50.00 NT$"
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
STANDARD,
/**
* a setting to specify currency usage which determines currency digit and rounding
* for cash usage, for example: "50 NT$"
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
CASH
}
@ -202,8 +199,7 @@ public class Currency extends MeasureUnit {
* @param loc the JDK locale for which to retrieve currency codes.
* @param d the date for which to retrieve currency codes for the given locale.
* @return The array of ISO currency codes.
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static String[] getAvailableCurrencyCodes(Locale loc, Date d) {
return getAvailableCurrencyCodes(ULocale.forLocale(loc), d);
@ -782,8 +778,7 @@ public class Currency extends MeasureUnit {
* @param Usage the usage of currency(Standard or Cash)
* @return a non-negative number of fraction digits to be
* displayed
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public int getDefaultFractionDigits(CurrencyUsage Usage) {
CurrencyMetaInfo info = CurrencyMetaInfo.getInstance();
@ -807,8 +802,7 @@ public class Currency extends MeasureUnit {
* rounding is done by this currency with the Usage.
* @param Usage the usage of currency(Standard or Cash)
* @return the non-negative rounding increment, or 0.0 if none
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public double getRoundingIncrement(CurrencyUsage Usage) {
CurrencyMetaInfo info = CurrencyMetaInfo.getInstance();

View file

@ -331,8 +331,7 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of acceleration: meter-per-second-squared
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit METER_PER_SECOND_SQUARED = MeasureUnit.internalGetInstance("acceleration", "meter-per-second-squared");
@ -356,8 +355,7 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of angle: radian
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit RADIAN = MeasureUnit.internalGetInstance("angle", "radian");
@ -382,8 +380,7 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of area: square-centimeter
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit SQUARE_CENTIMETER = MeasureUnit.internalGetInstance("area", "square-centimeter");
@ -395,8 +392,7 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of area: square-inch
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit SQUARE_INCH = MeasureUnit.internalGetInstance("area", "square-inch");
@ -420,8 +416,7 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of area: square-yard
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit SQUARE_YARD = MeasureUnit.internalGetInstance("area", "square-yard");
@ -434,85 +429,73 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of consumption: liter-per-kilometer
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit LITER_PER_KILOMETER = MeasureUnit.internalGetInstance("consumption", "liter-per-kilometer");
/**
* Constant for unit of consumption: mile-per-gallon
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit MILE_PER_GALLON = MeasureUnit.internalGetInstance("consumption", "mile-per-gallon");
/**
* Constant for unit of digital: bit
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit BIT = MeasureUnit.internalGetInstance("digital", "bit");
/**
* Constant for unit of digital: byte
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit BYTE = MeasureUnit.internalGetInstance("digital", "byte");
/**
* Constant for unit of digital: gigabit
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit GIGABIT = MeasureUnit.internalGetInstance("digital", "gigabit");
/**
* Constant for unit of digital: gigabyte
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit GIGABYTE = MeasureUnit.internalGetInstance("digital", "gigabyte");
/**
* Constant for unit of digital: kilobit
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit KILOBIT = MeasureUnit.internalGetInstance("digital", "kilobit");
/**
* Constant for unit of digital: kilobyte
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit KILOBYTE = MeasureUnit.internalGetInstance("digital", "kilobyte");
/**
* Constant for unit of digital: megabit
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit MEGABIT = MeasureUnit.internalGetInstance("digital", "megabit");
/**
* Constant for unit of digital: megabyte
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit MEGABYTE = MeasureUnit.internalGetInstance("digital", "megabyte");
/**
* Constant for unit of digital: terabit
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit TERABIT = MeasureUnit.internalGetInstance("digital", "terabit");
/**
* Constant for unit of digital: terabyte
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit TERABYTE = MeasureUnit.internalGetInstance("digital", "terabyte");
@ -537,8 +520,7 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of duration: microsecond
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit MICROSECOND = MeasureUnit.internalGetInstance("duration", "microsecond");
@ -562,8 +544,7 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of duration: nanosecond
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit NANOSECOND = MeasureUnit.internalGetInstance("duration", "nanosecond");
@ -587,106 +568,91 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of electric: ampere
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit AMPERE = MeasureUnit.internalGetInstance("electric", "ampere");
/**
* Constant for unit of electric: milliampere
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit MILLIAMPERE = MeasureUnit.internalGetInstance("electric", "milliampere");
/**
* Constant for unit of electric: ohm
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit OHM = MeasureUnit.internalGetInstance("electric", "ohm");
/**
* Constant for unit of electric: volt
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit VOLT = MeasureUnit.internalGetInstance("electric", "volt");
/**
* Constant for unit of energy: calorie
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit CALORIE = MeasureUnit.internalGetInstance("energy", "calorie");
/**
* Constant for unit of energy: foodcalorie
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit FOODCALORIE = MeasureUnit.internalGetInstance("energy", "foodcalorie");
/**
* Constant for unit of energy: joule
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit JOULE = MeasureUnit.internalGetInstance("energy", "joule");
/**
* Constant for unit of energy: kilocalorie
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit KILOCALORIE = MeasureUnit.internalGetInstance("energy", "kilocalorie");
/**
* Constant for unit of energy: kilojoule
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit KILOJOULE = MeasureUnit.internalGetInstance("energy", "kilojoule");
/**
* Constant for unit of energy: kilowatt-hour
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit KILOWATT_HOUR = MeasureUnit.internalGetInstance("energy", "kilowatt-hour");
/**
* Constant for unit of frequency: gigahertz
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit GIGAHERTZ = MeasureUnit.internalGetInstance("frequency", "gigahertz");
/**
* Constant for unit of frequency: hertz
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit HERTZ = MeasureUnit.internalGetInstance("frequency", "hertz");
/**
* Constant for unit of frequency: kilohertz
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit KILOHERTZ = MeasureUnit.internalGetInstance("frequency", "kilohertz");
/**
* Constant for unit of frequency: megahertz
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit MEGAHERTZ = MeasureUnit.internalGetInstance("frequency", "megahertz");
/**
* Constant for unit of length: astronomical-unit
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit ASTRONOMICAL_UNIT = MeasureUnit.internalGetInstance("length", "astronomical-unit");
@ -698,15 +664,13 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of length: decimeter
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit DECIMETER = MeasureUnit.internalGetInstance("length", "decimeter");
/**
* Constant for unit of length: fathom
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit FATHOM = MeasureUnit.internalGetInstance("length", "fathom");
@ -718,8 +682,7 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of length: furlong
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit FURLONG = MeasureUnit.internalGetInstance("length", "furlong");
@ -749,8 +712,7 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of length: micrometer
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit MICROMETER = MeasureUnit.internalGetInstance("length", "micrometer");
@ -775,22 +737,19 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of length: nanometer
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit NANOMETER = MeasureUnit.internalGetInstance("length", "nanometer");
/**
* Constant for unit of length: nautical-mile
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit NAUTICAL_MILE = MeasureUnit.internalGetInstance("length", "nautical-mile");
/**
* Constant for unit of length: parsec
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit PARSEC = MeasureUnit.internalGetInstance("length", "parsec");
@ -808,15 +767,13 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of light: lux
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit LUX = MeasureUnit.internalGetInstance("light", "lux");
/**
* Constant for unit of mass: carat
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit CARAT = MeasureUnit.internalGetInstance("mass", "carat");
@ -834,22 +791,19 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of mass: metric-ton
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit METRIC_TON = MeasureUnit.internalGetInstance("mass", "metric-ton");
/**
* Constant for unit of mass: microgram
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit MICROGRAM = MeasureUnit.internalGetInstance("mass", "microgram");
/**
* Constant for unit of mass: milligram
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit MILLIGRAM = MeasureUnit.internalGetInstance("mass", "milligram");
@ -861,8 +815,7 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of mass: ounce-troy
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit OUNCE_TROY = MeasureUnit.internalGetInstance("mass", "ounce-troy");
@ -874,22 +827,19 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of mass: stone
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit STONE = MeasureUnit.internalGetInstance("mass", "stone");
/**
* Constant for unit of mass: ton
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit TON = MeasureUnit.internalGetInstance("mass", "ton");
/**
* Constant for unit of power: gigawatt
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit GIGAWATT = MeasureUnit.internalGetInstance("power", "gigawatt");
@ -907,15 +857,13 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of power: megawatt
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit MEGAWATT = MeasureUnit.internalGetInstance("power", "megawatt");
/**
* Constant for unit of power: milliwatt
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit MILLIWATT = MeasureUnit.internalGetInstance("power", "milliwatt");
@ -945,22 +893,19 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of pressure: millimeter-of-mercury
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit MILLIMETER_OF_MERCURY = MeasureUnit.internalGetInstance("pressure", "millimeter-of-mercury");
/**
* Constant for unit of pressure: pound-per-square-inch
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit POUND_PER_SQUARE_INCH = MeasureUnit.internalGetInstance("pressure", "pound-per-square-inch");
/**
* Constant for unit of proportion: karat
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit KARAT = MeasureUnit.internalGetInstance("proportion", "karat");
@ -1010,50 +955,43 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of temperature: kelvin
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit KELVIN = MeasureUnit.internalGetInstance("temperature", "kelvin");
/**
* Constant for unit of volume: acre-foot
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit ACRE_FOOT = MeasureUnit.internalGetInstance("volume", "acre-foot");
/**
* Constant for unit of volume: bushel
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit BUSHEL = MeasureUnit.internalGetInstance("volume", "bushel");
/**
* Constant for unit of volume: centiliter
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit CENTILITER = MeasureUnit.internalGetInstance("volume", "centiliter");
/**
* Constant for unit of volume: cubic-centimeter
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit CUBIC_CENTIMETER = MeasureUnit.internalGetInstance("volume", "cubic-centimeter");
/**
* Constant for unit of volume: cubic-foot
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit CUBIC_FOOT = MeasureUnit.internalGetInstance("volume", "cubic-foot");
/**
* Constant for unit of volume: cubic-inch
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit CUBIC_INCH = MeasureUnit.internalGetInstance("volume", "cubic-inch");
@ -1065,8 +1003,7 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of volume: cubic-meter
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit CUBIC_METER = MeasureUnit.internalGetInstance("volume", "cubic-meter");
@ -1078,15 +1015,13 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of volume: cubic-yard
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit CUBIC_YARD = MeasureUnit.internalGetInstance("volume", "cubic-yard");
/**
* Constant for unit of volume: cup
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit CUP = MeasureUnit.internalGetInstance("volume", "cup");
@ -1099,29 +1034,25 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of volume: deciliter
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit DECILITER = MeasureUnit.internalGetInstance("volume", "deciliter");
/**
* Constant for unit of volume: fluid-ounce
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit FLUID_OUNCE = MeasureUnit.internalGetInstance("volume", "fluid-ounce");
/**
* Constant for unit of volume: gallon
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit GALLON = MeasureUnit.internalGetInstance("volume", "gallon");
/**
* Constant for unit of volume: hectoliter
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit HECTOLITER = MeasureUnit.internalGetInstance("volume", "hectoliter");
@ -1133,22 +1064,19 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of volume: megaliter
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit MEGALITER = MeasureUnit.internalGetInstance("volume", "megaliter");
/**
* Constant for unit of volume: milliliter
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit MILLILITER = MeasureUnit.internalGetInstance("volume", "milliliter");
/**
* Constant for unit of volume: pint
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit PINT = MeasureUnit.internalGetInstance("volume", "pint");
@ -1161,22 +1089,19 @@ public class MeasureUnit implements Serializable {
/**
* Constant for unit of volume: quart
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit QUART = MeasureUnit.internalGetInstance("volume", "quart");
/**
* Constant for unit of volume: tablespoon
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit TABLESPOON = MeasureUnit.internalGetInstance("volume", "tablespoon");
/**
* Constant for unit of volume: teaspoon
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static final MeasureUnit TEASPOON = MeasureUnit.internalGetInstance("volume", "teaspoon");

View file

@ -1374,8 +1374,7 @@ public final class ULocale implements Serializable, Comparable<ULocale> {
* <p>Returns true for "ar" and "en-Hebr", false for "zh" and "fa-Cyrl".
*
* @return true if the locale's script is written right-to-left
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public boolean isRightToLeft() {
String script = getScript();
@ -3408,8 +3407,7 @@ public final class ULocale implements Serializable, Comparable<ULocale> {
* or null if the specified locale keyword cannot be mapped
* to a well-formed BCP 47 Unicode locale extension key.
* @see #toLegacyKey(String)
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static String toUnicodeLocaleKey(String keyword) {
String bcpKey = KeyTypeData.toBcpKey(keyword);
@ -3445,8 +3443,7 @@ public final class ULocale implements Serializable, Comparable<ULocale> {
* or null if the locale keyword value cannot be mapped to
* a well-formed BCP 47 Unicode locale extension type.
* @see #toLegacyType(String, String)
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static String toUnicodeLocaleType(String keyword, String value) {
String bcpType = KeyTypeData.toBcpType(keyword, value, null, null);
@ -3467,8 +3464,7 @@ public final class ULocale implements Serializable, Comparable<ULocale> {
* @return the well-formed legacy key, or null if the specified
* keyword cannot be mapped to a well-formed legacy key.
* @see #toUnicodeLocaleKey(String)
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static String toLegacyKey(String keyword) {
String legacyKey = KeyTypeData.toLegacyKey(keyword);
@ -3512,8 +3508,7 @@ public final class ULocale implements Serializable, Comparable<ULocale> {
* keyword value cannot be mapped to a well-formed legacy
* type.
* @see #toUnicodeLocaleType(String, String)
* @draft ICU 54
* @provisional This API might change or be removed in a future release.
* @stable ICU 54
*/
public static String toLegacyType(String keyword, String value) {
String legacyType = KeyTypeData.toLegacyType(keyword, value, null, null);