mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-10084 BRS - Updated the API change report. Supplied API status tag to a bunch of new draft/private APIs. Fixed a API change report tool problem caused by an extremely long API signature (expanded an internal API signature token limit from 256 to 512).
X-SVN-Rev: 33899
This commit is contained in:
parent
b280b62e5c
commit
2e0d24aafc
8 changed files with 172 additions and 246 deletions
|
@ -2,275 +2,105 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>ICU4J API Comparison: ICU4J 50.1 with ICU4J 51.1</title>
|
||||
<title>ICU4J API Comparison: ICU4J 51.1 with ICU4J 52.0.1</title>
|
||||
<!-- Copyright 2013, IBM, All Rights Reserved. -->
|
||||
</head>
|
||||
<body>
|
||||
<h1>ICU4J API Comparison: ICU4J 50.1 with ICU4J 51.1</h1>
|
||||
<h1>ICU4J API Comparison: ICU4J 51.1 with ICU4J 52.0.1</h1>
|
||||
|
||||
<hr/>
|
||||
<h2>Removed from ICU4J 50.1</h2>
|
||||
<h2>Removed from ICU4J 51.1</h2>
|
||||
|
||||
<h3>Package com.ibm.icu.text</h3>
|
||||
<ul>
|
||||
TimeZoneFormat
|
||||
ListFormatter
|
||||
<ul>
|
||||
<li><span style='color:orange'>(draft)</span> public final java.lang.String <i>formatOffsetISO8601</i>(int)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public final java.lang.String <i>formatOffsetRFC822</i>(int)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public final int <i>parseOffsetRFC822</i>(java.lang.String, java.text.ParsePosition)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public java.lang.String <i>format</i>(java.util.Collection<java.lang.Object>)</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
<h2>Deprecated or Obsoleted in ICU4J 51.1</h2>
|
||||
|
||||
<h3>Package com.ibm.icu.text</h3>
|
||||
<ul>
|
||||
CurrencyMetaInfo.CurrencyInfo
|
||||
<ul>
|
||||
<li><span style='color:gray'>(deprecated)</span> public <i>CurrencyMetaInfo.CurrencyInfo</i>(java.lang.String, java.lang.String, long, long, int)</li>
|
||||
</ul>
|
||||
SpoofChecker.CheckResult
|
||||
<ul>
|
||||
<li><span style='color:gray'>(deprecated)</span> public int position</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Package com.ibm.icu.util</h3>
|
||||
<ul>
|
||||
LocaleData
|
||||
<ul>
|
||||
<li><span style='color:gray'>(deprecated)</span> public static final int ES_CURRENCY</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h2>Deprecated or Obsoleted in ICU4J 52.0.1</h2>
|
||||
<p>(no API obsoleted)</p>
|
||||
|
||||
<hr/>
|
||||
<h2>Changed in ICU4J 51.1 (old, new)</h2>
|
||||
<h2>Changed in ICU4J 52.0.1 (old, new)</h2>
|
||||
<p>(no API changed)</p>
|
||||
|
||||
<hr/>
|
||||
<h2>Promoted to stable in ICU4J 51.1</h2>
|
||||
<h2>Promoted to stable in ICU4J 52.0.1</h2>
|
||||
<p>(no API promoted to stable)</p>
|
||||
|
||||
<h3>Package com.ibm.icu.charset</h3>
|
||||
<ul>
|
||||
CharsetEncoderICU
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public static int <i>getMaxBytesForString</i>(int, int)</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<hr/>
|
||||
<h2>Added in ICU4J 52.0.1</h2>
|
||||
|
||||
<h3>Package com.ibm.icu.lang</h3>
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public static interface <i>UCharacter.BidiPairedBracketType</i></li>
|
||||
UCharacter
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public static int <i>getBidiPairedBracket</i>(int)</li>
|
||||
</ul>
|
||||
UCharacter.WordBreak
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public static final int DOUBLE_QUOTE</li>
|
||||
<li><span style='color:green'>(stable)</span> public static final int HEBREW_LETTER</li>
|
||||
<li><span style='color:green'>(stable)</span> public static final int SINGLE_QUOTE</li>
|
||||
</ul>
|
||||
UCharacterEnums.ECharacterDirection
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public static final byte FIRST_STRONG_ISOLATE</li>
|
||||
<li><span style='color:green'>(stable)</span> public static final byte LEFT_TO_RIGHT_ISOLATE</li>
|
||||
<li><span style='color:green'>(stable)</span> public static final byte POP_DIRECTIONAL_ISOLATE</li>
|
||||
<li><span style='color:green'>(stable)</span> public static final byte RIGHT_TO_LEFT_ISOLATE</li>
|
||||
</ul>
|
||||
UProperty
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public static final int BIDI_PAIRED_BRACKET</li>
|
||||
<li><span style='color:green'>(stable)</span> public static final int BIDI_PAIRED_BRACKET_TYPE</li>
|
||||
</ul>
|
||||
UScript
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public static final int <i>getScriptExtensions</i>(int, java.util.BitSet)</li>
|
||||
<li><span style='color:green'>(stable)</span> public static final boolean <i>hasScript</i>(int, int)</li>
|
||||
<li><span style='color:green'>(stable)</span> public static final int CAUCASIAN_ALBANIAN</li>
|
||||
<li><span style='color:green'>(stable)</span> public static final int MAHAJANI</li>
|
||||
<li><span style='color:green'>(stable)</span> public static final int MIAO</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Package com.ibm.icu.text</h3>
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public class <i>CompactDecimalFormat</i></li>
|
||||
<li><span style='color:green'>(stable)</span> public final class <i>MessagePatternUtil</i></li>
|
||||
<li><span style='color:green'>(stable)</span> public static class <i>MessagePatternUtil.ArgNode</i></li>
|
||||
<li><span style='color:green'>(stable)</span> public static class <i>MessagePatternUtil.ComplexArgStyleNode</i></li>
|
||||
<li><span style='color:green'>(stable)</span> public static class <i>MessagePatternUtil.MessageContentsNode</i></li>
|
||||
<li><span style='color:green'>(stable)</span> public static final class <i>MessagePatternUtil.MessageContentsNode.Type</i></li>
|
||||
<li><span style='color:green'>(stable)</span> public static class <i>MessagePatternUtil.MessageNode</i></li>
|
||||
<li><span style='color:green'>(stable)</span> public static class <i>MessagePatternUtil.Node</i></li>
|
||||
<li><span style='color:green'>(stable)</span> public static class <i>MessagePatternUtil.TextNode</i></li>
|
||||
<li><span style='color:green'>(stable)</span> public static class <i>MessagePatternUtil.VariantNode</i></li>
|
||||
CurrencyDisplayNames
|
||||
BreakIterator
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public static CurrencyDisplayNames <i>getInstance</i>(ULocale, boolean)</li>
|
||||
<li><span style='color:green'>(stable)</span> public abstract ULocale <i>getULocale</i>()</li>
|
||||
<li><span style='color:orange'>(draft)</span> public int <i>getRuleStatus</i>()</li>
|
||||
<li><span style='color:orange'>(draft)</span> public int <i>getRuleStatusVec</i>(int[])</li>
|
||||
</ul>
|
||||
CurrencyMetaInfo
|
||||
ListFormatter
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public static CurrencyMetaInfo <i>getInstance</i>(boolean)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public java.lang.String <i>format</i>(java.util.Collection<?>)</li>
|
||||
</ul>
|
||||
CurrencyMetaInfo.CurrencyDigits
|
||||
TimeUnitFormat
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public final int fractionDigits</li>
|
||||
<li><span style='color:green'>(stable)</span> public final int roundingIncrement</li>
|
||||
</ul>
|
||||
CurrencyMetaInfo.CurrencyFilter
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public static CurrencyMetaInfo.CurrencyFilter <i>onDateRange</i>(java.util.Date, java.util.Date)</li>
|
||||
<li><span style='color:green'>(stable)</span> public CurrencyMetaInfo.CurrencyFilter <i>withDateRange</i>(java.util.Date, java.util.Date)</li>
|
||||
</ul>
|
||||
CurrencyMetaInfo.CurrencyInfo
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public final int priority</li>
|
||||
</ul>
|
||||
DateFormat
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public static final int YEAR_NAME_FIELD</li>
|
||||
</ul>
|
||||
DecimalFormat
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public CurrencyAmount <i>parseCurrency</i>(java.lang.CharSequence, java.text.ParsePosition)</li>
|
||||
</ul>
|
||||
FilteredNormalizer2
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public int <i>composePair</i>(int, int)</li>
|
||||
<li><span style='color:green'>(stable)</span> public int <i>getCombiningClass</i>(int)</li>
|
||||
<li><span style='color:green'>(stable)</span> public java.lang.String <i>getRawDecomposition</i>(int)</li>
|
||||
</ul>
|
||||
IDNA
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public static final int CHECK_CONTEXTO</li>
|
||||
</ul>
|
||||
Normalizer2
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public int <i>composePair</i>(int, int)</li>
|
||||
<li><span style='color:green'>(stable)</span> public int <i>getCombiningClass</i>(int)</li>
|
||||
<li><span style='color:green'>(stable)</span> public static Normalizer2 <i>getNFCInstance</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public static Normalizer2 <i>getNFDInstance</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public static Normalizer2 <i>getNFKCCasefoldInstance</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public static Normalizer2 <i>getNFKCInstance</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public static Normalizer2 <i>getNFKDInstance</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public java.lang.String <i>getRawDecomposition</i>(int)</li>
|
||||
</ul>
|
||||
NumberFormat
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public CurrencyAmount <i>parseCurrency</i>(java.lang.CharSequence, java.text.ParsePosition)</li>
|
||||
</ul>
|
||||
RuleBasedNumberFormat
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public void <i>setDecimalFormatSymbols</i>(DecimalFormatSymbols)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public static final int NUMERIC</li>
|
||||
<li><span style='color:orange'>(draft)</span> public java.lang.String <i>formatTimePeriod</i>(TimePeriod)</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Package com.ibm.icu.util</h3>
|
||||
<ul>
|
||||
Calendar
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public static final int WALLTIME_FIRST</li>
|
||||
<li><span style='color:green'>(stable)</span> public static final int WALLTIME_LAST</li>
|
||||
<li><span style='color:green'>(stable)</span> public static final int WALLTIME_NEXT_VALID</li>
|
||||
<li><span style='color:green'>(stable)</span> public int <i>getRepeatedWallTimeOption</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public int <i>getSkippedWallTimeOption</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public void <i>setRepeatedWallTimeOption</i>(int)</li>
|
||||
<li><span style='color:green'>(stable)</span> public void <i>setSkippedWallTimeOption</i>(int)</li>
|
||||
</ul>
|
||||
LocaleData
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public static final int ES_PUNCTUATION</li>
|
||||
</ul>
|
||||
RuleBasedTimeZone
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public TimeZone <i>cloneAsThawed</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public TimeZone <i>freeze</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public boolean <i>isFrozen</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public boolean <i>observesDaylightTime</i>()</li>
|
||||
</ul>
|
||||
SimpleTimeZone
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public TimeZone <i>cloneAsThawed</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public TimeZone <i>freeze</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public boolean <i>isFrozen</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public boolean <i>observesDaylightTime</i>()</li>
|
||||
</ul>
|
||||
<li><span style='color:orange'>(draft)</span> public final class <i>TimePeriod</i></li>
|
||||
TimeZone
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public static final TimeZone GMT_ZONE</li>
|
||||
<li><span style='color:green'>(stable)</span> public static final TimeZone UNKNOWN_ZONE</li>
|
||||
<li><span style='color:green'>(stable)</span> public TimeZone <i>cloneAsThawed</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public TimeZone <i>freeze</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public static TimeZone <i>getFrozenTimeZone</i>(java.lang.String)</li>
|
||||
<li><span style='color:green'>(stable)</span> public boolean <i>isFrozen</i>()</li>
|
||||
<li><span style='color:orange'>(draft)</span> public static java.lang.String <i>getIDForWindowsID</i>(java.lang.String, java.lang.String)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public static java.lang.String <i>getWindowsID</i>(java.lang.String)</li>
|
||||
</ul>
|
||||
VTimeZone
|
||||
VersionInfo
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public TimeZone <i>cloneAsThawed</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public TimeZone <i>freeze</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public boolean <i>isFrozen</i>()</li>
|
||||
<li><span style='color:green'>(stable)</span> public boolean <i>observesDaylightTime</i>()</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
|
||||
<hr/>
|
||||
<h2>Added in ICU4J 51.1</h2>
|
||||
|
||||
<h3>Package com.ibm.icu.lang</h3>
|
||||
<ul>
|
||||
<li><span style='color:orange'>(draft)</span> public static final class <i>UScript.ScriptUsage</i></li>
|
||||
UScript
|
||||
<ul>
|
||||
<li><span style='color:orange'>(draft)</span> public static final boolean <i>breaksBetweenLetters</i>(int)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public static final java.lang.String <i>getSampleString</i>(int)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public static final UScript.ScriptUsage <i>getUsage</i>(int)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public static final boolean <i>isCased</i>(int)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public static final boolean <i>isRightToLeft</i>(int)</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h3>Package com.ibm.icu.text</h3>
|
||||
<ul>
|
||||
<li><span style='color:orange'>(draft)</span> public static final class <i>AlphabeticIndex.ImmutableIndex</i></li>
|
||||
<li><span style='color:orange'>(draft)</span> public final class <i>DisplayContext</i></li>
|
||||
<li><span style='color:orange'>(draft)</span> public static final class <i>DisplayContext.Type</i></li>
|
||||
AlphabeticIndex
|
||||
<ul>
|
||||
<li><span style='color:orange'>(draft)</span> public <i>AlphabeticIndex</i>(RuleBasedCollator)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public AlphabeticIndex.ImmutableIndex<V> <i>buildImmutableIndex</i>()</li>
|
||||
</ul>
|
||||
CompactDecimalFormat
|
||||
<ul>
|
||||
<li><span style='color:green'>(stable)</span> public boolean <i>equals</i>(java.lang.Object)</li>
|
||||
</ul>
|
||||
CurrencyMetaInfo.CurrencyFilter
|
||||
<ul>
|
||||
<li><span style='color:orange'>(draft)</span> public static CurrencyMetaInfo.CurrencyFilter <i>onDate</i>(long)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public static CurrencyMetaInfo.CurrencyFilter <i>onDateRange</i>(long, long)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public static CurrencyMetaInfo.CurrencyFilter <i>onTender</i>()</li>
|
||||
<li><span style='color:orange'>(draft)</span> public CurrencyMetaInfo.CurrencyFilter <i>withDate</i>(long)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public CurrencyMetaInfo.CurrencyFilter <i>withDateRange</i>(long, long)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public CurrencyMetaInfo.CurrencyFilter <i>withTender</i>()</li>
|
||||
</ul>
|
||||
CurrencyMetaInfo.CurrencyInfo
|
||||
<ul>
|
||||
<li><span style='color:orange'>(draft)</span> public boolean <i>isTender</i>()</li>
|
||||
</ul>
|
||||
DateFormat
|
||||
<ul>
|
||||
<li><span style='color:orange'>(draft)</span> public static final int TIMEZONE_ISO_FIELD</li>
|
||||
<li><span style='color:orange'>(draft)</span> public static final int TIMEZONE_ISO_LOCAL_FIELD</li>
|
||||
<li><span style='color:orange'>(draft)</span> public static final int TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD</li>
|
||||
</ul>
|
||||
DateFormatSymbols
|
||||
<ul>
|
||||
<li><span style='color:orange'>(draft)</span> public static final int SHORT</li>
|
||||
</ul>
|
||||
DecimalFormat
|
||||
<ul>
|
||||
<li><span style='color:orange'>(draft)</span> public int <i>getParseMaxDigits</i>()</li>
|
||||
<li><span style='color:orange'>(draft)</span> public void <i>setParseMaxDigits</i>(int)</li>
|
||||
</ul>
|
||||
LocaleDisplayNames
|
||||
<ul>
|
||||
<li><span style='color:orange'>(draft)</span> public abstract DisplayContext <i>getContext</i>(DisplayContext.Type)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public static LocaleDisplayNames <i>getInstance</i>(ULocale, DisplayContext...)</li>
|
||||
</ul>
|
||||
SimpleDateFormat
|
||||
<ul>
|
||||
<li><span style='color:orange'>(draft)</span> public DisplayContext <i>getContext</i>(DisplayContext.Type)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public void <i>setContext</i>(DisplayContext)</li>
|
||||
</ul>
|
||||
TimeZoneFormat
|
||||
<ul>
|
||||
<li><span style='color:orange'>(draft)</span> public final java.lang.String <i>formatOffsetISO8601Basic</i>(int, boolean, boolean, boolean)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public final java.lang.String <i>formatOffsetISO8601Extended</i>(int, boolean, boolean, boolean)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public java.lang.String <i>formatOffsetShortLocalizedGMT</i>(int)</li>
|
||||
<li><span style='color:orange'>(draft)</span> public int <i>parseOffsetShortLocalizedGMT</i>(java.lang.String, java.text.ParsePosition)</li>
|
||||
<li><span style='color:green'>(stable)</span> public static final VersionInfo UNICODE_6_3</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
<p><i><font size="-1">Contents generated by ReportAPI tool on Tue Mar 05 00:09:35 EST 2013<br/>Copyright (C) 2013, International Business Machines Corporation, All Rights Reserved.</font></i></p>
|
||||
<p><i><font size="-1">Contents generated by ReportAPI tool on Tue Jul 09 18:14:18 EDT 2013<br/>Copyright (C) 2013, International Business Machines Corporation, All Rights Reserved.</font></i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -356,10 +356,6 @@ public class CompactDecimalFormat extends DecimalFormat {
|
|||
|
||||
/**
|
||||
* Manufacture the unit list from arrays
|
||||
* @param pluralCategoryToPower10ToAffix
|
||||
* @param divisor
|
||||
* @param debugCreationErrors
|
||||
* @return
|
||||
*/
|
||||
private Map<String, DecimalFormat.Unit[]> otherPluralVariant(Map<String, String[][]> pluralCategoryToPower10ToAffix,
|
||||
long[] divisor, Collection<String> debugCreationErrors) {
|
||||
|
|
|
@ -150,6 +150,8 @@ final public class ListFormatter {
|
|||
* Returns the pattern to use for a particular item count.
|
||||
* @param count the item count.
|
||||
* @return the pattern with {0}, {1}, {2}, etc.
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public String createPatternForNumItems(int count) {
|
||||
ArrayList<String> list = new ArrayList<String>();
|
||||
|
|
|
@ -450,17 +450,21 @@ public class PluralRules implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated This API is ICU internal only.
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public static class NumberInfo implements Comparable<NumberInfo> {
|
||||
public final double source;
|
||||
public final int visibleFractionDigitCount;
|
||||
public final long fractionalDigits;
|
||||
public final long intValue;
|
||||
public final boolean hasIntegerValue;
|
||||
public final boolean isNegative;
|
||||
private final double source;
|
||||
private final int visibleFractionDigitCount;
|
||||
private final long fractionalDigits;
|
||||
private final long intValue;
|
||||
private final boolean hasIntegerValue;
|
||||
private final boolean isNegative;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public NumberInfo(double n, int v, long f) {
|
||||
isNegative = n < 0;
|
||||
source = isNegative ? -n : n;
|
||||
|
@ -483,8 +487,12 @@ public class PluralRules implements Serializable {
|
|||
// }
|
||||
}
|
||||
|
||||
// Ugly, but for samples we don't care.
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public NumberInfo(double n, int v) {
|
||||
// Ugly, but for samples we don't care.
|
||||
this(n,v,getFractionalDigits(n, v));
|
||||
}
|
||||
|
||||
|
@ -498,22 +506,38 @@ public class PluralRules implements Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public NumberInfo(double n) {
|
||||
this(n, decimals(n));
|
||||
}
|
||||
|
||||
// Ugly, but for samples we don't care.
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public static int decimals(double n) {
|
||||
// Ugly, but for samples we don't care.
|
||||
String temp = String.valueOf(n);
|
||||
return temp.endsWith(".0") ? 0 : temp.length() - temp.indexOf('.') - 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public NumberInfo(long n) {
|
||||
this(n,0);
|
||||
}
|
||||
|
||||
// Ugly, but for samples we don't care.
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public NumberInfo (String n) {
|
||||
// Ugly, but for samples we don't care.
|
||||
this(Double.parseDouble(n), getVisibleFractionCount(n));
|
||||
}
|
||||
|
||||
|
@ -527,6 +551,10 @@ public class PluralRules implements Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public double get(Operand operand) {
|
||||
switch(operand) {
|
||||
default: return source;
|
||||
|
@ -536,12 +564,18 @@ public class PluralRules implements Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public static Operand getOperand(String t) {
|
||||
return Operand.valueOf(t);
|
||||
}
|
||||
|
||||
/**
|
||||
* We're not going to care about NaN.
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public int compareTo(NumberInfo other) {
|
||||
if (intValue != other.intValue) {
|
||||
|
@ -559,6 +593,11 @@ public class PluralRules implements Serializable {
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object arg0) {
|
||||
if (arg0 == null) {
|
||||
|
@ -573,16 +612,30 @@ public class PluralRules implements Serializable {
|
|||
NumberInfo other = (NumberInfo)arg0;
|
||||
return source == other.source && visibleFractionDigitCount == other.visibleFractionDigitCount && fractionalDigits == other.fractionalDigits;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
// TODO Auto-generated method stub
|
||||
return (int)(fractionalDigits + 37 * (visibleFractionDigitCount + (int)(37 * source)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("%." + visibleFractionDigitCount + "f", source);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public boolean hasIntegerValue() {
|
||||
return hasIntegerValue;
|
||||
}
|
||||
|
@ -1304,11 +1357,6 @@ public class PluralRules implements Serializable {
|
|||
return toAddTo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ints
|
||||
* @param base
|
||||
* @return
|
||||
*/
|
||||
private Integer getDifferentCategory(List<Integer> ints, String keyword) {
|
||||
for (int i = ints.size() - 1; i >= 0; --i) {
|
||||
Integer other = ints.get(i);
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.io.Serializable;
|
|||
* @author markdavis
|
||||
*
|
||||
*/
|
||||
public class PluralRulesSerialProxy implements Serializable {
|
||||
class PluralRulesSerialProxy implements Serializable {
|
||||
private static final long serialVersionUID = 42L;
|
||||
private final String data;
|
||||
PluralRulesSerialProxy(String rules) {
|
||||
|
|
|
@ -11,30 +11,66 @@ import java.text.Format.Field;
|
|||
|
||||
/**
|
||||
* Adds the ability to get the decimal digits
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public class UFieldPosition extends FieldPosition {
|
||||
private int countVisibleFractionDigits = -1;
|
||||
private long fractionDigits = 0;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public UFieldPosition() {
|
||||
super(-1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public UFieldPosition(int field) {
|
||||
super(field);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public UFieldPosition(Field attribute, int fieldID) {
|
||||
super(attribute, fieldID);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public UFieldPosition(Field attribute) {
|
||||
super(attribute);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public void setFractionDigits(int countVisibleFractionDigits, long fractionDigits ) {
|
||||
this.countVisibleFractionDigits = countVisibleFractionDigits;
|
||||
this.fractionDigits = fractionDigits;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public int getCountVisibleFractionDigits() {
|
||||
return countVisibleFractionDigits;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public long getFractionDigits() {
|
||||
return fractionDigits;
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ import java.util.NoSuchElementException;
|
|||
* new TimeUnitAmount (TimeUnit.SECOND, 8));
|
||||
* </pre>
|
||||
* @draft ICU 52
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public final class TimePeriod implements Iterable<TimeUnitAmount> {
|
||||
|
||||
|
@ -46,6 +47,7 @@ public final class TimePeriod implements Iterable<TimeUnitAmount> {
|
|||
* the same time unit or if any but the smallest TimeUnit has a fractional value
|
||||
* Or if amounts is empty.
|
||||
* @draft ICU 52
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static TimePeriod forAmounts(TimeUnitAmount ...amounts) {
|
||||
return forAmounts(Arrays.asList(amounts));
|
||||
|
@ -62,6 +64,7 @@ public final class TimePeriod implements Iterable<TimeUnitAmount> {
|
|||
* the same time unit or if any but the smallest TimeUnit has a fractional value
|
||||
* Or if amounts is empty.
|
||||
* @draft ICU 52
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static TimePeriod forAmounts(Iterable<TimeUnitAmount> amounts) {
|
||||
TimeUnitAmount[] fields = new TimeUnitAmount[TimeUnit.TIME_UNIT_COUNT];
|
||||
|
@ -103,6 +106,7 @@ public final class TimePeriod implements Iterable<TimeUnitAmount> {
|
|||
* @return the TimeUnitAmount or null if no value is present for given TimeUnit.
|
||||
* A non-existing value and a zero value are two different things.
|
||||
* @draft ICU 52
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public TimeUnitAmount getAmount(TimeUnit timeUnit) {
|
||||
return fields[timeUnit.getIndex()];
|
||||
|
@ -114,6 +118,7 @@ public final class TimePeriod implements Iterable<TimeUnitAmount> {
|
|||
* smallest TimeUnit. Remove method on returned iterator throws an
|
||||
* UnsupportedOperationException.
|
||||
* @draft ICU 52
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public Iterator<TimeUnitAmount> iterator() {
|
||||
return new TPIterator();
|
||||
|
@ -121,6 +126,8 @@ public final class TimePeriod implements Iterable<TimeUnitAmount> {
|
|||
|
||||
/**
|
||||
* Returns the number of TimeUnitAmount objects in this object.
|
||||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public int size() {
|
||||
return size;
|
||||
|
@ -128,6 +135,8 @@ public final class TimePeriod implements Iterable<TimeUnitAmount> {
|
|||
|
||||
/**
|
||||
* Two TimePeriod objects are equal if they contain equal TimeUnitAmount objects.
|
||||
* @draft ICU 52
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
@ -143,7 +152,12 @@ public final class TimePeriod implements Iterable<TimeUnitAmount> {
|
|||
}
|
||||
return Arrays.equals(fields, rhs.fields);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Overrides hashCode().
|
||||
* @draft ICU 52
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return hash;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2005-2012, International Business Machines Corporation and *
|
||||
* Copyright (C) 2005-2013, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -297,10 +297,10 @@ class APIInfo {
|
|||
* APIInfo. Throws IOException if EOF is encountered before the
|
||||
* token is complete (i.e. before the separator character is
|
||||
* encountered) or if the token exceeds the maximum length of
|
||||
* 255 chars.
|
||||
* 511 chars.
|
||||
*/
|
||||
public static String readToken(BufferedReader r) throws IOException {
|
||||
char[] buf = new char[256];
|
||||
char[] buf = new char[512];
|
||||
int i = 0;
|
||||
for (; i < buf.length; ++i) {
|
||||
int c = r.read();
|
||||
|
|
Loading…
Add table
Reference in a new issue