ICU-11567 Promote draft APIs to stable in ICU 55.
X-SVN-Rev: 37214
This commit is contained in:
parent
22dd5c9096
commit
f9cf01598c
@ -1303,8 +1303,7 @@ public abstract class Collator implements Comparator<Object>, Freezable<Collator
|
||||
* or Collator.ReorderCodes.DEFAULT to restore the default max variable group
|
||||
* @return this
|
||||
* @see #getMaxVariable
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public Collator setMaxVariable(int group) {
|
||||
throw new UnsupportedOperationException("Needs to be implemented by the subclass.");
|
||||
@ -1317,8 +1316,7 @@ public abstract class Collator implements Comparator<Object>, Freezable<Collator
|
||||
* <p>The base class implementation returns Collator.ReorderCodes.PUNCTUATION.
|
||||
* @return the maximum variable reordering group.
|
||||
* @see #setMaxVariable
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public int getMaxVariable() {
|
||||
return Collator.ReorderCodes.PUNCTUATION;
|
||||
|
@ -739,8 +739,7 @@ public final class RuleBasedCollator extends Collator {
|
||||
* or Collator.ReorderCodes.DEFAULT to restore the default max variable group
|
||||
* @return this
|
||||
* @see #getMaxVariable
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
@Override
|
||||
public RuleBasedCollator setMaxVariable(int group) {
|
||||
@ -781,8 +780,7 @@ public final class RuleBasedCollator extends Collator {
|
||||
* the alternate handling behavior.
|
||||
* @return the maximum variable reordering group.
|
||||
* @see #setMaxVariable
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
@Override
|
||||
public int getMaxVariable() {
|
||||
|
@ -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. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -732,15 +732,13 @@ public abstract class SearchIterator
|
||||
*
|
||||
* @see #setElementComparisonType(ElementComparisonType)
|
||||
* @see #getElementComparisonType()
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public enum ElementComparisonType {
|
||||
/**
|
||||
* Standard collation element comparison at the specified collator strength.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
STANDARD_ELEMENT_COMPARISON,
|
||||
/**
|
||||
@ -755,8 +753,7 @@ public abstract class SearchIterator
|
||||
* diacritic in the pattern will only match an e with the same diacritic in
|
||||
* the searched text.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
PATTERN_BASE_WEIGHT_IS_WILDCARD,
|
||||
|
||||
@ -772,8 +769,7 @@ public abstract class SearchIterator
|
||||
* diacritic in the pattern will only match an e with the same diacritic or a
|
||||
* plain e in the searched text.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
ANY_BASE_WEIGHT_IS_WILDCARD
|
||||
}
|
||||
@ -785,8 +781,7 @@ public abstract class SearchIterator
|
||||
*
|
||||
* @see ElementComparisonType
|
||||
* @see #getElementComparisonType()
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public void setElementComparisonType(ElementComparisonType type) {
|
||||
search_.elementComparisonType_ = type;
|
||||
@ -797,8 +792,7 @@ public abstract class SearchIterator
|
||||
*
|
||||
* @see ElementComparisonType
|
||||
* @see #setElementComparisonType(ElementComparisonType)
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public ElementComparisonType getElementComparisonType() {
|
||||
return search_.elementComparisonType_;
|
||||
|
@ -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. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -382,72 +382,62 @@ public abstract class BreakIterator implements Cloneable
|
||||
/**
|
||||
* Tag value for "words" that do not fit into any of other categories.
|
||||
* Includes spaces and most punctuation.
|
||||
* @draft ICU 53
|
||||
* @provisional This is a draft API and might change in a future release of ICU.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static final int WORD_NONE = 0;
|
||||
|
||||
/**
|
||||
* Upper bound for tags for uncategorized words.
|
||||
* @draft ICU 53
|
||||
* @provisional This is a draft API and might change in a future release of ICU.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static final int WORD_NONE_LIMIT = 100;
|
||||
|
||||
/**
|
||||
* Tag value for words that appear to be numbers, lower limit.
|
||||
* @draft ICU 53
|
||||
* @provisional This is a draft API and might change in a future release of ICU.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static final int WORD_NUMBER = 100;
|
||||
|
||||
/**
|
||||
* Tag value for words that appear to be numbers, upper limit.
|
||||
* @draft ICU 53
|
||||
* @provisional This is a draft API and might change in a future release of ICU.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static final int WORD_NUMBER_LIMIT = 200;
|
||||
|
||||
/**
|
||||
* Tag value for words that contain letters, excluding
|
||||
* hiragana, katakana or ideographic characters, lower limit.
|
||||
* @draft ICU 53
|
||||
* @provisional This is a draft API and might change in a future release of ICU.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static final int WORD_LETTER = 200;
|
||||
|
||||
/**
|
||||
* Tag value for words containing letters, upper limit
|
||||
* @draft ICU 53
|
||||
* @provisional This is a draft API and might change in a future release of ICU.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static final int WORD_LETTER_LIMIT = 300;
|
||||
|
||||
/**
|
||||
* Tag value for words containing kana characters, lower limit
|
||||
* @draft ICU 53
|
||||
* @provisional This is a draft API and might change in a future release of ICU.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static final int WORD_KANA = 300;
|
||||
|
||||
/**
|
||||
* Tag value for words containing kana characters, upper limit
|
||||
* @draft ICU 53
|
||||
* @provisional This is a draft API and might change in a future release of ICU.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static final int WORD_KANA_LIMIT = 400;
|
||||
|
||||
/**
|
||||
* Tag value for words containing ideographic characters, lower limit
|
||||
* @draft ICU 53
|
||||
* @provisional This is a draft API and might change in a future release of ICU.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static final int WORD_IDEO = 400;
|
||||
|
||||
/**
|
||||
* Tag value for words containing ideographic characters, upper limit
|
||||
* @draft ICU 53
|
||||
* @provisional This is a draft API and might change in a future release of ICU.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static final int WORD_IDEO_LIMIT = 500;
|
||||
|
||||
|
@ -467,21 +467,18 @@ public abstract class DateFormat extends UFormat {
|
||||
/**
|
||||
* boolean attributes
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public enum BooleanAttribute {
|
||||
/**
|
||||
* indicates whitespace tolerance. Also included is trailing dot tolerance.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
PARSE_ALLOW_WHITESPACE,
|
||||
/**
|
||||
* indicates tolerance of numeric data when String data may be assumed.
|
||||
* e.g. YEAR_NAME_FIELD
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
PARSE_ALLOW_NUMERIC,
|
||||
/**
|
||||
@ -1556,8 +1553,7 @@ public abstract class DateFormat extends UFormat {
|
||||
* inputs must match this object's format more closely.
|
||||
* @param lenient when true, Calendar parsing is lenient
|
||||
* @see com.ibm.icu.util.Calendar#setLenient
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public void setCalendarLenient(boolean lenient)
|
||||
{
|
||||
@ -1567,8 +1563,7 @@ public abstract class DateFormat extends UFormat {
|
||||
|
||||
/**
|
||||
* Returns whether date/time parsing in the encapsulated Calendar object is lenient.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public boolean isCalendarLenient()
|
||||
{
|
||||
@ -1580,8 +1575,7 @@ public abstract class DateFormat extends UFormat {
|
||||
* boolean attributes.
|
||||
*
|
||||
* @see BooleanAttribute
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public DateFormat setBooleanAttribute(BooleanAttribute key, boolean value)
|
||||
{
|
||||
@ -1603,8 +1597,7 @@ public abstract class DateFormat extends UFormat {
|
||||
* if attribute is missing false is returned.
|
||||
*
|
||||
* @see BooleanAttribute
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public boolean getBooleanAttribute(BooleanAttribute key)
|
||||
{
|
||||
@ -1617,8 +1610,7 @@ public abstract class DateFormat extends UFormat {
|
||||
* such as CAPITALIZATION_FOR_STANDALONE.
|
||||
*
|
||||
* @param context The DisplayContext value to set.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public void setContext(DisplayContext context) {
|
||||
if (context.type() == DisplayContext.Type.CAPITALIZATION) {
|
||||
@ -1632,8 +1624,7 @@ public abstract class DateFormat extends UFormat {
|
||||
*
|
||||
* @param type the DisplayContext.Type whose value to return
|
||||
* @return the current DisplayContext setting for the specified type
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public DisplayContext getContext(DisplayContext.Type type) {
|
||||
return (type == DisplayContext.Type.CAPITALIZATION && capitalizationSetting != null)?
|
||||
|
@ -875,8 +875,7 @@ public class DateIntervalFormat extends UFormat {
|
||||
/**
|
||||
* Get the TimeZone
|
||||
* @return A copy of the TimeZone associated with this date interval formatter.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public TimeZone getTimeZone()
|
||||
{
|
||||
@ -894,8 +893,7 @@ public class DateIntervalFormat extends UFormat {
|
||||
/**
|
||||
* Set the TimeZone for the calendar used by this DateIntervalFormat object.
|
||||
* @param zone The new TimeZone, will be cloned for use by this DateIntervalFormat.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public void setTimeZone(TimeZone zone)
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
**********************************************************************
|
||||
* Copyright (c) 2004-2014, International Business Machines
|
||||
* Copyright (c) 2004-2015, International Business Machines
|
||||
* Corporation and others. All Rights Reserved.
|
||||
**********************************************************************
|
||||
* Author: Alan Liu
|
||||
@ -156,8 +156,7 @@ public class MeasureFormat extends UFormat {
|
||||
/**
|
||||
* Formatting width enum.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
// Be sure to update MeasureUnitTest.TestSerialFormatWidthEnum
|
||||
// when adding an enum value.
|
||||
@ -166,24 +165,21 @@ public class MeasureFormat extends UFormat {
|
||||
/**
|
||||
* Spell out everything.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
WIDE("units", ListFormatter.Style.DURATION, NumberFormat.PLURALCURRENCYSTYLE),
|
||||
|
||||
/**
|
||||
* Abbreviate when possible.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
SHORT("unitsShort", ListFormatter.Style.DURATION_SHORT, NumberFormat.ISOCURRENCYSTYLE),
|
||||
|
||||
/**
|
||||
* Brief. Use only a symbol for the unit when possible.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
NARROW("unitsNarrow", ListFormatter.Style.DURATION_NARROW, NumberFormat.CURRENCYSTYLE),
|
||||
|
||||
@ -192,8 +188,7 @@ public class MeasureFormat extends UFormat {
|
||||
* an hour and minute; minute and second; or hour, minute, and second Measures.
|
||||
* In these cases formatMeasures formats as 5:37:23 instead of 5h, 37m, 23s.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
NUMERIC("unitsNarrow", ListFormatter.Style.DURATION_NARROW, NumberFormat.CURRENCYSTYLE);
|
||||
|
||||
@ -225,8 +220,7 @@ public class MeasureFormat extends UFormat {
|
||||
* @param locale the locale.
|
||||
* @param formatWidth hints how long formatted strings should be.
|
||||
* @return The new MeasureFormat object.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static MeasureFormat getInstance(ULocale locale, FormatWidth formatWidth) {
|
||||
return getInstance(locale, formatWidth, NumberFormat.getInstance(locale));
|
||||
@ -252,8 +246,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 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static MeasureFormat getInstance(ULocale locale, FormatWidth formatWidth, NumberFormat format) {
|
||||
PluralRules rules = PluralRules.forLocale(locale);
|
||||
@ -317,8 +310,7 @@ public class MeasureFormat extends UFormat {
|
||||
* @param pos Identifies a field in the formatted text.
|
||||
* @see java.text.Format#format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition)
|
||||
*
|
||||
* @draft ICU53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU53
|
||||
*/
|
||||
@Override
|
||||
public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
|
||||
@ -354,7 +346,7 @@ public class MeasureFormat extends UFormat {
|
||||
* Parses text from a string to produce a <code>Measure</code>.
|
||||
* @see java.text.Format#parseObject(java.lang.String, java.text.ParsePosition)
|
||||
* @throws UnsupportedOperationException Not supported.
|
||||
* @draft ICU 53
|
||||
* @draft ICU 53 (Retain)
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
@Override
|
||||
@ -373,8 +365,7 @@ public class MeasureFormat extends UFormat {
|
||||
*
|
||||
* @param measures a sequence of one or more measures.
|
||||
* @return the formatted string.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public final String formatMeasures(Measure... measures) {
|
||||
return formatMeasures(
|
||||
@ -546,8 +537,7 @@ public class MeasureFormat extends UFormat {
|
||||
* @param measures the measures to format.
|
||||
* @return appendTo.
|
||||
* @see MeasureFormat#formatMeasures(Measure...)
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public StringBuilder formatMeasures(
|
||||
StringBuilder appendTo, FieldPosition fieldPosition, Measure... measures) {
|
||||
@ -587,8 +577,7 @@ public class MeasureFormat extends UFormat {
|
||||
/**
|
||||
* Two MeasureFormats, a and b, are equal if and only if they have the same formatWidth,
|
||||
* locale, and equal number formats.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
@Override
|
||||
public final boolean equals(Object other) {
|
||||
@ -607,8 +596,7 @@ public class MeasureFormat extends UFormat {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
@ -619,8 +607,7 @@ public class MeasureFormat extends UFormat {
|
||||
|
||||
/**
|
||||
* Get the format width this instance is using.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public MeasureFormat.FormatWidth getWidth() {
|
||||
return formatWidth;
|
||||
@ -628,8 +615,7 @@ public class MeasureFormat extends UFormat {
|
||||
|
||||
/**
|
||||
* Get the locale of this instance.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public final ULocale getLocale() {
|
||||
return getLocale(ULocale.VALID_LOCALE);
|
||||
@ -637,8 +623,7 @@ public class MeasureFormat extends UFormat {
|
||||
|
||||
/**
|
||||
* Get a copy of the number format.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public NumberFormat getNumberFormat() {
|
||||
return numberFormat.get();
|
||||
|
@ -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. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -212,8 +212,7 @@ public abstract class NumberFormat extends UFormat {
|
||||
* {@icu} Constant to specify currency style of format which uses currency symbol
|
||||
* to represent currency for accounting, for example: "($3.00), instead of
|
||||
* "-$3.00" ({@link #CURRENCYSTYLE}).
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static final int ACCOUNTINGCURRENCYSTYLE = 7;
|
||||
/**
|
||||
@ -520,8 +519,7 @@ public abstract class NumberFormat extends UFormat {
|
||||
* such as CAPITALIZATION_FOR_STANDALONE.
|
||||
*
|
||||
* @param context The DisplayContext value to set.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public void setContext(DisplayContext context) {
|
||||
if (context.type() == DisplayContext.Type.CAPITALIZATION) {
|
||||
@ -535,8 +533,7 @@ public abstract class NumberFormat extends UFormat {
|
||||
*
|
||||
* @param type the DisplayContext.Type whose value to return
|
||||
* @return the current DisplayContext setting for the specified type
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public DisplayContext getContext(DisplayContext.Type type) {
|
||||
return (type == DisplayContext.Type.CAPITALIZATION && capitalizationSetting != null)?
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2013-2014, International Business Machines Corporation and
|
||||
* Copyright (C) 2013-2015, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -61,8 +61,7 @@ import com.ibm.icu.util.UResourceBundle;
|
||||
* In the future, we may add more forms, such as abbreviated/short forms
|
||||
* (3 secs ago), and relative day periods ("yesterday afternoon"), etc.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public final class RelativeDateTimeFormatter {
|
||||
|
||||
@ -99,149 +98,128 @@ public final class RelativeDateTimeFormatter {
|
||||
/**
|
||||
* Represents the unit for formatting a relative date. e.g "in 5 days"
|
||||
* or "in 3 months"
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static enum RelativeUnit {
|
||||
|
||||
/**
|
||||
* Seconds
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
SECONDS,
|
||||
|
||||
/**
|
||||
* Minutes
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
MINUTES,
|
||||
|
||||
/**
|
||||
* Hours
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
HOURS,
|
||||
|
||||
/**
|
||||
* Days
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
DAYS,
|
||||
|
||||
/**
|
||||
* Weeks
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
WEEKS,
|
||||
|
||||
/**
|
||||
* Months
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
MONTHS,
|
||||
|
||||
/**
|
||||
* Years
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
YEARS,
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents an absolute unit.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static enum AbsoluteUnit {
|
||||
|
||||
/**
|
||||
* Sunday
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
SUNDAY,
|
||||
|
||||
/**
|
||||
* Monday
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
MONDAY,
|
||||
|
||||
/**
|
||||
* Tuesday
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
TUESDAY,
|
||||
|
||||
/**
|
||||
* Wednesday
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
WEDNESDAY,
|
||||
|
||||
/**
|
||||
* Thursday
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
THURSDAY,
|
||||
|
||||
/**
|
||||
* Friday
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
FRIDAY,
|
||||
|
||||
/**
|
||||
* Saturday
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
SATURDAY,
|
||||
|
||||
/**
|
||||
* Day
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
DAY,
|
||||
|
||||
/**
|
||||
* Week
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
WEEK,
|
||||
|
||||
/**
|
||||
* Month
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
MONTH,
|
||||
|
||||
/**
|
||||
* Year
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
YEAR,
|
||||
|
||||
/**
|
||||
* Now
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
NOW,
|
||||
}
|
||||
@ -249,76 +227,66 @@ public final class RelativeDateTimeFormatter {
|
||||
/**
|
||||
* Represents a direction for an absolute unit e.g "Next Tuesday"
|
||||
* or "Last Tuesday"
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static enum Direction {
|
||||
|
||||
/**
|
||||
* Two before. Not fully supported in every locale
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
LAST_2,
|
||||
|
||||
|
||||
/**
|
||||
* Last
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
LAST,
|
||||
|
||||
/**
|
||||
* This
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
THIS,
|
||||
|
||||
/**
|
||||
* Next
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
NEXT,
|
||||
|
||||
/**
|
||||
* Two after. Not fully supported in every locale
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
NEXT_2,
|
||||
|
||||
/**
|
||||
* Plain, which means the absence of a qualifier
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
PLAIN;
|
||||
LAST,
|
||||
|
||||
/**
|
||||
* This
|
||||
* @stable ICU 53
|
||||
*/
|
||||
THIS,
|
||||
|
||||
/**
|
||||
* Next
|
||||
* @stable ICU 53
|
||||
*/
|
||||
NEXT,
|
||||
|
||||
/**
|
||||
* Two after. Not fully supported in every locale
|
||||
* @stable ICU 53
|
||||
*/
|
||||
NEXT_2,
|
||||
|
||||
/**
|
||||
* Plain, which means the absence of a qualifier
|
||||
* @stable ICU 53
|
||||
*/
|
||||
PLAIN;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a RelativeDateTimeFormatter for the default locale.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static RelativeDateTimeFormatter getInstance() {
|
||||
return getInstance(ULocale.getDefault(), null, Style.LONG, DisplayContext.CAPITALIZATION_NONE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a RelativeDateTimeFormatter for a particular locale.
|
||||
*
|
||||
* @param locale the locale.
|
||||
* @return An instance of RelativeDateTimeFormatter.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static RelativeDateTimeFormatter getInstance(ULocale locale) {
|
||||
return getInstance(locale, null, Style.LONG, DisplayContext.CAPITALIZATION_NONE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a RelativeDateTimeFormatter for a particular JDK locale.
|
||||
*
|
||||
@ -339,8 +307,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 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public static RelativeDateTimeFormatter getInstance(ULocale locale, NumberFormat nf) {
|
||||
return getInstance(locale, nf, Style.LONG, DisplayContext.CAPITALIZATION_NONE);
|
||||
@ -409,8 +376,7 @@ public final class RelativeDateTimeFormatter {
|
||||
* @return the formatted string
|
||||
* @throws IllegalArgumentException if direction is something other than
|
||||
* NEXT or LAST.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public String format(double quantity, Direction direction, RelativeUnit unit) {
|
||||
if (direction != Direction.LAST && direction != Direction.NEXT) {
|
||||
@ -437,8 +403,7 @@ public final class RelativeDateTimeFormatter {
|
||||
* return null to signal that no formatted string is available.
|
||||
* @throws IllegalArgumentException if the direction is incompatible with
|
||||
* unit this can occur with NOW which can only take PLAIN.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public String format(Direction direction, AbsoluteUnit unit) {
|
||||
if (unit == AbsoluteUnit.NOW && direction != Direction.PLAIN) {
|
||||
@ -456,8 +421,7 @@ public final class RelativeDateTimeFormatter {
|
||||
* @param timeString the time e.g '3:45'
|
||||
* @return the date and time concatenated according to the default
|
||||
* calendar in this locale e.g 'yesterday, 3:45'
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public String combineDateAndTime(String relativeDateString, String timeString) {
|
||||
return this.combinedDateAndTime.format(
|
||||
@ -467,8 +431,7 @@ public final class RelativeDateTimeFormatter {
|
||||
/**
|
||||
* Returns a copy of the NumberFormat this object is using.
|
||||
* @return A copy of the NumberFormat.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public NumberFormat getNumberFormat() {
|
||||
// This class is thread-safe, yet numberFormat is not. To ensure thread-safety of this
|
||||
|
@ -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. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -1423,8 +1423,7 @@ public class RuleBasedNumberFormat extends NumberFormat {
|
||||
* NumberFormat.
|
||||
*
|
||||
* @param context The DisplayContext value to set.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
// Here we override the NumberFormat implementation in order to
|
||||
// lazily initialize relevant items
|
||||
|
@ -1259,8 +1259,7 @@ public class SimpleDateFormat extends DateFormat {
|
||||
* DateFormat.
|
||||
*
|
||||
* @param context The DisplayContext value to set.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
// Here we override the DateFormat implementation in order to lazily initialize relevant items
|
||||
public void setContext(DisplayContext context) {
|
||||
|
@ -148,22 +148,19 @@ public class SpoofChecker {
|
||||
|
||||
/**
|
||||
* Constants from UAX 31 for use in setRestrictionLevel.
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public enum RestrictionLevel {
|
||||
/**
|
||||
* Only ASCII characters: U+0000..U+007F
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
ASCII,
|
||||
/**
|
||||
* All characters in each identifier must be from a single script.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
SINGLE_SCRIPT_RESTRICTIVE,
|
||||
/**
|
||||
@ -171,30 +168,26 @@ public class SpoofChecker {
|
||||
* Hiragana + Katakana; Latin + Han + Bopomofo; or Latin + Han + Hangul. Note that this level will satisfy the
|
||||
* vast majority of Latin-script users; also that TR36 has ASCII instead of Latin.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
HIGHLY_RESTRICTIVE,
|
||||
HIGHLY_RESTRICTIVE,
|
||||
/**
|
||||
* Allow Latin with other scripts except Cyrillic, Greek, Cherokee Otherwise, the same as Highly Restrictive
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
MODERATELY_RESTRICTIVE,
|
||||
/**
|
||||
* Allow arbitrary mixtures of scripts, such as Ωmega, Teχ, HλLF-LIFE, Toys-Я-Us. Otherwise, the same as
|
||||
* Moderately Restrictive
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
MINIMALLY_RESTRICTIVE,
|
||||
/**
|
||||
* Any valid identifiers, including characters outside of the Identifier Profile, such as I♥NY.org
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
UNRESTRICTIVE
|
||||
}
|
||||
|
@ -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.
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -11,8 +11,7 @@ package com.ibm.icu.util;
|
||||
* Some ICU APIs do not throw the standard exception but instead wrap it
|
||||
* into this unchecked version.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public class ICUCloneNotSupportedException extends ICUException {
|
||||
private static final long serialVersionUID = -4824446458488194964L;
|
||||
@ -20,8 +19,7 @@ public class ICUCloneNotSupportedException extends ICUException {
|
||||
/**
|
||||
* Default constructor.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public ICUCloneNotSupportedException() {
|
||||
}
|
||||
@ -30,8 +28,7 @@ public class ICUCloneNotSupportedException extends ICUException {
|
||||
* Constructor.
|
||||
*
|
||||
* @param message exception message string
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public ICUCloneNotSupportedException(String message) {
|
||||
super(message);
|
||||
@ -41,8 +38,7 @@ public class ICUCloneNotSupportedException extends ICUException {
|
||||
* Constructor.
|
||||
*
|
||||
* @param cause original exception (normally a {@link CloneNotSupportedException})
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public ICUCloneNotSupportedException(Throwable cause) {
|
||||
super(cause);
|
||||
@ -53,8 +49,7 @@ public class ICUCloneNotSupportedException extends ICUException {
|
||||
*
|
||||
* @param message exception message string
|
||||
* @param cause original exception (normally a {@link CloneNotSupportedException})
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public ICUCloneNotSupportedException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
|
@ -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.
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -9,8 +9,7 @@ package com.ibm.icu.util;
|
||||
/**
|
||||
* Base class for unchecked, ICU-specific exceptions.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public class ICUException extends RuntimeException {
|
||||
private static final long serialVersionUID = -3067399656455755650L;
|
||||
@ -18,8 +17,7 @@ public class ICUException extends RuntimeException {
|
||||
/**
|
||||
* Default constructor.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public ICUException() {
|
||||
}
|
||||
@ -28,8 +26,7 @@ public class ICUException extends RuntimeException {
|
||||
* Constructor.
|
||||
*
|
||||
* @param message exception message string
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public ICUException(String message) {
|
||||
super(message);
|
||||
@ -39,8 +36,7 @@ public class ICUException extends RuntimeException {
|
||||
* Constructor.
|
||||
*
|
||||
* @param cause original exception
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public ICUException(Throwable cause) {
|
||||
super(cause);
|
||||
@ -51,8 +47,7 @@ public class ICUException extends RuntimeException {
|
||||
*
|
||||
* @param message exception message string
|
||||
* @param cause original exception
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public ICUException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
|
@ -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.
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -15,8 +15,7 @@ package com.ibm.icu.util;
|
||||
* but when ICU can rely on Java 8 this class should be changed to extend
|
||||
* java.io.UncheckedIOException instead.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public class ICUUncheckedIOException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1210263498513384449L;
|
||||
@ -24,8 +23,7 @@ public class ICUUncheckedIOException extends RuntimeException {
|
||||
/**
|
||||
* Default constructor.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public ICUUncheckedIOException() {
|
||||
}
|
||||
@ -34,8 +32,7 @@ public class ICUUncheckedIOException extends RuntimeException {
|
||||
* Constructor.
|
||||
*
|
||||
* @param message exception message string
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public ICUUncheckedIOException(String message) {
|
||||
super(message);
|
||||
@ -45,8 +42,7 @@ public class ICUUncheckedIOException extends RuntimeException {
|
||||
* Constructor.
|
||||
*
|
||||
* @param cause original exception (normally a {@link java.io.IOException})
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public ICUUncheckedIOException(Throwable cause) {
|
||||
super(cause);
|
||||
@ -57,8 +53,7 @@ public class ICUUncheckedIOException extends RuntimeException {
|
||||
*
|
||||
* @param message exception message string
|
||||
* @param cause original exception (normally a {@link java.io.IOException})
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public ICUUncheckedIOException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -810,8 +810,7 @@ public final class ULocale implements Serializable, Comparable<ULocale> {
|
||||
* than the specified ULocale.
|
||||
* @throws NullPointerException if <code>other</code> is null.
|
||||
*
|
||||
* @draft ICU 53
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
* @stable ICU 53
|
||||
*/
|
||||
public int compareTo(ULocale other) {
|
||||
if (this == other) {
|
||||
|
Loading…
Reference in New Issue
Block a user