ICU-6237 Fixed the warning for "core" package.

X-SVN-Rev: 26501
This commit is contained in:
John Vu 2009-08-17 18:17:11 +00:00
parent c41731f2a7
commit 2c50c7cebe
57 changed files with 544 additions and 978 deletions

View file

@ -73,7 +73,6 @@ class CharsetISCII extends CharsetICU {
static final short DELTA = 0x80;
}
@SuppressWarnings("unused")
private static final class ISCIILang {
static final short DEF = 0x40;
static final short RMN = 0x41;
@ -121,7 +120,6 @@ class CharsetISCII extends CharsetICU {
short defMaskToUnicode; /* mask for default state in toUnicode */
boolean isFirstBuffer; /* boolean for fromUnicode to see if we need to announce the first script */
boolean resetToDefaultToUnicode; /* boolean for reseting to default delta and mask when a newline is encountered */
@SuppressWarnings("unused")
String name;
int prevToUnicodeStatus; /* Hold the previous toUnicodeStatus. This is necessary because we may need to know the last two code points. */

View file

@ -341,7 +341,6 @@ class CharsetISO2022 extends CharsetICU {
CharsetEncoderMBCS currentEncoder;
CharsetDecoderMBCS currentDecoder;
CharsetMBCS currentConverter;
@SuppressWarnings("unused")
int currentType; // Cnv2022Type;
ISO2022State toU2022State;
ISO2022State fromU2022State;

View file

@ -119,7 +119,6 @@ class CharsetSCSU extends CharsetICU{
short toUState;
byte toUQuoteWindow, toUDynamicWindow;
short toUByteOne;
@SuppressWarnings("unused")
short toUPadding[];
/* state machine state - fromUnicode */

View file

@ -687,7 +687,6 @@ final class CollationParsedRuleBuilder {
// private inner classes -------------------------------------------------
@SuppressWarnings("unused")
private static class CEGenerator {
// package private data members --------------------------------------
@ -909,7 +908,6 @@ final class CollationParsedRuleBuilder {
/**
* size of cPoints.
*/
@SuppressWarnings("unused")
int size;
// constructor
@ -951,7 +949,6 @@ final class CollationParsedRuleBuilder {
* @return combining mark codepoint or 0 if no combining make with class
* value cClass
*/
@SuppressWarnings("unused")
char GetFirstCM(int cClass) {
curClass = cClass;
if (cPoints == null || cClass == 0
@ -966,7 +963,6 @@ final class CollationParsedRuleBuilder {
* Get next CM(combining mark) with the combining class value cClass.
* Return combining mark codepoint or 0 if no next CM.
*/
@SuppressWarnings("unused")
char GetNextCM() {
if (cPoints == null
|| index[curClass] == (index[curClass - 1] + pos)) {

View file

@ -140,7 +140,6 @@ public class RbnfScannerProviderImpl implements RbnfLenientScannerProvider {
///CLOVER:OFF
// The following method contains the same signature as findText
// and has never been used by anything once.
@SuppressWarnings("unused")
public int[] findText2(String str, String key, int startingAt) {
CollationElementIterator strIter = collator.getCollationElementIterator(str);

View file

@ -1,6 +1,6 @@
/**
*******************************************************************************
* Copyright (C) 1996-2008, International Business Machines Corporation and *
* Copyright (C) 1996-2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -22,12 +22,12 @@ import com.ibm.icu.text.UCharacterIterator;
* code points. The byte stream does not contain the values 0, 1, or
* 2.</p>
*
* <p>One example of a use of BOCU is in {@link
* com.ibm.icu.text.Collator#getCollationKey(String)} for a RuleBasedCollator object with
* <p>One example of a use of BOCU is in
* com.ibm.icu.text.Collator#getCollationKey(String) for a RuleBasedCollator object with
* collation strength IDENTICAL. The result CollationKey will consist of the
* collation order of the source string followed by the BOCU result of the
* source string.
* </p>
* </p>
*
* <p>Unlike a UTF encoding, BOCU-compressed text is not suitable for
* random access.</p>

View file

@ -26,8 +26,6 @@ public final class ICUDataVersion {
* (standard ICU) will be missing, and the function will alert the caller that the data is not standard.
*
* @param dataVersionFillin icuver data version information to be filled in if not-null
* @param status stores the error code from the calls to resource bundle
*
* @return TRUE if ICU_DATA_VERSION is newer than icuver, else FALSE
*
* @draft ICU 4.4

View file

@ -123,7 +123,7 @@ public class ICULogger extends Logger {
* unless the system property "icu4j.debug.logging" is set to "all"
*
* @param name to be use by the logger (usually is the class name)
* @param ResourceBundle name to localize messages (can be null)
* @param resourceBundleName name to localize messages (can be null)
* @return a new ICULogger object
* @draft ICU 4.4
* @provisional This API might change or be removed in a future release.

View file

@ -127,7 +127,7 @@ public class ICUResourceBundle extends UResourceBundle {
/**
* Returns the respath of this bundle
* @return
* @return the respath of the bundle
*/
public String getResPath(){
return resPath;
@ -327,10 +327,9 @@ public class ICUResourceBundle extends UResourceBundle {
* }
* </code>
*
* @param path
* The path to the required resource key
* @param path The path to the required resource key
* @return resource represented by the key
* @exception MissingResourceException
* @exception MissingResourceException If a resource was not found.
*/
public ICUResourceBundle getWithFallback(String path)
throws MissingResourceException {
@ -897,9 +896,9 @@ public class ICUResourceBundle extends UResourceBundle {
/**
*
* @param baseName
* @param localeID
* @param root
* @param baseName The name for the bundle.
* @param localeID The locale identification.
* @param root The ClassLoader object root.
* @return the new bundle
*/
public static ICUResourceBundle createBundle(String baseName,
@ -1231,7 +1230,6 @@ public class ICUResourceBundle extends UResourceBundle {
* Determines if the object with the specified key
* is an alias. If it is, returns true
*
* @param key The key of the resource to check
* @returns True if the resource with 'key' is an alias, false otherwise.
*
* @internal
@ -1249,8 +1247,8 @@ public class ICUResourceBundle extends UResourceBundle {
* This method can be used to retrieve the underlying alias path (aka where the alias points to)
* This method was written to allow conversion from ICU back to LDML format.
*
* @param index
* @return
* @param index The index where the alias path points to.
* @return The alias path.
* @author Brian Rower
* @internal
* @deprecated This API is ICU internal only.

View file

@ -1,6 +1,6 @@
/**
*******************************************************************************
* Copyright (C) 2004-2006, International Business Machines Corporation and *
* Copyright (C) 2004-2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -98,8 +98,8 @@ public class ImplicitCEGenerator {
/**
* Set up to generate implicits.
* @param minPrimary
* @param maxPrimary
* @param minPrimary The minimum primary value.
* @param maxPrimary The maximum primary value.
* @param minTrail final byte
* @param maxTrail final byte
* @param gap3 the gap we leave for tailoring for 3-byte forms
@ -179,7 +179,7 @@ public class ImplicitCEGenerator {
/**
* Converts implicit CE into raw integer
* @param implicit
* @param implicit The implicit value passed.
* @return -1 if illegal format
*/
public int getRawFromImplicit(int implicit) {
@ -279,7 +279,7 @@ public class ImplicitCEGenerator {
* Gets an Implicit from a code point. Internally,
* swaps (which produces a raw value 0..220000,
* then converts raw to implicit.
* @param cp
* @param cp The code point to convert to implicit.
* @return Primary implicit weight
*/
public int getImplicitFromCodePoint(int cp) {

View file

@ -176,7 +176,7 @@ public final class NormalizerImpl {
/**
* Called by com.ibm.icu.util.Trie to extract from a lead surrogate's
* data the index array offset of the indexes for that lead surrogate.
* @param property data value for a surrogate from the trie, including
* @param value data value for a surrogate from the trie, including
* the folding offset
* @return data offset or 0 if there is no data for the lead surrogate
*/
@ -193,7 +193,7 @@ public final class NormalizerImpl {
/**
* Called by com.ibm.icu.util.Trie to extract from a lead surrogate's
* data the index array offset of the indexes for that lead surrogate.
* @param property data value for a surrogate from the trie, including
* @param value data value for a surrogate from the trie, including
* the folding offset
* @return data offset or 0 if there is no data for the lead surrogate
*/
@ -208,7 +208,7 @@ public final class NormalizerImpl {
/**
* Called by com.ibm.icu.util.Trie to extract from a lead surrogate's
* data the index array offset of the indexes for that lead surrogate.
* @param property data value for a surrogate from the trie, including
* @param value data value for a surrogate from the trie, including
* the folding offset
* @return data offset or 0 if there is no data for the lead surrogate
*/

View file

@ -41,8 +41,8 @@ public class PatternTokenizer {
}
/**
* Sets the characters to be ignored in parsing, eg new UnicodeSet("[:pattern_whitespace:]");
* @param ignorableCharacters
* @return
* @param ignorableCharacters Characters to be ignored.
* @return A PatternTokenizer object in which characters are specified as ignored characters.
*/
public PatternTokenizer setIgnorableCharacters(UnicodeSet ignorableCharacters) {
this.ignorableCharacters = (UnicodeSet) ignorableCharacters.clone();
@ -57,8 +57,8 @@ public class PatternTokenizer {
}
/**
* Sets the characters to be interpreted as syntax characters in parsing, eg new UnicodeSet("[:pattern_syntax:]")
* @param syntaxCharacters
* @return
* @param syntaxCharacters Characters to be set as syntax characters.
* @return A PatternTokenizer object in which characters are specified as syntax characters.
*/
public PatternTokenizer setSyntaxCharacters(UnicodeSet syntaxCharacters) {
this.syntaxCharacters = (UnicodeSet) syntaxCharacters.clone();
@ -67,8 +67,8 @@ public class PatternTokenizer {
}
/**
* Sets the extra characters to be quoted in literals
* @param syntaxCharacters
* @return
* @param syntaxCharacters Characters to be set as extra quoting characters.
* @return A PatternTokenizer object in which characters are specified as extra quoting characters.
*/
public PatternTokenizer setExtraQuotingCharacters(UnicodeSet syntaxCharacters) {
this.extraQuotingCharacters = (UnicodeSet) syntaxCharacters.clone();
@ -81,8 +81,8 @@ public class PatternTokenizer {
}
/**
* Set characters to be escaped in literals, in quoteLiteral and normalize, eg new UnicodeSet("[^\\u0020-\\u007E]");
* @param escapeCharacters
* @return
* @param escapeCharacters Characters to be set as escape characters.
* @return A PatternTokenizer object in which characters are specified as escape characters.
*/
public PatternTokenizer setEscapeCharacters(UnicodeSet escapeCharacters) {
this.escapeCharacters = (UnicodeSet) escapeCharacters.clone();
@ -151,8 +151,8 @@ public class PatternTokenizer {
/**
* Quote a literal string, using the available settings. Thus syntax characters, quote characters, and ignorable characters will be put into quotes.
* @param string
* @return
* @param string String passed to quote a literal string.
* @return A string using the available settings will place syntax, quote, or ignorable characters into quotes.
*/
public String quoteLiteral(String string) {
if (needingQuoteCharacters == null) {

View file

@ -128,10 +128,9 @@ public final class Punycode {
* The input string must not contain single, unpaired surrogates.
* The output will be represented as an array of ASCII code points.
*
* @param src
* @param caseFlags
* @return
* @throws ParseException
* @param src The source of the String Buffer passed.
* @param caseFlags The boolean array of case flags.
* @return An array of ASCII code points.
*/
public static StringBuffer encode(StringBuffer src, boolean[] caseFlags) throws StringPrepParseException{
@ -289,10 +288,9 @@ public final class Punycode {
* Converts Punycode to Unicode.
* The Unicode string will be at most as long as the Punycode string.
*
* @param src
* @param caseFlags
* @return
* @throws ParseException
* @param src The source of the string buffer being passed.
* @param caseFlags The array of boolean case flags.
* @return StringBuffer string.
*/
public static StringBuffer decode(StringBuffer src, boolean[] caseFlags)
throws StringPrepParseException{

View file

@ -47,9 +47,9 @@ public class RelativeDateFormat extends DateFormat {
// copy c'tor?
/**
* @param timeStyle
* @param dateStyle
* @param locale
* @param timeStyle The time style for the date and time.
* @param dateStyle The date style for the date and time.
* @param locale The locale for the date.
*/
public RelativeDateFormat(int timeStyle, int dateStyle, ULocale locale) {
fLocale = locale;

View file

@ -1,12 +1,14 @@
/*
******************************************************************************
* Copyright (C) 1996-2008, International Business Machines Corporation and *
* Copyright (C) 1996-2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
******************************************************************************
*/
package com.ibm.icu.impl;
import java.util.NoSuchElementException;
import com.ibm.icu.lang.UCharacter;
import com.ibm.icu.text.UTF16;
import com.ibm.icu.util.RangeValueIterator;
@ -77,7 +79,6 @@ import com.ibm.icu.util.RangeValueIterator;
* </p>
* @author synwee
* @see com.ibm.icu.impl.Trie
* @see com.ibm.icu.lang.UCharacterTypeIterator
* @since release 2.1, Jan 17 2002
*/
public class TrieIterator implements RangeValueIterator

View file

@ -330,7 +330,7 @@ public final class UCharacterName
/**
* Gets the group index for the codepoint, or the group before it.
* @param codepoint
* @param codepoint The codepoint index.
* @return group index containing codepoint or the group before it.
*/
public int getGroup(int codepoint)
@ -410,7 +410,7 @@ public final class UCharacterName
/**
* Gets the MSB of the codepoint
* @param codepoint
* @param codepoint The codepoint value.
* @return the MSB of the codepoint
*/
public static int getCodepointMSB(int codepoint)
@ -440,7 +440,7 @@ public final class UCharacterName
/**
* Gets the offset to a group
* @param codepoint
* @param codepoint The codepoint value.
* @return offset to a group
*/
public static int getGroupOffset(int codepoint)
@ -450,7 +450,7 @@ public final class UCharacterName
/**
* Gets the minimum codepoint of a group
* @param codepoint
* @param codepoint The codepoint value.
* @return minimum codepoint in the group which codepoint belongs to
*/
///CLOVER:OFF
@ -492,7 +492,7 @@ public final class UCharacterName
/**
* Gets the Algorithmic name of the codepoint
* @param index algorithmic range index
* @param codepoint
* @param codepoint The codepoint value.
* @return algorithmic name of codepoint
*/
public String getAlgorithmName(int index, int codepoint)

View file

@ -199,7 +199,7 @@ public final class UCharacterProperty
* C version getUnicodeProperties.
* @param codepoint codepoint whose additional properties is to be
* retrieved
* @param column
* @param column The column index.
* @return unicode properties
*/
public int getAdditional(int codepoint, int column) {

View file

@ -126,8 +126,7 @@ public class UnicodeRegex implements Cloneable, Freezable, StringTransform {
/**
* Compile a regex string, after processing by fix(...).
*
* @param regex
* Raw regex pattern, as in fix(...).
* @param regex Raw regex pattern, as in fix(...).
* @return Pattern
*/
public static Pattern compile(String regex) {
@ -137,8 +136,7 @@ public class UnicodeRegex implements Cloneable, Freezable, StringTransform {
/**
* Compile a regex string, after processing by fix(...).
*
* @param regex
* Raw regex pattern, as in fix(...).
* @param regex Raw regex pattern, as in fix(...).
* @return Pattern
*/
public static Pattern compile(String regex, int options) {
@ -175,8 +173,7 @@ public class UnicodeRegex implements Cloneable, Freezable, StringTransform {
* The equality sign and a few others can be reset with
* setBnfX().
*
* @param bnfLines
* Series of lines that represent a BNF expression. The lines contain
* @param lines Series of lines that represent a BNF expression. The lines contain
* a series of statements that of the form x=y;. A statement can take
* multiple lines, but there can't be multiple statements on a line.
* A hash quotes to the end of the line.
@ -242,11 +239,11 @@ public class UnicodeRegex implements Cloneable, Freezable, StringTransform {
/**
* Utility for loading lines from a file.
* @param result
* @param file
* @param result The result of the appended lines.
* @param file The file to have an input stream.
* @param encoding if null, then UTF-8
* @return filled list
* @throws IOException
* @throws IOException If there were problems opening the file for input stream.
*/
public static List<String> appendLines(List<String> result, String file, String encoding) throws IOException {
return appendLines(result, new FileInputStream(file), encoding);
@ -254,11 +251,11 @@ public class UnicodeRegex implements Cloneable, Freezable, StringTransform {
/**
* Utility for loading lines from a UTF8 file.
* @param result
* @param inputStream
* @param result The result of the appended lines.
* @param inputStream The input stream.
* @param encoding if null, then UTF-8
* @return filled list
* @throws IOException
* @throws IOException If there were problems opening the input stream for reading.
*/
public static List<String> appendLines(List<String> result, InputStream inputStream, String encoding)
throws UnsupportedEncodingException, IOException {

View file

@ -1774,8 +1774,8 @@ public final class Utility {
/**
* Utility to duplicate a string count times
* @param s
* @param count
* @param s String to be duplicated.
* @param count Number of times to duplicate a string.
*/
public static String repeat(String s, int count) {
if (count <= 0) return "";
@ -1800,9 +1800,10 @@ public final class Utility {
/**
* Parse a list of hex numbers and return a string
* @param string
* @param string2
* @return
* @param string String of hex numbers.
* @param minLength Minimal length.
* @param separator Seperator.
* @return A string from hex numbers.
*/
public static String fromHex(String string, int minLength, String separator) {
return fromHex(string, minLength, Pattern.compile(separator != null ? separator : "\\s+"));
@ -1810,9 +1811,10 @@ public final class Utility {
/**
* Parse a list of hex numbers and return a string
* @param string
* @param string2
* @return
* @param string String of hex numbers.
* @param minLength Minimal length.
* @param separator Seperator.
* @return A string from hex numbers.
*/
public static String fromHex(String string, int minLength, Pattern separator) {
StringBuilder buffer = new StringBuilder();

View file

@ -91,9 +91,9 @@ public class BasicDurationFormat extends DurationFormat {
/**
* JDK 1.5+ only
* @param o
* @return
* @see http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/datatype/Duration.html
* @param obj Object being passed.
* @return The PeriodFormatter object formatted to the object passed.
* @see "http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/datatype/Duration.html"
*/
public String formatDuration(Object obj) {
javax.xml.datatype.DatatypeConstants.Field inFields[] = {

View file

@ -43,7 +43,6 @@ class BasicDurationFormatterFactory implements DurationFormatterFactory {
* Set the period formatter used by the factory. New formatters created
* with this factory will use the given period formatter.
*
* @param builder the builder to use
* @return this BasicDurationFormatterFactory
*/
public DurationFormatterFactory setPeriodFormatter(
@ -129,7 +128,7 @@ class BasicDurationFormatterFactory implements DurationFormatterFactory {
* Set the name of the locale that will be used when
* creating new formatters.
*
* @param localeName the name of the Locale
* @param timeZone The time zone to use.
* @return this BasicDurationFormatterFactory
*/
public DurationFormatterFactory setTimeZone(TimeZone timeZone) {

View file

@ -38,8 +38,7 @@ public class BasicPeriodFormatterService implements PeriodFormatterService {
* Construct a BasicPeriodFormatterService using the given
* PeriodFormatterDataService.
*
* @param ds
* the data service to use
* @param ds the data service to use
*/
public BasicPeriodFormatterService(PeriodFormatterDataService ds) {
this.ds = ds;

View file

@ -1,6 +1,6 @@
/*
******************************************************************************
* Copyright (C) 2007, International Business Machines Corporation and *
* Copyright (C) 2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
******************************************************************************
*/
@ -22,7 +22,7 @@ public interface DurationFormatterFactory {
* Set the period formatter used by the factory. New formatters created
* with this factory will use the given period formatter.
*
* @param builder the builder to use
* @param formatter the formatter to use
* @return this DurationFormatterFactory
*/
public DurationFormatterFactory setPeriodFormatter(PeriodFormatter formatter);
@ -65,7 +65,7 @@ public interface DurationFormatterFactory {
* Set the name of the locale that will be used when
* creating new formatters.
*
* @param localeName the name of the Locale
* @param timeZone The time zone to set.
* @return this DurationFormatterFactory
*/
public DurationFormatterFactory setTimeZone(TimeZone timeZone);

View file

@ -1,6 +1,6 @@
/*
******************************************************************************
* Copyright (C) 2007, International Business Machines Corporation and *
* Copyright (C) 2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
******************************************************************************
*/
@ -132,7 +132,7 @@ public class PeriodFormatterData {
* @param last true if this is the last unit
* @param wasSkipped true if the unit(s) before this were skipped
* @param sb the string builder to which to append the text
* @param return true if will require skip marker
* @return true if will require skip marker
*/
public boolean appendUnit(TimeUnit unit, int count, int cv,
int uv, boolean useCountSep,

View file

@ -17,8 +17,7 @@ public abstract class PeriodFormatterDataService {
/**
* Returns a PeriodFormatterData for the given locale name.
*
* @param localeName
* the name of the locale
* @param localeName the name of the locale
* @return a PeriodFormatterData object
*/
public abstract PeriodFormatterData get(String localeName);

View file

@ -5355,9 +5355,9 @@ public final class UCharacter implements ECharacterCategory, ECharacterDirection
}
/**
* Returns a string version of the property value.
* @param propertyEnum
* @param codepoint
* @param nameChoice
* @param propertyEnum The property enum value.
* @param codepoint The codepoint value.
* @param nameChoice The choice of the name.
* @return value as string
* @internal
* @deprecated This API is ICU internal only.

View file

@ -30,7 +30,7 @@ class UCharacterNameIterator implements ValueIterator
* be updated.</p>
* @param element for storing the result codepoint and name
* @return true if we are not at the end of the iteration, false otherwise.
* @see Element
* @see ValueIterator.Element
*/
public boolean next(ValueIterator.Element element)
{

View file

@ -1,7 +1,7 @@
/*
*******************************************************************************
*
* Copyright (C) 1999-2008, International Business Machines
* Copyright (C) 1999-2009, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
@ -158,7 +158,7 @@ public final class UScriptRun
*
* @param start the index of the new first character over which to iterate
* @param count the new number of characters over which to iterate.
* @exception IllegalArgumentException
* @exception IllegalArgumentException If invalid arguments are passed.
*
* @internal
* @deprecated This API is ICU internal only.

View file

@ -421,8 +421,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <i>(Note: this constructor is provided only in the <code>com.ibm.icu.math</code> version of the BigDecimal class.
* It would not be present in a <code>java.math</code> version.)</i>
*
* @param bd
* The <code>BigDecimal</code> to be translated.
* @param bd The <code>BigDecimal</code> to be translated.
* @stable ICU 2.0
*/
@ -441,8 +440,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* The <code>BigDecimal</code> will contain only decimal digits, prefixed with a leading minus sign (hyphen) if the
* <code>BigInteger</code> is negative. A leading zero will be present only if the <code>BigInteger</code> is zero.
*
* @param bi
* The <code>BigInteger</code> to be converted.
* @param bi The <code>BigInteger</code> to be converted.
* @stable ICU 2.0
*/
@ -465,12 +463,9 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* scale</code> decimal digits if the scale is positive), prefixed with a leading minus sign (hyphen) if the <code>
* BigInteger</code> is negative. A leading zero will be present only if the <code>BigInteger</code> is zero.
*
* @param bi
* The <code>BigInteger</code> to be converted.
* @param scale
* The <code>int</code> specifying the scale.
* @throws NumberFormatException
* if the scale is negative.
* @param bi The <code>BigInteger</code> to be converted.
* @param scale The <code>int</code> specifying the scale.
* @throws NumberFormatException If the scale is negative.
* @stable ICU 2.0
*/
@ -492,10 +487,8 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* Using this constructor is faster than using the <code>BigDecimal(String)</code> constructor if the string is
* already available in character array form.
*
* @param inchars
* The <code>char[]</code> array containing the number to be converted.
* @throws NumberFormatException
* if the parameter is not a valid number.
* @param inchars The <code>char[]</code> array containing the number to be converted.
* @throws NumberFormatException If the parameter is not a valid number.
* @stable ICU 2.0
*/
@ -514,14 +507,10 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* Using this constructor is faster than using the <code>BigDecimal(String)</code> constructor if the string is
* already available within a character array.
*
* @param inchars
* The <code>char[]</code> array containing the number to be converted.
* @param offset
* The <code>int</code> offset into the array of the start of the number to be converted.
* @param length
* The <code>int</code> length of the number.
* @throws NumberFormatException
* if the parameter is not a valid number for any reason.
* @param inchars The <code>char[]</code> array containing the number to be converted.
* @param offset The <code>int</code> offset into the array of the start of the number to be converted.
* @param length The <code>int</code> length of the number.
* @throws NumberFormatException If the parameter is not a valid number for any reason.
* @stable ICU 2.0
*/
@ -753,10 +742,8 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* {@link #BigDecimal(java.lang.String)} constructor. To get that result, use the static {@link #valueOf(double)}
* method to construct a <code>BigDecimal</code> from a <code>double</code>.
*
* @param num
* The <code>double</code> to be converted.
* @throws NumberFormatException
* if the parameter is infinite or not a number.
* @param num The <code>double</code> to be converted.
* @throws NumberFormatException If the parameter is infinite or not a number.
* @stable ICU 2.0
*/
@ -776,8 +763,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* integer parameter. The <code>BigDecimal</code> will contain only decimal digits, prefixed with a leading minus
* sign (hyphen) if the parameter is negative. A leading zero will be present only if the parameter is zero.
*
* @param num
* The <code>int</code> to be converted.
* @param num The <code>int</code> to be converted.
* @stable ICU 2.0
*/
@ -856,8 +842,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* integer parameter. The <code>BigDecimal</code> will contain only decimal digits, prefixed with a leading minus
* sign (hyphen) if the parameter is negative. A leading zero will be present only if the parameter is zero.
*
* @param num
* The <code>long</code> to be converted.
* @param num The <code>long</code> to be converted.
* @stable ICU 2.0
*/
@ -934,10 +919,8 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* Any digits in the parameter must be decimal; that is, <code>Character.digit(c, 10)</code> (where </code>c</code>
* is the character in question) would not return -1.
*
* @param string
* The <code>String</code> to be converted.
* @throws NumberFormatException
* if the parameter is not a valid number.
* @param string The <code>String</code> to be converted.
* @throws NumberFormatException If the parameter is not a valid number.
* @stable ICU 2.0
*/
@ -979,8 +962,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* with the same parameter is returned. Otherwise, the same result as invoking the {@link #negate(MathContext)}
* method with the same parameter is returned.
*
* @param set
* The <code>MathContext</code> arithmetic settings.
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is the absolute value of this <code>BigDecimal</code>.
* @stable ICU 2.0
*/
@ -999,8 +981,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <p>
* The length of the decimal part (the scale) of the result will be the maximum of the scales of the two operands.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the addition.
* @param rhs The <code>BigDecimal</code> for the right hand side of the addition.
* @return A <code>BigDecimal</code> whose value is <code>this+rhs</code>, using fixed point arithmetic.
* @stable ICU 2.0
*/
@ -1015,10 +996,8 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* Implements the addition (<b><code>+</code></b>) operator (as defined in the decimal documentation, see
* {@link BigDecimal class header}), and returns the result as a <code>BigDecimal</code> object.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the addition.
* @param set
* The <code>MathContext</code> arithmetic settings.
* @param rhs The <code>BigDecimal</code> for the right hand side of the addition.
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is <code>this+rhs</code>.
* @stable ICU 2.0
*/
@ -1238,11 +1217,9 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* The same as {@link #compareTo(BigDecimal, MathContext)}, where the <code>BigDecimal</code> is <code>rhs</code>,
* and the context is <code>new MathContext(0, MathContext.PLAIN)</code>.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the comparison.
* @param rhs The <code>BigDecimal</code> for the right hand side of the comparison.
* @return An <code>int</code> whose value is -1, 0, or 1 as <code>this</code> is numerically less than, equal to,
* or greater than <code>rhs</code>.
* @see #compareTo(Object)
* @stable ICU 2.0
*/
@ -1269,15 +1246,12 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* </tr>
* </table>
* <p>
* A {@link #compareTo(Object)} method is also provided.
* A {@link #compareTo(BigDecimal)} method is also provided.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the comparison.
* @param set
* The <code>MathContext</code> arithmetic settings.
* @param rhs The <code>BigDecimal</code> for the right hand side of the comparison.
* @param set The <code>MathContext</code> arithmetic settings.
* @return An <code>int</code> whose value is -1, 0, or 1 as <code>this</code> is numerically less than, equal to,
* or greater than <code>rhs</code>.
* @see #compareTo(Object)
* @stable ICU 2.0
*/
@ -1336,11 +1310,9 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* The length of the decimal part (the scale) of the result will be the same as the scale of the current object, if
* the latter were formatted without exponential notation.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the division.
* @param rhs The <code>BigDecimal</code> for the right hand side of the division.
* @return A plain <code>BigDecimal</code> whose value is <code>this/rhs</code>, using fixed point arithmetic.
* @throws ArithmeticException
* if <code>rhs</code> is zero.
* @throws ArithmeticException If <code>rhs</code> is zero.
* @stable ICU 2.0
*/
@ -1359,19 +1331,13 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* object, if the latter were formatted without exponential notation.
* <p>
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the division.
* @param round
* The <code>int</code> rounding mode to be used for the division (see the {@link MathContext} class).
* @param rhs The <code>BigDecimal</code> for the right hand side of the division.
* @param round The <code>int</code> rounding mode to be used for the division (see the {@link MathContext} class).
* @return A plain <code>BigDecimal</code> whose value is <code>this/rhs</code>, using fixed point arithmetic and
* the specified rounding mode.
* @throws IllegalArgumentException
* if <code>round</code> is not a valid rounding mode.
* @throws ArithmeticException
* if <code>rhs</code> is zero.
* @throws ArithmeticException
* if <code>round</code> is {@link MathContext#ROUND_UNNECESSARY} and <code>this.scale()</code> is
* insufficient to represent the result exactly.
* @throws IllegalArgumentException if <code>round</code> is not a valid rounding mode.
* @throws ArithmeticException if <code>rhs</code> is zero.
* @throws ArithmeticException if <code>round</code> is {@link MathContext#ROUND_UNNECESSARY} and <code>this.scale()</code> is insufficient to represent the result exactly.
* @stable ICU 2.0
*/
@ -1394,22 +1360,15 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* the latter were formatted without exponential notation.
* <p>
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the division.
* @param scale
* The <code>int</code> scale to be used for the result.
* @param round
* The <code>int</code> rounding mode to be used for the division (see the {@link MathContext} class).
* @param rhs The <code>BigDecimal</code> for the right hand side of the division.
* @param scale The <code>int</code> scale to be used for the result.
* @param round The <code>int</code> rounding mode to be used for the division (see the {@link MathContext} class).
* @return A plain <code>BigDecimal</code> whose value is <code>this/rhs</code>, using fixed point arithmetic and
* the specified rounding mode.
* @throws IllegalArgumentException
* if <code>round</code> is not a valid rounding mode.
* @throws ArithmeticException
* if <code>rhs</code> is zero.
* @throws ArithmeticException
* if <code>scale</code> is negative.
* @throws ArithmeticException
* if <code>round</code> is {@link MathContext#ROUND_UNNECESSARY} and <code>scale</code> is insufficient
* @throws IllegalArgumentException if <code>round</code> is not a valid rounding mode.
* @throws ArithmeticException if <code>rhs</code> is zero.
* @throws ArithmeticException if <code>scale</code> is negative.
* @throws ArithmeticException if <code>round</code> is {@link MathContext#ROUND_UNNECESSARY} and <code>scale</code> is insufficient
* to represent the result exactly.
* @stable ICU 2.0
*/
@ -1428,13 +1387,10 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* Implements the division (<b><code>/</code></b>) operator (as defined in the decimal documentation, see
* {@link BigDecimal class header}), and returns the result as a <code>BigDecimal</code> object.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the division.
* @param set
* The <code>MathContext</code> arithmetic settings.
* @param rhs The <code>BigDecimal</code> for the right hand side of the division.
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is <code>this/rhs</code>.
* @throws ArithmeticException
* if <code>rhs</code> is zero.
* @throws ArithmeticException if <code>rhs</code> is zero.
* @stable ICU 2.0
*/
@ -1448,11 +1404,9 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* The same as {@link #divideInteger(BigDecimal, MathContext)}, where the <code>BigDecimal</code> is <code>rhs
* </code>, and the context is <code>new MathContext(0, MathContext.PLAIN)</code>.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the integer division.
* @param rhs The <code>BigDecimal</code> for the right hand side of the integer division.
* @return A <code>BigDecimal</code> whose value is the integer part of <code>this/rhs</code>.
* @throws ArithmeticException
* if <code>rhs</code> is zero.
* @throws ArithmeticException if <code>rhs</code> is zero.
* @stable ICU 2.0
*/
@ -1467,15 +1421,11 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* Implements the integer division operator (as defined in the decimal documentation, see {@link BigDecimal class
* header}), and returns the result as a <code>BigDecimal</code> object.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the integer division.
* @param set
* The <code>MathContext</code> arithmetic settings.
* @param rhs The <code>BigDecimal</code> for the right hand side of the integer division.
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is the integer part of <code>this/rhs</code>.
* @throws ArithmeticException
* if <code>rhs</code> is zero.
* @throws ArithmeticException
* if the result will not fit in the number of digits specified for the context.
* @throws ArithmeticException if <code>rhs</code> is zero.
* @throws ArithmeticException if the result will not fit in the number of digits specified for the context.
* @stable ICU 2.0
*/
@ -1490,8 +1440,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* The same as {@link #max(BigDecimal, MathContext)}, where the <code>BigDecimal</code> is <code>rhs</code>, and the
* context is <code>new MathContext(0, MathContext.PLAIN)</code>.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the comparison.
* @param rhs The <code>BigDecimal</code> for the right hand side of the comparison.
* @return A <code>BigDecimal</code> whose value is the maximum of <code>this</code> and <code>rhs</code>.
* @stable ICU 2.0
*/
@ -1511,10 +1460,8 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* {@link #plus(MathContext)} method on the first parameter object (using the same <code>MathContext</code>
* parameter) is returned.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the comparison.
* @param set
* The <code>MathContext</code> arithmetic settings.
* @param rhs The <code>BigDecimal</code> for the right hand side of the comparison.
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is the maximum of <code>this</code> and <code>rhs</code>.
* @stable ICU 2.0
*/
@ -1532,8 +1479,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* The same as {@link #min(BigDecimal, MathContext)}, where the <code>BigDecimal</code> is <code>rhs</code>, and the
* context is <code>new MathContext(0, MathContext.PLAIN)</code>.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the comparison.
* @param rhs The <code>BigDecimal</code> for the right hand side of the comparison.
* @return A <code>BigDecimal</code> whose value is the minimum of <code>this</code> and <code>rhs</code>.
* @stable ICU 2.0
*/
@ -1553,10 +1499,8 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* {@link #plus(MathContext)} method on the first parameter object (using the same <code>MathContext</code>
* parameter) is returned.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the comparison.
* @param set
* The <code>MathContext</code> arithmetic settings.
* @param rhs The <code>BigDecimal</code> for the right hand side of the comparison.
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is the minimum of <code>this</code> and <code>rhs</code>.
* @stable ICU 2.0
*/
@ -1577,8 +1521,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* The length of the decimal part (the scale) of the result will be the sum of the scales of the operands, if they
* were formatted without exponential notation.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the multiplication.
* @param rhs The <code>BigDecimal</code> for the right hand side of the multiplication.
* @return A <code>BigDecimal</code> whose value is <code>this*rhs</code>, using fixed point arithmetic.
* @stable ICU 2.0
*/
@ -1593,10 +1536,8 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* Implements the multiplication (<b><code> </code></b>) operator (as defined in the decimal documentation, see
* {@link BigDecimal class header}), and returns the result as a <code>BigDecimal</code> object.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the multiplication.
* @param set
* The <code>MathContext</code> arithmetic settings.
* @param rhs The <code>BigDecimal</code> for the right hand side of the multiplication.
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is <code>this*rhs</code>.
* @stable ICU 2.0
*/
@ -1711,8 +1652,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* Implements the negation (Prefix <b><code>-</code></b>) operator (as defined in the decimal documentation, see
* {@link BigDecimal class header}), and returns the result as a <code>BigDecimal</code> object.
*
* @param set
* The <code>MathContext</code> arithmetic settings.
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is <code>-this</code>.
* @stable ICU 2.0
*/
@ -1752,8 +1692,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <p>
* This method is useful for rounding or otherwise applying a context to a decimal value.
*
* @param set
* The <code>MathContext</code> arithmetic settings.
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is <code>+this</code>.
* @stable ICU 2.0
*/
@ -1787,11 +1726,9 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* In addition, the power must not be negative, as no <code>MathContext</code> is used and so the result would then
* always be 0.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the operation (the power).
* @param rhs The <code>BigDecimal</code> for the right hand side of the operation (the power).
* @return A <code>BigDecimal</code> whose value is <code>this**rhs</code>, using fixed point arithmetic.
* @throws ArithmeticException
* if <code>rhs</code> is out of range or is not a whole number.
* @throws ArithmeticException if <code>rhs</code> is out of range or is not a whole number.
* @stable ICU 2.0
*/
@ -1815,13 +1752,10 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* If the <code>digits</code> setting of the <code>MathContext</code> parameter is 0, the power must be zero or
* positive.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the operation (the power).
* @param set
* The <code>MathContext</code> arithmetic settings.
* @param rhs The <code>BigDecimal</code> for the right hand side of the operation (the power).
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is <code>this**rhs</code>.
* @throws ArithmeticException
* if <code>rhs</code> is out of range or is not a whole number.
* @throws ArithmeticException if <code>rhs</code> is out of range or is not a whole number.
* @stable ICU 2.0
*/
@ -1898,12 +1832,10 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <p>
* This is not the modulo operator -- the result may be negative.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the remainder operation.
* @param rhs The <code>BigDecimal</code> for the right hand side of the remainder operation.
* @return A <code>BigDecimal</code> whose value is the remainder of <code>this/rhs</code>, using fixed point
* arithmetic.
* @throws ArithmeticException
* if <code>rhs</code> is zero.
* @throws ArithmeticException if <code>rhs</code> is zero.
* @stable ICU 2.0
*/
@ -1919,15 +1851,11 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <p>
* This is not the modulo operator -- the result may be negative.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the remainder operation.
* @param set
* The <code>MathContext</code> arithmetic settings.
* @param rhs The <code>BigDecimal</code> for the right hand side of the remainder operation.
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is the remainder of <code>this+rhs</code>.
* @throws ArithmeticException
* if <code>rhs</code> is zero.
* @throws ArithmeticException
* if the integer part of the result will not fit in the number of digits specified for the context.
* @throws ArithmeticException if <code>rhs</code> is zero.
* @throws ArithmeticException if the integer part of the result will not fit in the number of digits specified for the context.
* @stable ICU 2.0
*/
@ -1943,8 +1871,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <p>
* The length of the decimal part (the scale) of the result will be the maximum of the scales of the two operands.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the subtraction.
* @param rhs The <code>BigDecimal</code> for the right hand side of the subtraction.
* @return A <code>BigDecimal</code> whose value is <code>this-rhs</code>, using fixed point arithmetic.
* @stable ICU 2.0
*/
@ -1959,10 +1886,8 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* Implements the subtraction (<b><code>-</code></b>) operator (as defined in the decimal documentation, see
* {@link BigDecimal class header}), and returns the result as a <code>BigDecimal</code> object.
*
* @param rhs
* The <code>BigDecimal</code> for the right hand side of the subtraction.
* @param set
* The <code>MathContext</code> arithmetic settings.
* @param rhs The <code>BigDecimal</code> for the right hand side of the subtraction.
* @param set The <code>MathContext</code> arithmetic settings.
* @return A <code>BigDecimal</code> whose value is <code>this-rhs</code>.
* @stable ICU 2.0
*/
@ -1989,8 +1914,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* ArithmeticException</code> is thrown.
*
* @return A <code>byte</code> equal in value to <code>this</code>.
* @throws ArithmeticException
* if <code>this</code> has a non-zero decimal part, or will not fit in a <code>byte</code>.
* @throws ArithmeticException if <code>this</code> has a non-zero decimal part, or will not fit in a <code>byte</code>.
* @stable ICU 2.0
*/
@ -2032,14 +1956,11 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <p>
* The {@link #compareTo(BigDecimal, MathContext)} method should be used for more general comparisons.
*
* @param obj
* The <code>Object</code> for the right hand side of the comparison.
* @param obj The <code>Object</code> for the right hand side of the comparison.
* @return A <code>boolean</code> whose value <i>true</i> if and only if the operands have identical string
* representations.
* @throws ClassCastException
* if <code>rhs</code> cannot be cast to a <code>BigDecimal</code> object.
* @throws ClassCastException if <code>rhs</code> cannot be cast to a <code>BigDecimal</code> object.
* @stable ICU 2.0
* @see #compareTo(Object)
* @see #compareTo(BigDecimal)
* @see #compareTo(BigDecimal, MathContext)
*/
@ -2134,18 +2055,11 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* {@link #format(int,int,int,int,int,int)}. Using the two-parameter form of the method has exactly the same effect
* as using the six-parameter form with the final four parameters all being -1.
*
* @param before
* The <code>int</code> specifying the number of places before the decimal point. Use -1 for 'as many as
* are needed'.
* @param after
* The <code>int</code> specifying the number of places after the decimal point. Use -1 for 'as many as
* are needed'.
* @return A <code>String</code> representing this <code>BigDecimal</code>, laid out according to the specified
* parameters
* @throws ArithmeticException
* if the number cannot be laid out as requested.
* @throws IllegalArgumentException
* if a parameter is out of range.
* @param before The <code>int</code> specifying the number of places before the decimal point. Use -1 for 'as many as are needed'.
* @param after The <code>int</code> specifying the number of places after the decimal point. Use -1 for 'as many as are needed'.
* @return A <code>String</code> representing this <code>BigDecimal</code>, laid out according to the specified parameters
* @throws ArithmeticException if the number cannot be laid out as requested.
* @throws IllegalArgumentException if a parameter is out of range.
* @stable ICU 2.0
* @see #toString
* @see #toCharArray
@ -2203,31 +2117,23 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* discarded -- if <code>exround</code> has this value than if non-zero digits would be discarded (rounded) during
* formatting then an <code>ArithmeticException</code> is thrown.
*
* @param before
* The <code>int</code> specifying the number of places before the decimal point. Use -1 for 'as many as
* @param before The <code>int</code> specifying the number of places before the decimal point. Use -1 for 'as many as
* are needed'.
* @param after
* The <code>int</code> specifying the number of places after the decimal point. Use -1 for 'as many as
* @param after The <code>int</code> specifying the number of places after the decimal point. Use -1 for 'as many as
* are needed'.
* @param explaces
* The <code>int</code> specifying the number of places to be used for any exponent. Use -1 for 'as many
* @param explaces The <code>int</code> specifying the number of places to be used for any exponent. Use -1 for 'as many
* as are needed'.
* @param exdigits
* The <code>int</code> specifying the trigger (digits before the decimal point) which if exceeded causes
* @param exdigits The <code>int</code> specifying the trigger (digits before the decimal point) which if exceeded causes
* exponential notation to be used. Use 0 to force exponential notation. Use -1 to force plain notation
* (no exponential notation).
* @param exformint
* The <code>int</code> specifying the form of exponential notation to be used (
* @param exformint The <code>int</code> specifying the form of exponential notation to be used (
* {@link MathContext#SCIENTIFIC} or {@link MathContext#ENGINEERING}).
* @param exround
* The <code>int</code> specifying the rounding mode to use. Use -1 for the default,
* @param exround The <code>int</code> specifying the rounding mode to use. Use -1 for the default,
* {@link MathContext#ROUND_HALF_UP}.
* @return A <code>String</code> representing this <code>BigDecimal</code>, laid out according to the specified
* parameters
* @throws ArithmeticException
* if the number cannot be laid out as requested.
* @throws IllegalArgumentException
* if a parameter is out of range.
* @throws ArithmeticException if the number cannot be laid out as requested.
* @throws IllegalArgumentException if a parameter is out of range.
* @see #toString
* @see #toCharArray
* @stable ICU 2.0
@ -2488,8 +2394,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <code>ArithmeticException</code> is thrown.
*
* @return An <code>int</code> equal in value to <code>this</code>.
* @throws ArithmeticException
* if <code>this</code> has a non-zero decimal part, or will not fit in an <code>int</code>.
* @throws ArithmeticException if <code>this</code> has a non-zero decimal part, or will not fit in an <code>int</code>.
* @stable ICU 2.0
*/
@ -2573,8 +2478,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <code>ArithmeticException</code> is thrown.
*
* @return A <code>long</code> equal in value to <code>this</code>.
* @throws ArithmeticException
* if <code>this</code> has a non-zero decimal part, or will not fit in a <code>long</code>.
* @throws ArithmeticException if <code>this</code> has a non-zero decimal part, or will not fit in a <code>long</code>.
* @stable ICU 2.0
*/
@ -2651,8 +2555,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <code>n</code> may be negative, in which case the method returns the same result as <code>movePointRight(-n)
* </code>.
*
* @param n
* The <code>int</code> specifying the number of places to move the decimal point leftwards.
* @param n The <code>int</code> specifying the number of places to move the decimal point leftwards.
* @return A <code>BigDecimal</code> derived from <code>this</code>, with the decimal point moved <code>n</code>
* places to the left.
* @stable ICU 2.0
@ -2676,8 +2579,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <code>n</code> may be negative, in which case the method returns the same result as <code>movePointLeft(-n)
* </code>.
*
* @param n
* The <code>int</code> specifying the number of places to move the decimal point rightwards.
* @param n The <code>int</code> specifying the number of places to move the decimal point rightwards.
* @return A <code>BigDecimal</code> derived from <code>this</code>, with the decimal point moved <code>n</code>
* places to the right.
* @stable ICU 2.0
@ -2718,13 +2620,10 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* The same as {@link #setScale(int, int)}, where the first parameter is the scale, and the second is <code>
* MathContext.ROUND_UNNECESSARY</code>.
*
* @param scale
* The <code>int</code> specifying the scale of the resulting <code>BigDecimal</code>.
* @param scale The <code>int</code> specifying the scale of the resulting <code>BigDecimal</code>.
* @return A plain <code>BigDecimal</code> with the given scale.
* @throws ArithmeticException
* if <code>scale</code> is negative.
* @throws ArithmeticException
* if reducing scale would discard non-zero digits.
* @throws ArithmeticException if <code>scale</code> is negative.
* @throws ArithmeticException if reducing scale would discard non-zero digits.
* @stable ICU 2.0
*/
@ -2746,17 +2645,12 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* If <code>round</code> is <code>MathContext.ROUND_UNNECESSARY</code>, an <code>ArithmeticException</code> is
* thrown if any discarded digits are non-zero.
*
* @param scale
* The <code>int</code> specifying the scale of the resulting <code>BigDecimal</code>.
* @param round
* The <code>int</code> rounding mode to be used for the division (see the {@link MathContext} class).
* @param scale The <code>int</code> specifying the scale of the resulting <code>BigDecimal</code>.
* @param round The <code>int</code> rounding mode to be used for the division (see the {@link MathContext} class).
* @return A plain <code>BigDecimal</code> with the given scale.
* @throws IllegalArgumentException
* if <code>round</code> is not a valid rounding mode.
* @throws ArithmeticException
* if <code>scale</code> is negative.
* @throws ArithmeticException
* if <code>round</code> is <code>MathContext.ROUND_UNNECESSARY</code>, and reducing scale would discard
* @throws IllegalArgumentException if <code>round</code> is not a valid rounding mode.
* @throws ArithmeticException if <code>scale</code> is negative.
* @throws ArithmeticException if <code>round</code> is <code>MathContext.ROUND_UNNECESSARY</code>, and reducing scale would discard
* non-zero digits.
* @stable ICU 2.0
*/
@ -2804,8 +2698,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <code>ArithmeticException</code> is thrown.
*
* @return A <code>short</code> equal in value to <code>this</code>.
* @throws ArithmeticException
* if <code>this</code> has a non-zero decimal part, or will not fit in a <code>short</code>.
* @throws ArithmeticException if <code>this</code> has a non-zero decimal part, or will not fit in a <code>short</code>.
* @stable ICU 2.0
*/
@ -2896,8 +2789,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* An exception is thrown if the decimal part (if any) is non-zero.
*
* @return The <code>java.math.BigInteger</code> equal in value to the integer part of this <code>BigDecimal</code>.
* @throws ArithmeticException
* if <code>this</code> has a non-zero decimal part.
* @throws ArithmeticException if <code>this</code> has a non-zero decimal part.
* @stable ICU 2.0
*/
@ -2975,11 +2867,9 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* Double.toString()</code> method and the {@link #BigDecimal(java.lang.String)} constructor had then been used.
* This is typically not an exact conversion.
*
* @param dub
* The <code>double</code> to be translated.
* @param dub The <code>double</code> to be translated.
* @return The <code>BigDecimal</code> equal in value to <code>dub</code>.
* @throws NumberFormatException
* if the parameter is infinite or not a number.
* @throws NumberFormatException if the parameter is infinite or not a number.
* @stable ICU 2.0
*/
@ -2994,8 +2884,7 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* Translates a <code>long</code> to a <code>BigDecimal</code>. That is, returns a plain <code>BigDecimal</code>
* whose value is equal to the given <code>long</code>.
*
* @param lint
* The <code>long</code> to be translated.
* @param lint The <code>long</code> to be translated.
* @return The <code>BigDecimal</code> equal in value to <code>lint</code>.
* @stable ICU 2.0
*/
@ -3015,13 +2904,10 @@ public class BigDecimal extends java.lang.Number implements java.io.Serializable
* <p>
* A <code>NumberFormatException</code> is thrown if <code>scale</code> is negative.
*
* @param lint
* The <code>long</code> to be translated.
* @param scale
* The <code>int</code> scale to be applied.
* @param lint The <code>long</code> to be translated.
* @param scale The <code>int</code> scale to be applied.
* @return The <code>BigDecimal</code> equal in value to <code>lint</code>.
* @throws NumberFormatException
* if the scale is negative.
* @throws NumberFormatException if the scale is negative.
* @stable ICU 2.0
*/

View file

@ -788,8 +788,7 @@ public class Bidi {
* part of the text.</p>
*
* <p>When the <code>OPTION_STREAMING</code> option is used, it is
* recommended to call <code>orderParagraphsLTR()</code> with argument
* <code>orderParagraphsLTR</code> set to <code>true</code> before calling
* recommended to call <code>orderParagraphsLTR(true)</code> before calling
* <code>setPara()</code> so that later paragraphs may be concatenated to
* previous paragraphs on the right.
* </p>
@ -797,7 +796,6 @@ public class Bidi {
* @see #setReorderingMode
* @see #setReorderingOptions
* @see #getProcessedLength
* @see #orderParagraphsLTR
* @stable ICU 3.8
*/
public static final int OPTION_STREAMING = 4;
@ -3419,7 +3417,6 @@ public class Bidi {
* @return <code>true</code> if the <code>Bidi</code> object is set to
* allocate level 0 to block separators.
*
* @see #orderParagraphsLTR
* @stable ICU 3.8
*/
public boolean isOrderParagraphsLTR() {

View file

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 1996-2008, International Business Machines Corporation and *
* Copyright (C) 1996-2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -163,19 +163,12 @@ class BreakCTDictionary {
/**
* Find dictionary words that match the text.
*
* @param text
* A CharacterIterator representing the text. The iterator is
* @param text A CharacterIterator representing the text. The iterator is
* left after the longest prefix match in the dictionary.
* @param maxLength
* The maximum number of code units to match.
* @param lengths
* An array that is filled with the lengths of words that
* matched.
* @param count
* Filled with the number of elements output in lengths.
* @param limit
* The size of the lengths array; this limits the number of words
* output.
* @param maxLength The maximum number of code units to match.
* @param lengths An array that is filled with the lengths of words that matched.
* @param count Filled with the number of elements output in lengths.
* @param limit The size of the lengths array; this limits the number of words output.
* @return The number of characters in text that were matched.
*/
public int matches(CharacterIterator text, int maxLength, int lengths[],

View file

@ -129,8 +129,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* Construct a DateFormatSymbols object by loading format data from
* resources for the default locale.
*
* @throws java.util.MissingResourceException
* if the resources for the default locale cannot be
* @throws java.util.MissingResourceException if the resources for the default locale cannot be
* found or cannot be loaded.
* @stable ICU 2.0
*/
@ -143,8 +142,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* Construct a DateFormatSymbols object by loading format data from
* resources for the given locale.
*
* @throws java.util.MissingResourceException
* if the resources for the specified locale cannot be
* @throws java.util.MissingResourceException if the resources for the specified locale cannot be
* found or cannot be loaded.
* @stable ICU 2.0
*/
@ -157,8 +155,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
* Construct a DateFormatSymbols object by loading format data from
* resources for the given ulocale.
*
* @throws java.util.MissingResourceException
* if the resources for the specified locale cannot be
* @throws java.util.MissingResourceException if the resources for the specified locale cannot be
* found or cannot be loaded.
* @stable ICU 3.2
*/

View file

@ -112,7 +112,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
/**
* Construct a flexible generator according to data for a given locale.
* @param uLocale
* @param uLocale The locale to pass.
* @stable ICU 3.6
*/
public static DateTimePatternGenerator getInstance(ULocale uLocale) {
@ -332,8 +332,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
* Return the best pattern matching the input skeleton. It is guaranteed to
* have all of the fields in the skeleton.
*
* @param skeleton
* The skeleton is a pattern containing only the variable fields.
* @param skeleton The skeleton is a pattern containing only the variable fields.
* For example, "MMMdd" and "mmhh" are skeletons.
* @stable ICU 3.6
*/
@ -406,15 +405,16 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
/**
* Adds a pattern to the generator. If the pattern has the same skeleton as
* an existing pattern, and the override parameter is set, then the previous
* value is overriden. Otherwise, the previous value is retained. In either
* value is overridden. Otherwise, the previous value is retained. In either
* case, the conflicting information is returned in PatternInfo.
* <p>
* Note that single-field patterns (like "MMM") are automatically added, and
* don't need to be added explicitly!
*
* @param override
* when existing values are to be overridden use true, otherwise
* @param pattern Pattern to add.
* @param override When existing values are to be overridden use true, otherwise
* use false.
* @param returnInfo Returned information.
* @stable ICU 3.6
*/
public DateTimePatternGenerator addPattern(String pattern, boolean override, PatternInfo returnInfo) {
@ -444,8 +444,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
* Utility to return a unique skeleton from a given pattern. For example,
* both "MMM-dd" and "dd/MMM" produce the skeleton "MMMdd".
*
* @param pattern
* Input pattern, such as "dd/MMM"
* @param pattern Input pattern, such as "dd/MMM"
* @return skeleton, such as "MMMdd"
* @stable ICU 3.6
*/
@ -463,8 +462,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
* for example, both "MMM-dd" and "d/MMM" produce the skeleton "MMMd"
* (notice the single d).
*
* @param pattern
* Input pattern, such as "dd/MMM"
* @param pattern Input pattern, such as "dd/MMM"
* @return skeleton, such as "MMMdd"
* @stable ICU 3.6
*/
@ -479,8 +477,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
* Return a list of all the skeletons (in canonical form) from this class,
* and the patterns that they map to.
*
* @param result
* an output Map in which to place the mapping from skeleton to
* @param result an output Map in which to place the mapping from skeleton to
* pattern. If you want to see the internal order being used,
* supply a LinkedHashMap. If the input value is null, then a
* LinkedHashMap is allocated.
@ -524,11 +521,9 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
* "dd-MMMM hh:mm". This is used internally to get the best match for the
* input skeleton, but can also be used externally.
*
* @param pattern
* input pattern
* @param skeleton
* @return pattern adjusted to match the skeleton fields widths and
* subtypes.
* @param pattern input pattern
* @param skeleton For the pattern to match to.
* @return pattern adjusted to match the skeleton fields widths and subtypes.
* @stable ICU 3.6
*/
public String replaceFieldTypes(String pattern, String skeleton) {
@ -551,8 +546,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
* for those two skeletons, so the result is put together with this pattern,
* resulting in "d-MMM h:mm".
*
* @param dateTimeFormat
* message format pattern, where {1} will be replaced by the date
* @param dateTimeFormat message format pattern, where {1} will be replaced by the date
* pattern and {0} will be replaced by the time pattern.
* @stable ICU 3.6
*/
@ -579,7 +573,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
* the decimal string is ",". Then the resulting pattern is modified to be
* "H:mm:ss,SSSS"
*
* @param decimal
* @param decimal The decimal to set to.
* @stable ICU 3.6
*/
public void setDecimal(String decimal) {
@ -601,8 +595,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
* resulting getBestPattern values. This method returns a list of them, to
* help check the consistency of the patterns used to build this generator.
*
* @param output
* stores the redundant patterns that are removed. To get these
* @param output stores the redundant patterns that are removed. To get these
* in internal order, supply a LinkedHashSet. If null, a
* collection is allocated.
* @return the collection with added elements.
@ -750,10 +743,8 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
* <p>
* This reflects the way that the CLDR data is organized.
*
* @param field
* such as ERA
* @param value
* pattern, such as "{0}, {1}"
* @param field such as ERA
* @param value pattern, such as "{0}, {1}"
* @stable ICU 3.6
*/
public void setAppendItemFormat(int field, String value) {
@ -765,7 +756,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
* Getter corresponding to setAppendItemFormats. Values below 0 or at or
* above TYPE_LIMIT are illegal arguments.
*
* @param field
* @param field The index to retrieve the append item formats.
* @return append pattern for field
* @stable ICU 3.6
*/
@ -780,8 +771,8 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
* <p>
* This reflects the way that the CLDR data is organized.
*
* @param field
* @param value
* @param field Index of the append item names.
* @param value The value to set the item to.
* @stable ICU 3.6
*/
public void setAppendItemName(int field, String value) {
@ -793,7 +784,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
* Getter corresponding to setAppendItemNames. Values below 0 or at or above
* TYPE_LIMIT are illegal arguments.
*
* @param field
* @param field The index to get the append item name.
* @return name for field
* @stable ICU 3.6
*/
@ -804,7 +795,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
/**
* Determines whether a skeleton contains a single field
*
* @param skeleton
* @param skeleton The skeleton to determine if it contains a single field.
* @return true or not
* @internal
* @deprecated This API is ICU internal only.
@ -911,7 +902,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
/**
* Create a variable field: equivalent to VariableField(string,false);
* @param string
* @param string The string for the variable field.
* @internal
* @deprecated This API is ICU internal only.
*/
@ -920,8 +911,8 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
}
/**
* Create a variable field
* @param string
* @param strict TODO
* @param string The string for the variable field
* @param strict If true, then only allows exactly those lengths specified by CLDR for variables. For example, "hh:mm aa" would throw an exception.
* @throws IllegalArgumentException if the variable field is not valid.
* @internal
* @deprecated This API is ICU internal only.
@ -1008,7 +999,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
/**
* Parses the string into a list of items.
* @param string
* @param string The string to parse.
* @return this, for chaining
* @internal
* @deprecated This API is ICU internal only.
@ -1019,7 +1010,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
/**
* Parses the string into a list of items, taking into account all of the quoting that may be going on.
* @param string
* @param string The string to parse.
* @param strict If true, then only allows exactly those lengths specified by CLDR for variables. For example, "hh:mm aa" would throw an exception.
* @return this, for chaining
* @internal
@ -1255,7 +1246,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
/**
* Each literal string is quoted as needed. That is, the ' quote marks will only be added if needed. The exact pattern of quoting is not guaranteed, thus " de la " could be quoted as " 'de la' " or as " 'de' 'la' ".
* @param string
* @param string The string to check.
* @return string with quoted literals
* @internal
* @deprecated This API is ICU internal only.
@ -1482,7 +1473,7 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
/**
* internal routine
* @param pattern
* @param pattern The pattern that is passed.
* @return field value
* @internal
* @deprecated This API is ICU internal only.
@ -1742,7 +1733,6 @@ public class DateTimePatternGenerator implements Freezable, Cloneable {
/**
*
*/
@SuppressWarnings("unused")
void extractFrom(DateTimeMatcher source, int fieldMask) {
for (int i = 0; i < type.length; ++i) {
if ((fieldMask & (1<<i)) != 0) {

View file

@ -668,10 +668,8 @@ public class DecimalFormat extends NumberFormat {
* To obtain standard formats for a given locale, use the factory methods on NumberFormat such as getNumberInstance.
* These factories will return the most appropriate sub-class of NumberFormat for a given locale.
*
* @param pattern
* A non-localized pattern string.
* @exception IllegalArgumentException
* if the given pattern is invalid.
* @param pattern A non-localized pattern string.
* @exception IllegalArgumentException if the given pattern is invalid.
* @see NumberFormat#getInstance
* @see NumberFormat#getNumberInstance
* @see NumberFormat#getCurrencyInstance
@ -699,12 +697,9 @@ public class DecimalFormat extends NumberFormat {
* getCurrencyInstance. If you need only minor adjustments to a standard format, you can modify the format returned
* by a NumberFormat factory method.
*
* @param pattern
* a non-localized pattern string
* @param symbols
* the set of symbols to be used
* @exception IllegalArgumentException
* if the given pattern is invalid
* @param pattern a non-localized pattern string
* @param symbols the set of symbols to be used
* @exception IllegalArgumentException if the given pattern is invalid
* @see NumberFormat#getInstance
* @see NumberFormat#getNumberInstance
* @see NumberFormat#getCurrencyInstance
@ -743,16 +738,10 @@ public class DecimalFormat extends NumberFormat {
* patterns), you can use this constructor.
* <p>
*
* @param pattern
* a non-localized pattern string
* @param symbols
* the set of symbols to be used
* @param infoInput
* the information used for currency plural format, including currency plural patterns and plural rules.
* @param style
* the decimal formatting style, it is one of the following values: NumberFormat.NUMBERSTYLE;
* NumberFormat.CURRENCYSTYLE; NumberFormat.PERCENTSTYLE; NumberFormat.SCIENTIFICSTYLE;
* NumberFormat.INTEGERSTYLE; NumberFormat.ISOCURRENCYSTYLE; NumberFormat.PLURALCURRENCYSTYLE;
* @param pattern a non-localized pattern string
* @param symbols the set of symbols to be used
* @param infoInput the information used for currency plural format, including currency plural patterns and plural rules.
* @param style the decimal formatting style, it is one of the following values: NumberFormat.NUMBERSTYLE; NumberFormat.CURRENCYSTYLE; NumberFormat.PERCENTSTYLE; NumberFormat.SCIENTIFICSTYLE; NumberFormat.INTEGERSTYLE; NumberFormat.ISOCURRENCYSTYLE; NumberFormat.PLURALCURRENCYSTYLE;
* @draft ICU 4.2
* @provisional This API might change or be removed in a future release.
*/
@ -1640,11 +1629,8 @@ public class DecimalFormat extends NumberFormat {
* that order of preference. If {@link #isParseBigDecimal()} is true, all other values are returned as
* <code>BigDecimal</code> valuse. If the parse fails, null is returned.
*
* @param text
* the string to be parsed
* @param parsePosition
* defines the position where parsing is to begin, and upon return, the position where parsing left off.
* If the position has not changed upon return, then parsing failed.
* @param text the string to be parsed
* @param parsePosition defines the position where parsing is to begin, and upon return, the position where parsing left off. If the position has not changed upon return, then parsing failed.
* @return a <code>Number</code> object with the parsed value or <code>null</code> if the parse failed
* @stable ICU 2.0
*/
@ -2680,8 +2666,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Sets the decimal format symbols used by this format. The format uses a copy of the provided symbols.
*
* @param newSymbols
* desired DecimalFormatSymbols
* @param newSymbols desired DecimalFormatSymbols
* @see DecimalFormatSymbols
* @stable ICU 2.0
*/
@ -2856,11 +2841,8 @@ public class DecimalFormat extends NumberFormat {
/**
* Set the rounding increment. This method also controls whether rounding is enabled.
*
* @param newValue
* A positive rounding increment, or <code>null</code> or <code>BigDecimal(0.0)</code> to disable
* rounding.
* @exception IllegalArgumentException
* if <code>newValue</code> is < 0.0
* @param newValue A positive rounding increment, or <code>null</code> or <code>BigDecimal(0.0)</code> to disable rounding.
* @exception IllegalArgumentException if <code>newValue</code> is < 0.0
* @see #getRoundingIncrement
* @see #getRoundingMode
* @see #setRoundingMode
@ -2877,11 +2859,8 @@ public class DecimalFormat extends NumberFormat {
/**
* Set the rounding increment. This method also controls whether rounding is enabled.
*
* @param newValue
* A positive rounding increment, or <code>null</code> or <code>BigDecimal(0.0)</code> to disable
* rounding.
* @exception IllegalArgumentException
* if <code>newValue</code> is < 0.0
* @param newValue A positive rounding increment, or <code>null</code> or <code>BigDecimal(0.0)</code> to disable rounding.
* @exception IllegalArgumentException if <code>newValue</code> is < 0.0
* @see #getRoundingIncrement
* @see #getRoundingMode
* @see #setRoundingMode
@ -2903,10 +2882,8 @@ public class DecimalFormat extends NumberFormat {
/**
* Set the rounding increment. This method also controls whether rounding is enabled.
*
* @param newValue
* A positive rounding increment, or 0.0 to disable rounding.
* @exception IllegalArgumentException
* if <code>newValue</code> is < 0.0
* @param newValue A positive rounding increment, or 0.0 to disable rounding.
* @exception IllegalArgumentException if <code>newValue</code> is < 0.0
* @see #getRoundingIncrement
* @see #getRoundingMode
* @see #setRoundingMode
@ -2956,11 +2933,8 @@ public class DecimalFormat extends NumberFormat {
/**
* Set the rounding mode. This has no effect unless the rounding increment is greater than zero.
*
* @param roundingMode
* A rounding mode, between <code>BigDecimal.ROUND_UP</code> and
* <code>BigDecimal.ROUND_UNNECESSARY</code>.
* @exception IllegalArgumentException
* if <code>roundingMode</code> is unrecognized.
* @param roundingMode A rounding mode, between <code>BigDecimal.ROUND_UP</code> and <code>BigDecimal.ROUND_UNNECESSARY</code>.
* @exception IllegalArgumentException if <code>roundingMode</code> is unrecognized.
* @see #setRoundingIncrement
* @see #getRoundingIncrement
* @see #getRoundingMode
@ -2998,10 +2972,8 @@ public class DecimalFormat extends NumberFormat {
* Set the width to which the output of <code>format()</code> is padded. The width is counted in 16-bit code units.
* This method also controls whether padding is enabled.
*
* @param width
* the width to which to pad the result of <code>format()</code>, or zero to disable padding
* @exception IllegalArgumentException
* if <code>width</code> is < 0
* @param width the width to which to pad the result of <code>format()</code>, or zero to disable padding
* @exception IllegalArgumentException if <code>width</code> is < 0
* @see #getFormatWidth
* @see #getPadCharacter
* @see #setPadCharacter
@ -3035,8 +3007,7 @@ public class DecimalFormat extends NumberFormat {
* Set the character used to pad to the format width. If padding is not enabled, then this will take effect if
* padding is later enabled.
*
* @param padChar
* the pad character
* @param padChar the pad character
* @see #setFormatWidth
* @see #getFormatWidth
* @see #getPadCharacter
@ -3073,11 +3044,8 @@ public class DecimalFormat extends NumberFormat {
* Set the position at which padding will take place. This is the location at which padding will be inserted if the
* result of <code>format()</code> is shorter than the format width. This has no effect unless padding is enabled.
*
* @param padPos
* the pad position, one of <code>PAD_BEFORE_PREFIX</code>, <code>PAD_AFTER_PREFIX</code>,
* <code>PAD_BEFORE_SUFFIX</code>, or <code>PAD_AFTER_SUFFIX</code>.
* @exception IllegalArgumentException
* if the pad position in unrecognized
* @param padPos the pad position, one of <code>PAD_BEFORE_PREFIX</code>, <code>PAD_AFTER_PREFIX</code>, <code>PAD_BEFORE_SUFFIX</code>, or <code>PAD_AFTER_SUFFIX</code>.
* @exception IllegalArgumentException if the pad position in unrecognized
* @see #setFormatWidth
* @see #getFormatWidth
* @see #setPadCharacter
@ -3116,8 +3084,7 @@ public class DecimalFormat extends NumberFormat {
* integer digits is <= 8. If the maximum number of integer digits is set to more than 8, the effective maximum will
* be 1. This allows this call to generate a 'default' scientific number format without additional changes.
*
* @param useScientific
* true if this object formats and parses scientific notation
* @param useScientific true if this object formats and parses scientific notation
* @see #isScientificNotation
* @see #getMinimumExponentDigits
* @see #setMinimumExponentDigits
@ -3147,10 +3114,8 @@ public class DecimalFormat extends NumberFormat {
/**
* Set the minimum exponent digits that will be shown. This has no effect unless scientific notation is in use.
*
* @param minExpDig
* a value >= 1 indicating the fewest exponent digits that will be shown
* @exception IllegalArgumentException
* if <code>minExpDig</code> < 1
* @param minExpDig a value >= 1 indicating the fewest exponent digits that will be shown
* @exception IllegalArgumentException if <code>minExpDig</code> < 1
* @see #setScientificNotation
* @see #isScientificNotation
* @see #getMinimumExponentDigits
@ -3184,9 +3149,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Set whether the exponent sign is always shown. This has no effect unless scientific notation is in use.
*
* @param expSignAlways
* true if the exponent is always prefixed with either the localized minus sign or the localized plus
* sign, false if only negative exponents are prefixed with the localized minus sign.
* @param expSignAlways true if the exponent is always prefixed with either the localized minus sign or the localized plus sign, false if only negative exponents are prefixed with the localized minus sign.
* @see #setScientificNotation
* @see #isScientificNotation
* @see #setMinimumExponentDigits
@ -3259,7 +3222,6 @@ public class DecimalFormat extends NumberFormat {
* Returns the MathContext used by this format.
*
* @return desired MathContext
* @see #mathContext
* @see #getMathContext
* @draft ICU 4.2
* @provisional This API might change or be removed in a future release.
@ -3272,7 +3234,6 @@ public class DecimalFormat extends NumberFormat {
* Returns the MathContext used by this format.
*
* @return desired MathContext
* @see #mathContext
* @see #getMathContext
* @draft ICU 4.2
* @provisional This API might change or be removed in a future release.
@ -3290,9 +3251,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Sets the MathContext used by this format.
*
* @param newValue
* desired MathContext
* @see #mathContext
* @param newValue desired MathContext
* @see #getMathContext
* @draft ICU 4.2
* @provisional This API might change or be removed in a future release.
@ -3304,9 +3263,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Sets the MathContext used by this format.
*
* @param newValue
* desired MathContext
* @see #mathContext
* @param newValue desired MathContext
* @see #getMathContext
* @draft ICU 4.2
* @provisional This API might change or be removed in a future release.
@ -3368,8 +3325,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Sets the CurrencyPluralInfo used by this format. The format uses a copy of the provided information.
*
* @param newInfo
* desired CurrencyPluralInfo
* @param newInfo desired CurrencyPluralInfo
* @see CurrencyPluralInfo
* @draft ICU 4.2
* @provisional This API might change or be removed in a future release.
@ -3586,7 +3542,6 @@ public class DecimalFormat extends NumberFormat {
* ChoiceFormat, the currencyChoice member variable will be initialized if it is null. If doFormat is
* true, then it is assumed that the currencyChoice has been created, and it will be used to format the
* value in digitList.
* @return the expanded equivalent of pattern
*/
// Bug 4212072 [Richard/GCL]
private void expandAffix(String pattern, String pluralCount, StringBuffer buffer, boolean doFormat) {
@ -4629,8 +4584,7 @@ public class DecimalFormat extends NumberFormat {
* it is set to one. If the maximum significant digits count is less than <code>min</code>, then it is set to
* <code>min</code>. This value has no effect unless areSignificantDigitsUsed() returns true.
*
* @param min
* the fewest significant digits to be shown
* @param min the fewest significant digits to be shown
* @stable ICU 3.0
*/
public void setMinimumSignificantDigits(int min) {
@ -4648,8 +4602,7 @@ public class DecimalFormat extends NumberFormat {
* it is set to one. If the minimum significant digits count is greater than <code>max</code>, then it is set to
* <code>max</code>. This value has no effect unless areSignificantDigitsUsed() returns true.
*
* @param max
* the most significant digits to be shown
* @param max the most significant digits to be shown
* @stable ICU 3.0
*/
public void setMaximumSignificantDigits(int max) {
@ -4675,8 +4628,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Sets whether significant digits are in use, or integer and fraction digit counts are in use.
*
* @param useSignificantDigits
* true to use significant digits, or false to use integer and fraction digit counts
* @param useSignificantDigits true to use significant digits, or false to use integer and fraction digit counts
* @stable ICU 3.0
*/
public void setSignificantDigitsUsed(boolean useSignificantDigits) {
@ -4688,8 +4640,7 @@ public class DecimalFormat extends NumberFormat {
* is a currency format. If this format is not a currency format, then the currency object is used if and when this
* object becomes a currency format through the application of a new pattern.
*
* @param theCurrency
* new currency object to use. Must not be null.
* @param theCurrency new currency object to use. Must not be null.
* @stable ICU 2.2
*/
public void setCurrency(Currency theCurrency) {
@ -4757,8 +4708,7 @@ public class DecimalFormat extends NumberFormat {
/**
* Sets whether {@link #parse(String, ParsePosition)} method returns BigDecimal. The default value is false.
*
* @param value
* true if {@link #parse(String, ParsePosition)} method returns BigDecimal.
* @param value true if {@link #parse(String, ParsePosition)} method returns BigDecimal.
* @stable ICU 3.6
*/
public void setParseBigDecimal(boolean value) {

View file

@ -7,8 +7,6 @@
package com.ibm.icu.text;
import java.text.ParseException;
import com.ibm.icu.impl.Punycode;
/**
@ -223,7 +221,7 @@ public final class IDNA {
* If this option is set and the input does not satisfy STD3 rules,
* the operation will fail with ParseException
* @return StringBuffer the converted String
* @throws StringPrepParseException
* @throws StringPrepParseException When an error occurs for parsing a string.
* @stable ICU 2.8
*/
public static StringBuffer convertToASCII(String src, int options)
@ -254,7 +252,6 @@ public final class IDNA {
* If this option is set and the input does not satisfy STD3 rules,
* the operation will fail with ParseException
* @return StringBuffer the converted String
* @throws ParseException
* @stable ICU 2.8
*/
public static StringBuffer convertToASCII(StringBuffer src, int options)
@ -285,7 +282,6 @@ public final class IDNA {
* If this option is set and the input does not satisfy STD3 rules,
* the operation will fail with ParseException
* @return StringBuffer the converted String
* @throws ParseException
* @stable ICU 2.8
*/
public static StringBuffer convertToASCII(UCharacterIterator src, int options)
@ -424,7 +420,6 @@ public final class IDNA {
* If this option is set and the input does not satisfy STD3 rules,
* the operation will fail with ParseException
* @return StringBuffer the converted String
* @throws ParseException
* @stable ICU 2.8
*/
public static StringBuffer convertIDNToASCII(UCharacterIterator src, int options)
@ -459,7 +454,6 @@ public final class IDNA {
* If this option is set and the input does not satisfy STD3 rules,
* the operation will fail with ParseException
* @return StringBuffer the converted String
* @throws ParseException
* @stable ICU 2.8
*/
public static StringBuffer convertIDNToASCII(StringBuffer src, int options)
@ -494,7 +488,6 @@ public final class IDNA {
* If this option is set and the input does not satisfy STD3 rules,
* the operation will fail with ParseException
* @return StringBuffer the converted String
* @throws ParseException
* @stable ICU 2.8
*/
public static StringBuffer convertIDNToASCII(String src,int options)
@ -550,7 +543,6 @@ public final class IDNA {
* If this option is set and the input does not satisfy STD3 rules,
* the operation will fail with ParseException
* @return StringBuffer the converted String
* @throws ParseException
* @stable ICU 2.8
*/
public static StringBuffer convertToUnicode(String src, int options)
@ -581,7 +573,6 @@ public final class IDNA {
* If this option is set and the input does not satisfy STD3 rules,
* the operation will fail with ParseException
* @return StringBuffer the converted String
* @throws ParseException
* @stable ICU 2.8
*/
public static StringBuffer convertToUnicode(StringBuffer src, int options)
@ -612,7 +603,6 @@ public final class IDNA {
* If this option is set and the input does not satisfy STD3 rules,
* the operation will fail with ParseException
* @return StringBuffer the converted String
* @throws ParseException
* @stable ICU 2.8
*/
public static StringBuffer convertToUnicode(UCharacterIterator src, int options)
@ -749,7 +739,6 @@ public final class IDNA {
* If this option is set and the input does not satisfy STD3 rules,
* the operation will fail with ParseException
* @return StringBuffer the converted String
* @throws ParseException
* @stable ICU 2.8
*/
public static StringBuffer convertIDNToUnicode(UCharacterIterator src, int options)
@ -781,7 +770,6 @@ public final class IDNA {
* If this option is set and the input does not satisfy STD3 rules,
* the operation will fail with ParseException
* @return StringBuffer the converted String
* @throws ParseException
* @stable ICU 2.8
*/
public static StringBuffer convertIDNToUnicode(StringBuffer src, int options)
@ -813,7 +801,6 @@ public final class IDNA {
* If this option is set and the input does not satisfy STD3 rules,
* the operation will fail with ParseException
* @return StringBuffer the converted String
* @throws ParseException
* @stable ICU 2.8
*/
public static StringBuffer convertIDNToUnicode(String src, int options)
@ -871,7 +858,6 @@ public final class IDNA {
* If this option is set and the input does not satisfy STD3 rules,
* the operation will fail with ParseException
* @return 0 if the strings are equal, > 0 if s1 > s2 and < 0 if s1 < s2
* @throws ParseException
* @stable ICU 2.8
*/
// TODO: optimize
@ -910,7 +896,6 @@ public final class IDNA {
* If this option is set and the input does not satisfy STD3 rules,
* the operation will fail with ParseException
* @return 0 if the strings are equal, > 0 if s1 > s2 and < 0 if s1 < s2
* @throws ParseException
* @stable ICU 2.8
*/
// TODO: optimize
@ -948,7 +933,6 @@ public final class IDNA {
* If this option is set and the input does not satisfy STD3 rules,
* the operation will fail with ParseException
* @return 0 if the strings are equal, > 0 if i1 > i2 and < 0 if i1 < i2
* @throws ParseException
* @stable ICU 2.8
*/
// TODO: optimize

View file

@ -694,12 +694,9 @@ public class MessageFormat extends UFormat implements BaseFormat<Object,StringBu
* This method is only supported if the format does not use
* named arguments, otherwise an IllegalArgumentException is thrown.
*
* @param newFormats
* the new formats to use
* @throws NullPointerException
* if <code>newFormats</code> is null
* @throws IllegalArgumentException
* if this formatter uses named arguments
* @param newFormats the new formats to use
* @throws NullPointerException if <code>newFormats</code> is null
* @throws IllegalArgumentException if this formatter uses named arguments
* @stable ICU 3.0
*/
public void setFormatsByArgumentIndex(Format[] newFormats) {
@ -796,12 +793,9 @@ public class MessageFormat extends UFormat implements BaseFormat<Object,StringBu
* This method is only supported when exclusively numbers are used for
* argument names. Otherwise an IllegalArgumentException is thrown.
*
* @param argumentIndex
* the argument index for which to use the new format
* @param newFormat
* the new format to use
* @exception IllegalArgumentException
* if alphanumeric arguments where used in MessageFormat.
* @param argumentIndex the argument index for which to use the new format
* @param newFormat the new format to use
* @exception IllegalArgumentException if alphanumeric arguments where used in MessageFormat.
* @stable ICU 3.0
*/
public void setFormatByArgumentIndex(int argumentIndex, Format newFormat) {
@ -887,8 +881,7 @@ public class MessageFormat extends UFormat implements BaseFormat<Object,StringBu
* argument names. Otherwise an IllegalArgumentException is thrown.
*
* @return the formats used for the arguments within the pattern
* @throws IllegalArgumentException
* if this format uses named arguments
* @throws IllegalArgumentException if this format uses named arguments
* @stable ICU 3.0
*/
public Format[] getFormatsByArgumentIndex() {
@ -942,7 +935,7 @@ public class MessageFormat extends UFormat implements BaseFormat<Object,StringBu
/**
* Get the format argument names. For more details, see {@link #setFormatByArgumentName(String, Format)}.
* @return List of names
* @deprecated
* @deprecated This API is ICU internal only.
* @internal
*/
public Set<String> getFormatArgumentNames() {
@ -956,7 +949,7 @@ public class MessageFormat extends UFormat implements BaseFormat<Object,StringBu
/**
* Get the formats according to their argument names. For more details, see {@link #setFormatByArgumentName(String, Format)}.
* @return format associated with the name, or null if there isn't one.
* @deprecated
* @deprecated This API is ICU internal only.
* @internal
*/
public Format getFormatByArgumentName(String argumentName) {
@ -1036,8 +1029,7 @@ public class MessageFormat extends UFormat implements BaseFormat<Object,StringBu
* @throws IllegalArgumentException if an argument in the
* <code>arguments</code> array is not of the type
* expected by the format element(s) that use it.
* @throws IllegalArgumentException
* if this format uses named arguments
* @throws IllegalArgumentException if this format uses named arguments
* @stable ICU 3.0
*/
public final StringBuffer format(Object[] arguments, StringBuffer result,
@ -1096,8 +1088,7 @@ public class MessageFormat extends UFormat implements BaseFormat<Object,StringBu
* or if an argument in the <code>arguments</code> array
* is not of the type expected by the format element(s)
* that use it.
* @throws IllegalArgumentException
* if this format uses named arguments
* @throws IllegalArgumentException if this format uses named arguments
* @stable ICU 3.0
*/
public static String format(String pattern, Object[] arguments) {
@ -1393,10 +1384,8 @@ public class MessageFormat extends UFormat implements BaseFormat<Object,StringBu
*
* @param source A <code>String</code> whose beginning should be parsed.
* @return An <code>Object</code> array parsed from the string.
* @exception ParseException
* if the beginning of the specified string cannot be parsed.
* @exception IllegalArgumentException
* if this format uses named arguments
* @exception ParseException if the beginning of the specified string cannot be parsed.
* @exception IllegalArgumentException if this format uses named arguments
* @stable ICU 3.0
*/
public Object[] parse(String source) throws ParseException {

View file

@ -248,7 +248,7 @@ abstract class NFSubstitution {
/**
* Compares two substitutions for equality
* @param The substitution to compare this one to
* @param that The substitution to compare this one to
* @return true if the two substitutions are functionally equivalent
*/
public boolean equals(Object that) {
@ -356,7 +356,7 @@ abstract class NFSubstitution {
* is formatted using the rule set or DecimalFormat that this
* substitution refers to, and the result is inserted into the result
* string.
* @param The number being formatted
* @param number The number being formatted
* @return The result of performing the opreration on the number
*/
public abstract long transformNumber(long number);
@ -367,7 +367,7 @@ abstract class NFSubstitution {
* is formatted using the rule set or DecimalFormat that this
* substitution refers to, and the result is inserted into the result
* string.
* @param The number being formatted
* @param number The number being formatted
* @return The result of performing the opreration on the number
*/
public abstract double transformNumber(double number);

View file

@ -549,7 +549,7 @@ public final class Normalizer implements Cloneable {
/**
* Null operation for use with the {@link #Normalizer constructors}
* Null operation for use with the {@link com.ibm.icu.text.Normalizer constructors}
* and the static {@link #normalize normalize} method. This value tells
* the <tt>Normalizer</tt> to do nothing but return unprocessed characters
* from the underlying String or CharacterIterator. If you have code which
@ -566,7 +566,7 @@ public final class Normalizer implements Cloneable {
/**
* Canonical decomposition followed by canonical composition. Used with the
* {@link #Normalizer constructors} and the static
* {@link com.ibm.icu.text.Normalizer constructors} and the static
* {@link #normalize normalize} method to determine the operation to be
* performed.
* <p>
@ -584,7 +584,7 @@ public final class Normalizer implements Cloneable {
/**
* Compatibility decomposition followed by canonical composition.
* Used with the {@link #Normalizer constructors} and the static
* Used with the {@link com.ibm.icu.text.Normalizer constructors} and the static
* {@link #normalize normalize} method to determine the operation to be
* performed.
* <p>
@ -602,7 +602,7 @@ public final class Normalizer implements Cloneable {
/**
* Canonical decomposition. This value is passed to the
* {@link #Normalizer constructors} and the static
* {@link com.ibm.icu.text.Normalizer constructors} and the static
* {@link #normalize normalize}
* method to determine the operation to be performed.
* <p>
@ -620,7 +620,7 @@ public final class Normalizer implements Cloneable {
/**
* Compatibility decomposition. This value is passed to the
* {@link #Normalizer constructors} and the static
* {@link com.ibm.icu.text.Normalizer constructors} and the static
* {@link #normalize normalize}
* method to determine the operation to be performed.
* <p>
@ -1877,7 +1877,6 @@ public final class Normalizer implements Cloneable {
*
* @throws IllegalArgumentException if the given index is less than
* {@link #getBeginIndex} or greater than {@link #getEndIndex}.
* @return The codepoint as an int
* @deprecated ICU 3.2
* @obsolete ICU 3.2
*/
@ -2066,7 +2065,7 @@ public final class Normalizer implements Cloneable {
* @param fillIn the char buffer to fill the UTF-16 units.
* The length of the buffer should be equal to the length of the
* underlying text storage
* @throws IndexOutOfBoundsException
* @throws IndexOutOfBoundsException If the index passed for the array is invalid.
* @see #getLength
* @stable ICU 2.8
*/

View file

@ -478,8 +478,7 @@ public class PluralFormat extends UFormat {
* and upon return, the position where parsing left off. If the position
* has not changed upon return, then parsing failed.
* @return nothing because this method is not yet implemented.
* @throws UnsupportedOperationException
* will always be thrown by this method.
* @throws UnsupportedOperationException will always be thrown by this method.
* @stable ICU 3.8
*/
public Number parse(String text, ParsePosition parsePosition) {
@ -493,8 +492,7 @@ public class PluralFormat extends UFormat {
* and upon return, the position where parsing left off. If the position
* has not changed upon return, then parsing failed.
* @return nothing because this method is not yet implemented.
* @throws UnsupportedOperationException
* will always be thrown by this method.
* @throws UnsupportedOperationException will always be thrown by this method.
* @stable ICU 3.8
*/
public Object parseObject(String source, ParsePosition pos) {

View file

@ -555,12 +555,10 @@ public class PluralRules implements Serializable {
this.constraint = constraint;
}
@SuppressWarnings("unused")
public Rule and(Constraint c) {
return new ConstrainedRule(keyword, new AndConstraint(constraint, c));
}
@SuppressWarnings("unused")
public Rule or(Constraint c) {
return new ConstrainedRule(keyword, new OrConstraint(constraint, c));
}

View file

@ -282,7 +282,7 @@ public final class StringPrep {
* closed after the method returns.
*
* @param inputStream The stream for reading the StringPrep profile binarySun
* @throws IOException
* @throws IOException An exception occurs when I/O of the inputstream is invalid
* @stable ICU 2.8
*/
public StringPrep(InputStream inputStream) throws IOException{
@ -329,7 +329,7 @@ public final class StringPrep {
/**
* Gets a StringPrep instance for the specified profile
*
* @param profile
* @param profile The profile passed to find the StringPrep instance.
* @draft ICU 4.2
* @provisional This API might change or be removed in a future release.
*/
@ -551,7 +551,7 @@ public final class StringPrep {
* as normal Unicode code points.
*
* @return StringBuffer A StringBuffer containing the output
* @throws StringPrepParseException
* @throws StringPrepParseException An exception occurs when parsing a string is invalid.
* @stable ICU 2.8
*/
public StringBuffer prepare(UCharacterIterator src, int options)
@ -635,7 +635,7 @@ public final class StringPrep {
* as normal Unicode code points.
*
* @return String A String containing the output
* @throws StringPrepParseException
* @throws StringPrepParseException An exception when parsing or preparing a string is invalid.
* @draft ICU 4.2
* @provisional This API might change or be removed in a future release.
*/

View file

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 1996-2004, International Business Machines Corporation and *
* Copyright (C) 1996-2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -314,7 +314,7 @@ public abstract class UCharacterIterator
* units.
* @param offset the position within the array to start putting the data.
* @return the number of code units added to fillIn, as a convenience
* @exception IndexOutOfBounds exception if there is not enough
* @exception IndexOutOfBoundsException exception if there is not enough
* room after offset in the array, or if offset < 0.
* @stable ICU 2.4
*/
@ -326,7 +326,7 @@ public abstract class UCharacterIterator
* @param fillIn an array of chars to fill with the underlying UTF-16 code
* units.
* @return the number of code units added to fillIn, as a convenience
* @exception IndexOutOfBounds exception if there is not enough
* @exception IndexOutOfBoundsException exception if there is not enough
* room in the array.
* @stable ICU 2.4
*/

View file

@ -209,14 +209,11 @@ public final class UTF16 {
* character will be returned. If a complete supplementary character is not found the incomplete
* character will be returned
*
* @param source
* array of UTF-16 chars
* @param offset16
* UTF-16 offset to the start of the character.
* @param source Array of UTF-16 chars
* @param offset16 UTF-16 offset to the start of the character.
* @return UTF-32 value for the UTF-32 value that contains the char at offset16. The boundaries
* of that codepoint are the same as in <code>bounds32()</code>.
* @exception IndexOutOfBoundsException
* thrown if offset16 is out of bounds.
* @exception IndexOutOfBoundsException Thrown if offset16 is out of bounds.
* @stable ICU 2.1
*/
public static int charAt(String source, int offset16) {
@ -266,14 +263,11 @@ public final class UTF16 {
* character will be returned. If a complete supplementary character is not found the incomplete
* character will be returned
*
* @param source
* array of UTF-16 chars
* @param offset16
* UTF-16 offset to the start of the character.
* @param source Array of UTF-16 chars
* @param offset16 UTF-16 offset to the start of the character.
* @return UTF-32 value for the UTF-32 value that contains the char at offset16. The boundaries
* of that codepoint are the same as in <code>bounds32()</code>.
* @exception IndexOutOfBoundsException
* thrown if offset16 is out of bounds.
* @exception IndexOutOfBoundsException Thrown if offset16 is out of bounds.
* @stable ICU 2.1
*/
public static int charAt(CharSequence source, int offset16) {
@ -325,14 +319,11 @@ public final class UTF16 {
* character will be returned. If a complete supplementary character is not found the incomplete
* character will be returned
*
* @param source
* UTF-16 chars string buffer
* @param offset16
* UTF-16 offset to the start of the character.
* @param source UTF-16 chars string buffer
* @param offset16 UTF-16 offset to the start of the character.
* @return UTF-32 value for the UTF-32 value that contains the char at offset16. The boundaries
* of that codepoint are the same as in <code>bounds32()</code>.
* @exception IndexOutOfBoundsException
* thrown if offset16 is out of bounds.
* @exception IndexOutOfBoundsException Thrown if offset16 is out of bounds.
* @stable ICU 2.1
*/
public static int charAt(StringBuffer source, int offset16) {
@ -378,18 +369,13 @@ public final class UTF16 {
* character will be returned. If a complete supplementary character is not found the incomplete
* character will be returned
*
* @param source
* array of UTF-16 chars
* @param start
* offset to substring in the source array for analyzing
* @param limit
* offset to substring in the source array for analyzing
* @param offset16
* UTF-16 offset relative to start
* @param source Array of UTF-16 chars
* @param start Offset to substring in the source array for analyzing
* @param limit Offset to substring in the source array for analyzing
* @param offset16 UTF-16 offset relative to start
* @return UTF-32 value for the UTF-32 value that contains the char at offset16. The boundaries
* of that codepoint are the same as in <code>bounds32()</code>.
* @exception IndexOutOfBoundsException
* thrown if offset16 is not within the range of start and limit.
* @exception IndexOutOfBoundsException Thrown if offset16 is not within the range of start and limit.
* @stable ICU 2.1
*/
public static int charAt(char source[], int start, int limit, int offset16) {
@ -436,14 +422,11 @@ public final class UTF16 {
* character will be returned. If a complete supplementary character is not found the incomplete
* character will be returned
*
* @param source
* UTF-16 chars string buffer
* @param offset16
* UTF-16 offset to the start of the character.
* @param source UTF-16 chars string buffer
* @param offset16 UTF-16 offset to the start of the character.
* @return UTF-32 value for the UTF-32 value that contains the char at offset16. The boundaries
* of that codepoint are the same as in <code>bounds32()</code>.
* @exception IndexOutOfBoundsException
* thrown if offset16 is out of bounds.
* @exception IndexOutOfBoundsException Thrown if offset16 is out of bounds.
* @stable ICU 2.1
*/
public static int charAt(Replaceable source, int offset16) {
@ -485,8 +468,7 @@ public final class UTF16 {
* <a href="../lang/UCharacter.html#isLegal(char)">isLegal()</a></code>
* on char32 before calling.
*
* @param char32
* the input codepoint.
* @param char32 The input codepoint.
* @return 2 if is in supplementary space, otherwise 1.
* @stable ICU 2.1
*/
@ -500,10 +482,8 @@ public final class UTF16 {
/**
* Returns the type of the boundaries around the char at offset16. Used for random access.
*
* @param source
* text to analyse
* @param offset16
* UTF-16 offset
* @param source Text to analyse
* @param offset16 UTF-16 offset
* @return
* <ul>
* <li> SINGLE_CHAR_BOUNDARY : a single char; the bounds are [offset16, offset16+1]
@ -514,8 +494,7 @@ public final class UTF16 {
* </ul>
* For bit-twiddlers, the return values for these are chosen so that the boundaries
* can be gotten by: [offset16 - (value >> 2), offset16 + (value & 3)].
* @exception IndexOutOfBoundsException
* if offset16 is out of bounds.
* @exception IndexOutOfBoundsException If offset16 is out of bounds.
* @stable ICU 2.1
*/
public static int bounds(String source, int offset16) {
@ -539,10 +518,8 @@ public final class UTF16 {
/**
* Returns the type of the boundaries around the char at offset16. Used for random access.
*
* @param source
* string buffer to analyse
* @param offset16
* UTF16 offset
* @param source String buffer to analyse
* @param offset16 UTF16 offset
* @return
* <ul>
* <li> SINGLE_CHAR_BOUNDARY : a single char; the bounds are [offset16, offset16 + 1]
@ -553,8 +530,7 @@ public final class UTF16 {
* </ul>
* For bit-twiddlers, the return values for these are chosen so that the boundaries
* can be gotten by: [offset16 - (value >> 2), offset16 + (value & 3)].
* @exception IndexOutOfBoundsException
* if offset16 is out of bounds.
* @exception IndexOutOfBoundsException If offset16 is out of bounds.
* @stable ICU 2.1
*/
public static int bounds(StringBuffer source, int offset16) {
@ -580,14 +556,10 @@ public final class UTF16 {
* that the boundaries are determined with respect to the subarray, hence the char array
* {0xD800, 0xDC00} has the result SINGLE_CHAR_BOUNDARY for start = offset16 = 0 and limit = 1.
*
* @param source
* char array to analyse
* @param start
* offset to substring in the source array for analyzing
* @param limit
* offset to substring in the source array for analyzing
* @param offset16
* UTF16 offset relative to start
* @param source Char array to analyse
* @param start Offset to substring in the source array for analyzing
* @param limit Offset to substring in the source array for analyzing
* @param offset16 UTF16 offset relative to start
* @return
* <ul>
* <li> SINGLE_CHAR_BOUNDARY : a single char; the bounds are
@ -598,8 +570,7 @@ public final class UTF16 {
* </ul>
* For bit-twiddlers, the boundary values for these are chosen so that the boundaries
* can be gotten by: [offset16 - (boundvalue >> 2), offset16 + (boundvalue & 3)].
* @exception IndexOutOfBoundsException
* if offset16 is not within the range of start and limit.
* @exception IndexOutOfBoundsException If offset16 is not within the range of start and limit.
* @stable ICU 2.1
*/
public static int bounds(char source[], int start, int limit, int offset16) {
@ -627,9 +598,8 @@ public final class UTF16 {
/**
* Determines whether the code value is a surrogate.
*
* @param char16
* the input character.
* @return true iff the input character is a surrogate.
* @param char16 The input character.
* @return true If the input character is a surrogate.
* @stable ICU 2.1
*/
public static boolean isSurrogate(char char16) {
@ -639,9 +609,8 @@ public final class UTF16 {
/**
* Determines whether the character is a trail surrogate.
*
* @param char16
* the input character.
* @return true iff the input character is a trail surrogate.
* @param char16 The input character.
* @return true If the input character is a trail surrogate.
* @stable ICU 2.1
*/
public static boolean isTrailSurrogate(char char16) {
@ -651,9 +620,8 @@ public final class UTF16 {
/**
* Determines whether the character is a lead surrogate.
*
* @param char16
* the input character.
* @return true iff the input character is a lead surrogate
* @param char16 The input character.
* @return true If the input character is a lead surrogate
* @stable ICU 2.1
*/
public static boolean isLeadSurrogate(char char16) {
@ -665,8 +633,7 @@ public final class UTF16 {
* <code><a href="../lang/UCharacter.html#isLegal(char)">isLegal()</a></code> on char32
* before calling.
*
* @param char32
* the input character.
* @param char32 The input character.
* @return lead surrogate if the getCharCount(ch) is 2; <br>
* and 0 otherwise (note: 0 is not a valid lead surrogate).
* @stable ICU 2.1
@ -683,8 +650,7 @@ public final class UTF16 {
* <code><a href="../lang/UCharacter.html#isLegal(char)">isLegal()</a></code> on char32
* before calling.
*
* @param char32
* the input character.
* @param char32 The input character.
* @return the trail surrogate if the getCharCount(ch) is 2; <br>
* otherwise the character itself
* @stable ICU 2.1
@ -701,11 +667,9 @@ public final class UTF16 {
* containing the UTF-32 value in UTF16 format. If a validity check is required, use <a
* href="../lang/UCharacter.html#isLegal(char)">isLegal()</a></code> on char32 before calling.
*
* @param char32
* the input character.
* @param char32 The input character.
* @return string value of char32 in UTF16 format
* @exception IllegalArgumentException
* thrown if char32 is a invalid codepoint.
* @exception IllegalArgumentException Thrown if char32 is a invalid codepoint.
* @stable ICU 2.1
*/
public static String valueOf(int char32) {
@ -723,10 +687,8 @@ public final class UTF16 {
* codepoint at offset16 before calling. The result returned will be a newly created String
* obtained by calling source.substring(..) with the appropriate indexes.
*
* @param source
* the input string.
* @param offset16
* the UTF16 index to the codepoint in source
* @param source The input string.
* @param offset16 The UTF16 index to the codepoint in source
* @return string value of char32 in UTF16 format
* @stable ICU 2.1
*/
@ -749,10 +711,8 @@ public final class UTF16 {
* the codepoint at offset16 before calling. The result returned will be a newly created String
* obtained by calling source.substring(..) with the appropriate indexes.
*
* @param source
* the input string buffer.
* @param offset16
* the UTF16 index to the codepoint in source
* @param source The input string buffer.
* @param offset16 The UTF16 index to the codepoint in source
* @return string value of char32 in UTF16 format
* @stable ICU 2.1
*/
@ -777,14 +737,10 @@ public final class UTF16 {
* offset16 before calling. The result returned will be a newly created String containing the
* relevant characters.
*
* @param source
* the input char array.
* @param start
* start index of the subarray
* @param limit
* end index of the subarray
* @param offset16
* the UTF16 index to the codepoint in source relative to start
* @param source The input char array.
* @param start Start index of the subarray
* @param limit End index of the subarray
* @param offset16 The UTF16 index to the codepoint in source relative to start
* @return string value of char32 in UTF16 format
* @stable ICU 2.1
*/
@ -802,13 +758,10 @@ public final class UTF16 {
* Returns the UTF-16 offset that corresponds to a UTF-32 offset. Used for random access. See
* the <a name="_top_">class description</a> for notes on roundtripping.
*
* @param source
* the UTF-16 string
* @param offset32
* UTF-32 offset
* @param source The UTF-16 string
* @param offset32 UTF-32 offset
* @return UTF-16 offset
* @exception IndexOutOfBoundsException
* if offset32 is out of bounds.
* @exception IndexOutOfBoundsException If offset32 is out of bounds.
* @stable ICU 2.1
*/
public static int findOffsetFromCodePoint(String source, int offset32) {
@ -837,13 +790,10 @@ public final class UTF16 {
* Returns the UTF-16 offset that corresponds to a UTF-32 offset. Used for random access. See
* the <a name="_top_">class description</a> for notes on roundtripping.
*
* @param source
* the UTF-16 string buffer
* @param offset32
* UTF-32 offset
* @param source The UTF-16 string buffer
* @param offset32 UTF-32 offset
* @return UTF-16 offset
* @exception IndexOutOfBoundsException
* if offset32 is out of bounds.
* @exception IndexOutOfBoundsException If offset32 is out of bounds.
* @stable ICU 2.1
*/
public static int findOffsetFromCodePoint(StringBuffer source, int offset32) {
@ -872,17 +822,12 @@ public final class UTF16 {
* Returns the UTF-16 offset that corresponds to a UTF-32 offset. Used for random access. See
* the <a name="_top_">class description</a> for notes on roundtripping.
*
* @param source
* the UTF-16 char array whose substring is to be analysed
* @param start
* offset of the substring to be analysed
* @param limit
* offset of the substring to be analysed
* @param offset32
* UTF-32 offset relative to start
* @param source The UTF-16 char array whose substring is to be analysed
* @param start Offset of the substring to be analysed
* @param limit Offset of the substring to be analysed
* @param offset32 UTF-32 offset relative to start
* @return UTF-16 offset relative to start
* @exception IndexOutOfBoundsException
* if offset32 is out of bounds.
* @exception IndexOutOfBoundsException If offset32 is out of bounds.
* @stable ICU 2.1
*/
public static int findOffsetFromCodePoint(char source[], int start, int limit, int offset32) {
@ -923,13 +868,10 @@ public final class UTF16 {
* </p>
* <p>
*
* @param source
* text to analyse
* @param offset16
* UTF-16 offset < source text length.
* @param source Text to analyse
* @param offset16 UTF-16 offset < source text length.
* @return UTF-32 offset
* @exception IndexOutOfBoundsException
* if offset16 is out of bounds.
* @exception IndexOutOfBoundsException If offset16 is out of bounds.
* @stable ICU 2.1
*/
public static int findCodePointOffset(String source, int offset16) {
@ -980,13 +922,10 @@ public final class UTF16 {
* </p>
* <p>
*
* @param source
* text to analyse
* @param offset16
* UTF-16 offset < source text length.
* @param source Text to analyse
* @param offset16 UTF-16 offset < source text length.
* @return UTF-32 offset
* @exception IndexOutOfBoundsException
* if offset16 is out of bounds.
* @exception IndexOutOfBoundsException If offset16 is out of bounds.
* @stable ICU 2.1
*/
public static int findCodePointOffset(StringBuffer source, int offset16) {
@ -1037,17 +976,12 @@ public final class UTF16 {
* </p>
* <p>
*
* @param source
* text to analyse
* @param start
* offset of the substring
* @param limit
* offset of the substring
* @param offset16
* UTF-16 relative to start
* @param source Text to analyse
* @param start Offset of the substring
* @param limit Offset of the substring
* @param offset16 UTF-16 relative to start
* @return UTF-32 offset relative to start
* @exception IndexOutOfBoundsException
* if offset16 is not within the range of start and limit.
* @exception IndexOutOfBoundsException If offset16 is not within the range of start and limit.
* @stable ICU 2.1
*/
public static int findCodePointOffset(char source[], int start, int limit, int offset16) {
@ -1088,13 +1022,10 @@ public final class UTF16 {
* use <a href="../lang/UCharacter.html#isLegal(char)">isLegal()</a></code> on char32 before
* calling.
*
* @param target
* the buffer to append to
* @param char32
* value to append.
* @param target The buffer to append to
* @param char32 Value to append.
* @return the updated StringBuffer
* @exception IllegalArgumentException
* thrown when char32 does not lie within the range of the Unicode codepoints
* @exception IllegalArgumentException Thrown when char32 does not lie within the range of the Unicode codepoints
* @stable ICU 2.1
*/
public static StringBuffer append(StringBuffer target, int char32) {
@ -1117,13 +1048,10 @@ public final class UTF16 {
* Cover JDK 1.5 APIs. Append the code point to the buffer and return the buffer as a
* convenience.
*
* @param target
* the buffer to append to
* @param cp
* the code point to append
* @param target The buffer to append to
* @param cp The code point to append
* @return the updated StringBuffer
* @throws IllegalArgumentException
* if cp is not a valid code point
* @throws IllegalArgumentException If cp is not a valid code point
* @stable ICU 3.0
*/
public static StringBuffer appendCodePoint(StringBuffer target, int cp) {
@ -1133,15 +1061,11 @@ public final class UTF16 {
/**
* Adds a codepoint to offset16 position of the argument char array.
*
* @param target
* char array to be append with the new code point
* @param limit
* UTF16 offset which the codepoint will be appended.
* @param char32
* code point to be appended
* @param target Char array to be append with the new code point
* @param limit UTF16 offset which the codepoint will be appended.
* @param char32 Code point to be appended
* @return offset after char32 in the array.
* @exception IllegalArgumentException
* thrown if there is not enough space for the append, or when char32 does not
* @exception IllegalArgumentException Thrown if there is not enough space for the append, or when char32 does not
* lie within the range of the Unicode codepoints.
* @stable ICU 2.1
*/
@ -1163,8 +1087,7 @@ public final class UTF16 {
/**
* Number of codepoints in a UTF16 String
*
* @param source
* UTF16 string
* @param source UTF16 string
* @return number of codepoint in string
* @stable ICU 2.1
*/
@ -1178,8 +1101,7 @@ public final class UTF16 {
/**
* Number of codepoints in a UTF16 String buffer
*
* @param source
* UTF16 string buffer
* @param source UTF16 string buffer
* @return number of codepoint in string
* @stable ICU 2.1
*/
@ -1193,15 +1115,11 @@ public final class UTF16 {
/**
* Number of codepoints in a UTF16 char array substring
*
* @param source
* UTF16 char array
* @param start
* offset of the substring
* @param limit
* offset of the substring
* @param source UTF16 char array
* @param start Offset of the substring
* @param limit Offset of the substring
* @return number of codepoint in the substring
* @exception IndexOutOfBoundsException
* if start and limit are not valid.
* @exception IndexOutOfBoundsException If start and limit are not valid.
* @stable ICU 2.1
*/
public static int countCodePoint(char source[], int start, int limit) {
@ -1215,12 +1133,9 @@ public final class UTF16 {
* Set a code point into a UTF16 position. Adjusts target according if we are replacing a
* non-supplementary codepoint with a supplementary and vice versa.
*
* @param target
* stringbuffer
* @param offset16
* UTF16 position to insert into
* @param char32
* code point
* @param target Stringbuffer
* @param offset16 UTF16 position to insert into
* @param char32 Code point
* @stable ICU 2.1
*/
public static void setCharAt(StringBuffer target, int offset16, int char32) {
@ -1249,18 +1164,13 @@ public final class UTF16 {
* Set a code point into a UTF16 position in a char array. Adjusts target according if we are
* replacing a non-supplementary codepoint with a supplementary and vice versa.
*
* @param target
* char array
* @param limit
* numbers of valid chars in target, different from target.length. limit counts the
* @param target char array
* @param limit numbers of valid chars in target, different from target.length. limit counts the
* number of chars in target that represents a string, not the size of array target.
* @param offset16
* UTF16 position to insert into
* @param char32
* code point
* @param offset16 UTF16 position to insert into
* @param char32 code point
* @return new number of chars in target that represents a string
* @exception IndexOutOfBoundsException
* if offset16 is out of range
* @exception IndexOutOfBoundsException if offset16 is out of range
* @stable ICU 2.1
*/
public static int setCharAt(char target[], int limit, int offset16, int char32) {
@ -1320,15 +1230,11 @@ public final class UTF16 {
/**
* Shifts offset16 by the argument number of codepoints
*
* @param source
* string
* @param offset16
* UTF16 position to shift
* @param shift32
* number of codepoints to shift
* @param source string
* @param offset16 UTF16 position to shift
* @param shift32 number of codepoints to shift
* @return new shifted offset16
* @exception IndexOutOfBoundsException
* if the new offset16 is out of bounds.
* @exception IndexOutOfBoundsException if the new offset16 is out of bounds.
* @stable ICU 2.1
*/
public static int moveCodePointOffset(String source, int offset16, int shift32) {
@ -1378,15 +1284,11 @@ public final class UTF16 {
/**
* Shifts offset16 by the argument number of codepoints
*
* @param source
* string buffer
* @param offset16
* UTF16 position to shift
* @param shift32
* number of codepoints to shift
* @param source String buffer
* @param offset16 UTF16 position to shift
* @param shift32 Number of codepoints to shift
* @return new shifted offset16
* @exception IndexOutOfBoundsException
* if the new offset16 is out of bounds.
* @exception IndexOutOfBoundsException If the new offset16 is out of bounds.
* @stable ICU 2.1
*/
public static int moveCodePointOffset(StringBuffer source, int offset16, int shift32) {
@ -1436,19 +1338,13 @@ public final class UTF16 {
/**
* Shifts offset16 by the argument number of codepoints within a subarray.
*
* @param source
* char array
* @param start
* position of the subarray to be performed on
* @param limit
* position of the subarray to be performed on
* @param offset16
* UTF16 position to shift relative to start
* @param shift32
* number of codepoints to shift
* @param source Char array
* @param start Position of the subarray to be performed on
* @param limit Position of the subarray to be performed on
* @param offset16 UTF16 position to shift relative to start
* @param shift32 Number of codepoints to shift
* @return new shifted offset16 relative to start
* @exception IndexOutOfBoundsException
* if the new offset16 is out of bounds with respect to the subarray or the
* @exception IndexOutOfBoundsException If the new offset16 is out of bounds with respect to the subarray or the
* subarray bounds are out of range.
* @stable ICU 2.1
*/
@ -1517,15 +1413,11 @@ public final class UTF16 {
* The offset argument must be greater than or equal to 0, and less than or equal to the length
* of source.
*
* @param target
* string buffer to insert to
* @param offset16
* offset which char32 will be inserted in
* @param char32
* codepoint to be inserted
* @param target String buffer to insert to
* @param offset16 Offset which char32 will be inserted in
* @param char32 Codepoint to be inserted
* @return a reference to target
* @exception IndexOutOfBoundsException
* thrown if offset16 is invalid.
* @exception IndexOutOfBoundsException Thrown if offset16 is invalid.
* @stable ICU 2.1
*/
public static StringBuffer insert(StringBuffer target, int offset16, int char32) {
@ -1549,17 +1441,12 @@ public final class UTF16 {
* <p>
* The offset argument must be greater than or equal to 0, and less than or equal to the limit.
*
* @param target
* char array to insert to
* @param limit
* end index of the char array, limit <= target.length
* @param offset16
* offset which char32 will be inserted in
* @param char32
* codepoint to be inserted
* @param target Char array to insert to
* @param limit End index of the char array, limit <= target.length
* @param offset16 Offset which char32 will be inserted in
* @param char32 Codepoint to be inserted
* @return new limit size
* @exception IndexOutOfBoundsException
* thrown if offset16 is invalid.
* @exception IndexOutOfBoundsException Thrown if offset16 is invalid.
* @stable ICU 2.1
*/
public static int insert(char target[], int limit, int offset16, int char32) {
@ -1583,13 +1470,10 @@ public final class UTF16 {
* Removes the codepoint at the specified position in this target (shortening target by 1
* character if the codepoint is a non-supplementary, 2 otherwise).
*
* @param target
* string buffer to remove codepoint from
* @param offset16
* offset which the codepoint will be removed
* @param target String buffer to remove codepoint from
* @param offset16 Offset which the codepoint will be removed
* @return a reference to target
* @exception IndexOutOfBoundsException
* thrown if offset16 is invalid.
* @exception IndexOutOfBoundsException Thrown if offset16 is invalid.
* @stable ICU 2.1
*/
public static StringBuffer delete(StringBuffer target, int offset16) {
@ -1611,15 +1495,11 @@ public final class UTF16 {
* Removes the codepoint at the specified position in this target (shortening target by 1
* character if the codepoint is a non-supplementary, 2 otherwise).
*
* @param target
* string buffer to remove codepoint from
* @param limit
* end index of the char array, limit <= target.length
* @param offset16
* offset which the codepoint will be removed
* @param target String buffer to remove codepoint from
* @param limit End index of the char array, limit <= target.length
* @param offset16 Offset which the codepoint will be removed
* @return a new limit size
* @exception IndexOutOfBoundsException
* thrown if offset16 is invalid.
* @exception IndexOutOfBoundsException Thrown if offset16 is invalid.
* @stable ICU 2.1
*/
public static int delete(char target[], int limit, int offset16) {
@ -1655,10 +1535,8 @@ public final class UTF16 {
* Note this method is provided as support to jdk 1.3, which does not support supplementary
* characters to its fullest.
*
* @param source
* UTF16 format Unicode string that will be searched
* @param char32
* codepoint to search for
* @param source UTF16 format Unicode string that will be searched
* @param char32 Codepoint to search for
* @return the index of the first occurrence of the codepoint in the argument Unicode string, or
* -1 if the codepoint does not occur.
* @stable ICU 2.6
@ -1711,10 +1589,8 @@ public final class UTF16 {
* Note this method is provided as support to jdk 1.3, which does not support supplementary
* characters to its fullest.
*
* @param source
* UTF16 format Unicode string that will be searched
* @param str
* UTF16 format Unicode string to search for
* @param source UTF16 format Unicode string that will be searched
* @param str UTF16 format Unicode string to search for
* @return the index of the first occurrence of the codepoint in the argument Unicode string, or
* -1 if the codepoint does not occur.
* @stable ICU 2.6
@ -1759,12 +1635,9 @@ public final class UTF16 {
* Note this method is provided as support to jdk 1.3, which does not support supplementary
* characters to its fullest.
*
* @param source
* UTF16 format Unicode string that will be searched
* @param char32
* codepoint to search for
* @param fromIndex
* the index to start the search from.
* @param source UTF16 format Unicode string that will be searched
* @param char32 Codepoint to search for
* @param fromIndex The index to start the search from.
* @return the index of the first occurrence of the codepoint in the argument Unicode string at
* or after fromIndex, or -1 if the codepoint does not occur.
* @stable ICU 2.6
@ -1818,12 +1691,9 @@ public final class UTF16 {
* Note this method is provided as support to jdk 1.3, which does not support supplementary
* characters to its fullest.
*
* @param source
* UTF16 format Unicode string that will be searched
* @param str
* UTF16 format Unicode string to search for
* @param fromIndex
* the index to start the search from.
* @param source UTF16 format Unicode string that will be searched
* @param str UTF16 format Unicode string to search for
* @param fromIndex The index to start the search from.
* @return the index of the first occurrence of the codepoint in the argument Unicode string, or
* -1 if the codepoint does not occur.
* @stable ICU 2.6
@ -1868,10 +1738,8 @@ public final class UTF16 {
* Note this method is provided as support to jdk 1.3, which does not support supplementary
* characters to its fullest.
*
* @param source
* UTF16 format Unicode string that will be searched
* @param char32
* codepoint to search for
* @param source UTF16 format Unicode string that will be searched
* @param char32 Codepoint to search for
* @return the index of the last occurrence of the codepoint in source, or -1 if the codepoint
* does not occur.
* @stable ICU 2.6
@ -1924,10 +1792,8 @@ public final class UTF16 {
* Note this method is provided as support to jdk 1.3, which does not support supplementary
* characters to its fullest.
*
* @param source
* UTF16 format Unicode string that will be searched
* @param str
* UTF16 format Unicode string to search for
* @param source UTF16 format Unicode string that will be searched
* @param str UTF16 format Unicode string to search for
* @return the index of the last occurrence of the codepoint in source, or -1 if the codepoint
* does not occur.
* @stable ICU 2.6
@ -1978,12 +1844,9 @@ public final class UTF16 {
* Note this method is provided as support to jdk 1.3, which does not support supplementary
* characters to its fullest.
*
* @param source
* UTF16 format Unicode string that will be searched
* @param char32
* codepoint to search for
* @param fromIndex
* the index to start the search from. There is no restriction on the value of
* @param source UTF16 format Unicode string that will be searched
* @param char32 Codepoint to search for
* @param fromIndex the index to start the search from. There is no restriction on the value of
* fromIndex. If it is greater than or equal to the length of this string, it has the
* same effect as if it were equal to one less than the length of this string: this
* entire string may be searched. If it is negative, it has the same effect as if it
@ -2047,12 +1910,9 @@ public final class UTF16 {
* Note this method is provided as support to jdk 1.3, which does not support supplementary
* characters to its fullest.
*
* @param source
* UTF16 format Unicode string that will be searched
* @param str
* UTF16 format Unicode string to search for
* @param fromIndex
* the index to start the search from. There is no restriction on the value of
* @param source UTF16 format Unicode string that will be searched
* @param str UTF16 format Unicode string to search for
* @param fromIndex the index to start the search from. There is no restriction on the value of
* fromIndex. If it is greater than or equal to the length of this string, it has the
* same effect as if it were equal to one less than the length of this string: this
* entire string may be searched. If it is negative, it has the same effect as if it
@ -2105,12 +1965,9 @@ public final class UTF16 {
* Note this method is provided as support to jdk 1.3, which does not support supplementary
* characters to its fullest.
*
* @param source
* UTF16 format Unicode string which the codepoint replacements will be based on.
* @param oldChar32
* non-zero old codepoint to be replaced.
* @param newChar32
* the new codepoint to replace oldChar32
* @param source UTF16 format Unicode string which the codepoint replacements will be based on.
* @param oldChar32 Non-zero old codepoint to be replaced.
* @param newChar32 The new codepoint to replace oldChar32
* @return new String derived from source by replacing every occurrence of oldChar32 with
* newChar32, unless when no oldChar32 is found in source then source will be returned.
* @stable ICU 2.6
@ -2169,12 +2026,9 @@ public final class UTF16 {
* Note this method is provided as support to jdk 1.3, which does not support supplementary
* characters to its fullest.
*
* @param source
* UTF16 format Unicode string which the replacements will be based on.
* @param oldStr
* non-zero-length string to be replaced.
* @param newStr
* the new string to replace oldStr
* @param source UTF16 format Unicode string which the replacements will be based on.
* @param oldStr Non-zero-length string to be replaced.
* @param newStr The new string to replace oldStr
* @return new String derived from source by replacing every occurrence of oldStr with newStr.
* When no oldStr is found in source, then source will be returned.
* @stable ICU 2.6
@ -2207,8 +2061,7 @@ public final class UTF16 {
* UTF16.reverse(new StringBuffer( "Supplementary characters \ud800\udc00\ud801\udc01"))<br>
* returns "\ud801\udc01\ud800\udc00 sretcarahc yratnemelppuS".
*
* @param source
* the source StringBuffer that contains UTF16 format Unicode string to be reversed
* @param source The source StringBuffer that contains UTF16 format Unicode string to be reversed
* @return a modified source with reversed UTF16 format Unicode string.
* @stable ICU 2.6
*/
@ -2239,10 +2092,8 @@ public final class UTF16 {
* equivalent to (countCodePoint(s) > number). A Unicode code point may occupy either one or two
* code units.
*
* @param source
* The input string.
* @param number
* The number of code points in the string is compared against the 'number'
* @param source The input string.
* @param number The number of code points in the string is compared against the 'number'
* parameter.
* @return boolean value for whether the string contains more Unicode code points than 'number'.
* @stable ICU 2.4
@ -2303,18 +2154,13 @@ public final class UTF16 {
* (countCodePoint(source, start, limit) > number). A Unicode code point may occupy either one
* or two code units.
*
* @param source
* array of UTF-16 chars
* @param start
* offset to substring in the source array for analyzing
* @param limit
* offset to substring in the source array for analyzing
* @param number
* The number of code points in the string is compared against the 'number'
* @param source Array of UTF-16 chars
* @param start Offset to substring in the source array for analyzing
* @param limit Offset to substring in the source array for analyzing
* @param number The number of code points in the string is compared against the 'number'
* parameter.
* @return boolean value for whether the string contains more Unicode code points than 'number'.
* @exception IndexOutOfBoundsException
* thrown when limit &lt; start
* @exception IndexOutOfBoundsException Thrown when limit &lt; start
* @stable ICU 2.4
*/
public static boolean hasMoreCodePointsThan(char source[], int start, int limit, int number) {
@ -2375,10 +2221,8 @@ public final class UTF16 {
* points. Logically equivalent to (countCodePoint(s) > number). A Unicode code point may occupy
* either one or two code units.
*
* @param source
* The input string buffer.
* @param number
* The number of code points in the string buffer is compared against the 'number'
* @param source The input string buffer.
* @param number The number of code points in the string buffer is compared against the 'number'
* parameter.
* @return boolean value for whether the string buffer contains more Unicode code points than
* 'number'.
@ -2434,17 +2278,12 @@ public final class UTF16 {
/**
* Cover JDK 1.5 API. Create a String from an array of codePoints.
*
* @param codePoints
* the code array
* @param offset
* the start of the text in the code point array
* @param count
* the number of code points
* @param codePoints The code array
* @param offset The start of the text in the code point array
* @param count The number of code points
* @return a String representing the code points between offset and count
* @throws IllegalArgumentException
* if an invalid code point is encountered
* @throws IndexOutOfBoundsException
* if the offset or count are out of bounds.
* @throws IllegalArgumentException If an invalid code point is encountered
* @throws IndexOutOfBoundsException If the offset or count are out of bounds.
* @stable ICU 3.0
*/
public static String newString(int[] codePoints, int offset, int count) {
@ -2518,19 +2357,15 @@ public final class UTF16 {
/**
* Constructor that does comparison based on the argument options.
*
* @param codepointcompare
* flag to indicate true for code point comparison or false for code unit
* @param codepointcompare Flag to indicate true for code point comparison or false for code unit
* comparison.
* @param ignorecase
* false for case sensitive comparison, true for case-insensitive comparison
* @param foldcaseoption
* FOLD_CASE_DEFAULT or FOLD_CASE_EXCLUDE_SPECIAL_I. This option is used only
* @param ignorecase False for case sensitive comparison, true for case-insensitive comparison
* @param foldcaseoption FOLD_CASE_DEFAULT or FOLD_CASE_EXCLUDE_SPECIAL_I. This option is used only
* when ignorecase is set to true. If ignorecase is false, this option is
* ignored.
* @see #FOLD_CASE_DEFAULT
* @see #FOLD_CASE_EXCLUDE_SPECIAL_I
* @throws IllegalArgumentException
* if foldcaseoption is out of range
* @throws IllegalArgumentException If foldcaseoption is out of range
* @stable ICU 2.4
*/
public StringComparator(boolean codepointcompare, boolean ignorecase, int foldcaseoption) {
@ -2590,8 +2425,7 @@ public final class UTF16 {
* Sets the comparison mode to code point compare if flag is true. Otherwise comparison mode
* is set to code unit compare
*
* @param flag
* true for code point compare, false for code unit compare
* @param flag True for code point compare, false for code unit compare
* @stable ICU 2.4
*/
public void setCodePointCompare(boolean flag) {
@ -2606,10 +2440,8 @@ public final class UTF16 {
* Sets the Comparator to case-insensitive comparison mode if argument is true, otherwise
* case sensitive comparison mode if set to false.
*
* @param ignorecase
* true for case-insitive comparison, false for case sensitive comparison
* @param foldcaseoption
* FOLD_CASE_DEFAULT or FOLD_CASE_EXCLUDE_SPECIAL_I. This option is used only
* @param ignorecase True for case-insitive comparison, false for case sensitive comparison
* @param foldcaseoption FOLD_CASE_DEFAULT or FOLD_CASE_EXCLUDE_SPECIAL_I. This option is used only
* when ignorecase is set to true. If ignorecase is false, this option is
* ignored.
* @see #FOLD_CASE_DEFAULT
@ -2663,14 +2495,11 @@ public final class UTF16 {
/**
* Compare two strings depending on the options selected during construction.
*
* @param a
* first source string.
* @param b
* second source string.
* @param a first source string.
* @param b second source string.
* @return 0 returned if a == b. If a < b, a negative value is returned. Otherwise if a > b,
* a positive value is returned.
* @exception ClassCastException
* thrown when either a or b is not a String object
* @exception ClassCastException thrown when either a or b is not a String object
* @stable ICU 2.4
*/
public int compare(String a, String b) {

View file

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 1996-2006, International Business Machines Corporation and *
* Copyright (C) 1996-2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@ -9,8 +9,9 @@ package com.ibm.icu.text;
/**
* <code>UnicodeFilter</code> defines a protocol for selecting a
* subset of the full range (U+0000 to U+FFFF) of Unicode characters.
* Currently, filters are used in conjunction with classes like {@link
* Transliterator} to only process selected characters through a
* Currently, filters are used in conjunction with classes like
* {@link com.ibm.icu.text.Transliterator}
* to only process selected characters through a
* transformation.
* @stable ICU 2.0
*/

View file

@ -1083,8 +1083,8 @@ public class UnicodeSet extends UnicodeFilter implements Iterable<String>, Compa
/**
* Adds all characters in range (uses preferred naming convention).
* @param start
* @param end
* @param start The index of where to start on adding all characters.
* @param end The index of where to end on adding all characters.
* @return a reference to this object
* @draft ICU 4.2
* @provisional This API might change or be removed in a future release.
@ -3270,8 +3270,8 @@ public class UnicodeSet extends UnicodeFilter implements Iterable<String>, Compa
* Modifies this set to contain those code points which have the
* given value for the given property. Prior contents of this
* set are lost.
* @param propertyAlias
* @param valueAlias
* @param propertyAlias A string of the property alias.
* @param valueAlias A string of the value alias.
* @param symbols if not null, then symbols are first called to see if a property
* is available. If true, then everything else is skipped.
* @return this set
@ -4226,9 +4226,7 @@ public class UnicodeSet extends UnicodeFilter implements Iterable<String>, Compa
* Simplify the ranges in a Unicode set by merging any ranges that are only separated by characters in the dontCare set.
* For example, the ranges: \\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFB\\u3000-\\u303E change to \\u2E80-\\u303E
* if the dontCare set includes unassigned characters (for a particular version of Unicode).
* @param input Set to be modified
* @param dontCare Set with the don't-care characters for spanning
* @return
* @return the input set, modified
* @internal
*/
@ -4282,9 +4280,9 @@ public class UnicodeSet extends UnicodeFilter implements Iterable<String>, Compa
/**
* Strips code points from source. If matches is true, script all that match <i>this</i>. If matches is false, then strip all that <i>don't</i> match.
* @param source
* @param matches
* @return
* @param source The source of the CharSequence to strip from.
* @param matches A boolean to either strip all that matches or don't match with the current UnicodeSet object.
* @return The string after it has been stripped.
*/
public String stripFrom(CharSequence source, boolean matches) {
StringBuilder result = new StringBuilder();

View file

@ -87,13 +87,7 @@ public abstract class BasicTimeZone extends TimeZone {
* @param tz The instance of <code>TimeZone</code>
* @param start The start time of the evaluated time range (inclusive)
* @param end The end time of the evaluated time range (inclusive)
* @param ignoreDstAmount
* When true, any transitions with only daylight saving amount
* changes will be ignored, except either of them is zero.
* For example, a transition from rawoffset 3:00/dstsavings 1:00
* to rawoffset 2:00/dstsavings 2:00 is excluded from the comparison,
* but a transtion from rawoffset 2:00/dstsavings 1:00 to
* rawoffset 3:00/dstsavings 0:00 is included.
* @param ignoreDstAmount When true, any transitions with only daylight saving amount changes will be ignored, except either of them is zero. For example, a transition from rawoffset 3:00/dstsavings 1:00 to rawoffset 2:00/dstsavings 2:00 is excluded from the comparison, but a transtion from rawoffset 2:00/dstsavings 1:00 to rawoffset 3:00/dstsavings 0:00 is included.
*
* @return true if the other time zone has the equivalent transitions in the
* time range. When tz is not a <code>BasicTimeZone</code>, this method

View file

@ -354,10 +354,8 @@ import com.ibm.icu.text.SimpleDateFormat;
* code cannot be guaranteed well-behaved results with dates such as
* <code>Date(Long.MIN_VALUE)</code> or
* <code>Date(Long.MAX_VALUE)</code>. Instead, the
* <code>Calendar</code> constants {@link #MIN_DATE},
* {@link #MAX_DATE}, {@link #MIN_MILLIS},
* {@link #MAX_MILLIS}, {@link #MIN_JULIAN}, and
* {@link #MAX_JULIAN} should be used. <b>Motivation:</b> With
* <code>Calendar</code> protected constants should be used.
* <b>Motivation:</b> With
* the addition of the {@link #JULIAN_DAY} field, Julian day
* numbers must be restricted to a 32-bit <code>int</code>. This
* restricts the overall supported range. Furthermore, restricting
@ -373,12 +371,10 @@ import com.ibm.icu.text.SimpleDateFormat;
* {@link #YEAR_WOY} implement localized day-of-week and
* week-of-year behavior.</li>
*
* <li>Subclasses can access millisecond constants
* {@link #ONE_SECOND}, {@link #ONE_MINUTE},
* {@link #ONE_HOUR}, {@link #ONE_DAY}, and
* {@link #ONE_WEEK} defined in <code>Calendar</code>.</li>
* <li>Subclasses can access protected millisecond constants
* defined in <code>Calendar</code>.</li>
*
* <li>New API has been added to suport calendar-specific subclasses
* <li>New API has been added to support calendar-specific subclasses
* of <code>DateFormat</code>.</li>
*
* <li>Several subclasses have been implemented, representing
@ -483,9 +479,7 @@ import com.ibm.icu.text.SimpleDateFormat;
* {@link #WEEK_OF_YEAR} and {@link #YEAR_WOY} fields.</li>
*
* <li>Subclasses should implement {@link #handleGetLimit}
* to return the {@link #MINIMUM},
* {@link #GREATEST_MINIMUM}, {@link #LEAST_MAXIMUM}, or
* {@link #MAXIMUM} of a field, depending on the value of
* to return the protected values of a field, depending on the value of
* <code>limitType</code>. This method only needs to handle the
* fields {@link #ERA}, {@link #YEAR}, {@link #MONTH},
* {@link #WEEK_OF_YEAR}, {@link #WEEK_OF_MONTH},
@ -508,8 +502,7 @@ import com.ibm.icu.text.SimpleDateFormat;
* array large enough to hold the calendar's fields. This is only
* necessary if the calendar defines additional fields beyond those
* defined by <code>Calendar</code>. The length of the result must be
* at least {@link #BASE_FIELD_COUNT} and no more than
* {@link #MAX_FIELD_COUNT}.</li>
* be between the base and maximum field counts.</li>
*
* <li>Optionally, subclasses may override
* {@link #handleGetDateFormat} to create a
@ -586,11 +579,8 @@ import com.ibm.icu.text.SimpleDateFormat;
* maximum range of supportable dates as those having Julian day numbers
* of <code>-0x7F000000</code> to <code>+0x7F000000</code>. This
* corresponds to years from ~5,000,000 BCE to ~5,000,000 CE. Programmers
* should use the constants {@link #MIN_DATE} (or
* {@link #MIN_MILLIS} or {@link #MIN_JULIAN}) and
* {@link #MAX_DATE} (or {@link #MAX_MILLIS} or
* {@link #MAX_JULIAN}) in <code>Calendar</code> to specify an
* extremely early or extremely late date.</p>
* should use the protected constants in <code>Calendar</code> to
* specify an extremely early or extremely late date.</p>
*
* <p><big><b>General notes</b></big>
*
@ -1285,7 +1275,6 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
/**
* The currently set time for this calendar, expressed in milliseconds after
* January 1, 1970, 0:00:00 GMT.
* @see <tt>isTimeSet</tt>
* @serial
*/
private long time;

View file

@ -290,7 +290,7 @@ public class Currency extends MeasureUnit implements Serializable {
* Returns a currency object given an ISO 4217 3-letter code.
* @param theISOCode the iso code
* @return the currency for this iso code
* @throws NullPoninterException if <code>theISOCode</code> is null.
* @throws NullPointerException if <code>theISOCode</code> is null.
* @throws IllegalArgumentException if <code>theISOCode</code> is not a
* 3-letter alpha code.
* @stable ICU 2.2

View file

@ -113,7 +113,7 @@ public final class StringTokenizer implements Enumeration<Object>
* @param delim the delimiters.
* @param returndelims flag indicating whether to return the delimiters
* as tokens.
* @exception throws a NullPointerException if str is null
* @exception NullPointerException if str is null
* @stable ICU 2.4
*/
public StringTokenizer(String str, UnicodeSet delim, boolean returndelims)
@ -139,7 +139,7 @@ public final class StringTokenizer implements Enumeration<Object>
* @param coalescedelims flag indicating whether to return a run of
* delimiters as a single token or as one token per delimiter.
* This only takes effect if returndelims is true.
* @exception throws a NullPointerException if str is null
* @exception NullPointerException if str is null
* @internal ICU 3.4.3
* @deprecated This API is ICU internal only.
*/
@ -176,7 +176,7 @@ public final class StringTokenizer implements Enumeration<Object>
* <p>Delimiter characters themselves will not be treated as tokens.</p>
* @param str a string to be parsed.
* @param delim the delimiters.
* @exception throws a NullPointerException if str is null
* @exception NullPointerException if str is null
* @stable ICU 2.4
*/
public StringTokenizer(String str, UnicodeSet delim)
@ -196,7 +196,7 @@ public final class StringTokenizer implements Enumeration<Object>
* @param delim the delimiters.
* @param returndelims flag indicating whether to return the delimiters
* as tokens.
* @exception throws a NullPointerException if str is null
* @exception NullPointerException if str is null
* @stable ICU 2.4
*/
public StringTokenizer(String str, String delim, boolean returndelims)
@ -222,7 +222,7 @@ public final class StringTokenizer implements Enumeration<Object>
* @param coalescedelims flag indicating whether to return a run of
* delimiters as a single token or as one token per delimiter.
* This only takes effect if returndelims is true.
* @exception throws a NullPointerException if str is null
* @exception NullPointerException if str is null
* @internal ICU 3.4.3
* @deprecated This API is ICU internal only.
*/
@ -260,7 +260,7 @@ public final class StringTokenizer implements Enumeration<Object>
* <p>Delimiter characters themselves will not be treated as tokens.</p>
* @param str a string to be parsed.
* @param delim the delimiters.
* @exception throws a NullPointerException if str is null
* @exception NullPointerException if str is null
* @stable ICU 2.4
*/
public StringTokenizer(String str, String delim)
@ -277,7 +277,7 @@ public final class StringTokenizer implements Enumeration<Object>
* carriage-return character, and the form-feed character.</p>
* <p>Delimiter characters themselves will not be treated as tokens.</p>
* @param str a string to be parsed
* @exception throws a NullPointerException if str is null
* @exception NullPointerException if str is null
* @stable ICU 2.4
*/
public StringTokenizer(String str)

View file

@ -426,7 +426,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
* then this method returns a string in the format
* <code>GMT[+-]hh:mm</code>.
* @param daylight if true, return the daylight savings name.
* @param style
* @param style The style of the name to display.
* @param locale the locale in which to supply the display name.
* @return the human-readable name of this time zone in the given locale
* or in the default locale if the given locale is not recognized.

View file

@ -75,9 +75,8 @@ import com.ibm.icu.impl.locale.LanguageTag.Extension;
* <tt>getLocale()</tt>. These methods exist in several ICU classes,
* including {@link com.ibm.icu.util.Calendar}, {@link
* com.ibm.icu.util.Currency}, {@link com.ibm.icu.text.UFormat},
* {@link com.ibm.icu.text.BreakIterator}, {@link
* com.ibm.icu.text.Collator}, {@link
* com.ibm.icu.text.DateFormatSymbols}, and {@link
* {@link com.ibm.icu.text.BreakIterator}, {@link com.ibm.icu.text.Collator},
* {@link com.ibm.icu.text.DateFormatSymbols}, and {@link
* com.ibm.icu.text.DecimalFormatSymbols} and their subclasses, if
* any. Once an object of one of these classes has been created,
* <tt>getLocale()</tt> may be called on it to determine the valid and
@ -941,8 +940,7 @@ public final class ULocale implements Serializable {
* user.language property, a security exception will be thrown,
* and the default ULocale will remain unchanged.
* @param newLocale the new default locale
* @throws SecurityException
* if a security manager exists and its
* @throws SecurityException if a security manager exists and its
* <code>checkPermission</code> method doesn't allow the operation.
* @throws NullPointerException if <code>newLocale</code> is null
* @see SecurityManager#checkPermission(java.security.Permission)
@ -1081,7 +1079,7 @@ public final class ULocale implements Serializable {
/**
* Returns the country/region code for this locale, which will either be the empty string
* or an uppercase ISO 3166 2-letter code.
* @param localeID
* @param localeID The locale identification string.
* @see #getDisplayCountry()
* @see #getDisplayCountry(ULocale)
* @stable ICU 3.0

View file

@ -91,8 +91,7 @@ public abstract class UResourceBundle extends ResourceBundle{
* ICU_DATA_CLASS is used as the default root.
* @param baseName the base name of the resource bundle, a fully qualified class name
* @param localeName the locale for which a resource bundle is desired
* @exception MissingResourceException
* if no resource bundle for the specified base name can be found
* @exception MissingResourceException If no resource bundle for the specified base name can be found
* @return a resource bundle for the given base name and locale
* @stable ICU 3.0
*/
@ -106,8 +105,7 @@ public abstract class UResourceBundle extends ResourceBundle{
* @param baseName the base name of the resource bundle, a fully qualified class name
* @param localeName the locale for which a resource bundle is desired
* @param root the class object from which to load the resource bundle
* @exception MissingResourceException
* if no resource bundle for the specified base name can be found
* @exception MissingResourceException If no resource bundle for the specified base name can be found
* @return a resource bundle for the given base name and locale
* @stable ICU 3.0
*/
@ -503,8 +501,7 @@ public abstract class UResourceBundle extends ResourceBundle{
* @param localeName the locale for which a resource bundle is desired
* @param root the class object from which to load the resource bundle
* @param disableFallback disables loading of fallback lookup chain
* @exception MissingResourceException
* if no resource bundle for the specified base name can be found
* @exception MissingResourceException If no resource bundle for the specified base name can be found
* @return a resource bundle for the given base name and locale
* @stable ICU 3.0
*/
@ -551,8 +548,8 @@ public abstract class UResourceBundle extends ResourceBundle{
* @return a pointer to a chunk of unsigned bytes which live in a memory mapped/DLL file.
* @see #getIntVector
* @see #getInt
* @throws MissingResourceException
* @throws UResourceTypeMismatchException
* @throws MissingResourceException If no resource bundle can be found.
* @throws UResourceTypeMismatchException If the resource has a type mismatch.
* @stable ICU 3.8
*/
public ByteBuffer getBinary() {
@ -566,8 +563,8 @@ public abstract class UResourceBundle extends ResourceBundle{
* @see #getBinary()
* @see #getIntVector
* @see #getInt
* @throws MissingResourceException
* @throws UResourceTypeMismatchException
* @throws MissingResourceException If resource bundle is missing.
* @throws UResourceTypeMismatchException If resource bundle has a type mismatch.
* @stable ICU 3.8
*/
public String getString() {
@ -580,8 +577,8 @@ public abstract class UResourceBundle extends ResourceBundle{
* @return a string
* @see #getString()
* @see #getIntVector
* @throws MissingResourceException
* @throws UResourceTypeMismatchException
* @throws MissingResourceException If resource bundle is missing.
* @throws UResourceTypeMismatchException If resource bundle has a type mismatch.
* @stable ICU 3.8
*/
public String[] getStringArray() {
@ -596,8 +593,8 @@ public abstract class UResourceBundle extends ResourceBundle{
* @return an array of bytes containing the binary data from the resource.
* @see #getIntVector
* @see #getInt
* @throws MissingResourceException
* @throws UResourceTypeMismatchException
* @throws MissingResourceException If resource bundle is missing.
* @throws UResourceTypeMismatchException If resource bundle has a type mismatch.
* @stable ICU 3.8
*/
public byte[] getBinary(byte[] ba) {
@ -610,8 +607,8 @@ public abstract class UResourceBundle extends ResourceBundle{
* @return a pointer to a chunk of unsigned bytes which live in a memory mapped/DLL file.
* @see #getBinary()
* @see #getInt
* @throws MissingResourceException
* @throws UResourceTypeMismatchException
* @throws MissingResourceException If resource bundle is missing.
* @throws UResourceTypeMismatchException If resource bundle has a type mismatch.
* @stable ICU 3.8
*/
public int[] getIntVector() {
@ -624,8 +621,8 @@ public abstract class UResourceBundle extends ResourceBundle{
* @return an integer value
* @see #getIntVector
* @see #getBinary()
* @throws MissingResourceException
* @throws UResourceTypeMismatchException
* @throws MissingResourceException If resource bundle is missing.
* @throws UResourceTypeMismatchException If resource bundle type mismatch.
* @stable ICU 3.8
*/
public int getInt() {
@ -639,8 +636,8 @@ public abstract class UResourceBundle extends ResourceBundle{
* @return an integer value
* @see #getIntVector
* @see #getBinary()
* @throws MissingResourceException
* @throws UResourceTypeMismatchException
* @throws MissingResourceException If resource bundle is missing.
* @throws UResourceTypeMismatchException If resource bundle type mismatch.
* @stable ICU 3.8
*/
public int getUInt() {
@ -652,7 +649,7 @@ public abstract class UResourceBundle extends ResourceBundle{
*
* @param aKey a key associated with the wanted resource
* @return a resource bundle object representing the resource
* @throws MissingResourceException
* @throws MissingResourceException If resource bundle is missing.
* @stable ICU 3.8
*/
public UResourceBundle get(String aKey) {
@ -679,8 +676,8 @@ public abstract class UResourceBundle extends ResourceBundle{
*
* @param index an index to the wanted string.
* @return a string which lives in the resource.
* @throws IndexOutOfBoundsException
* @throws UResourceTypeMismatchException
* @throws IndexOutOfBoundsException If the index value is out of bounds of accepted values.
* @throws UResourceTypeMismatchException If resource bundle type mismatch.
* @stable ICU 3.8
*/
public String getString(int index) {
@ -696,8 +693,8 @@ public abstract class UResourceBundle extends ResourceBundle{
*
* @param index an index to the wanted resource.
* @return the sub resource UResourceBundle object
* @throws IndexOutOfBoundsException
* @throws MissingResourceException
* @throws IndexOutOfBoundsException If the index value is out of bounds of accepted values.
* @throws MissingResourceException If the resource bundle is missing.
* @stable ICU 3.8
*/
public UResourceBundle get(int index) {

View file

@ -1,6 +1,6 @@
/*
******************************************************************************
* Copyright (C) 2004-2008, International Business Machines Corporation and *
* Copyright (C) 2004-2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
******************************************************************************
*/
@ -52,7 +52,7 @@ public class UResourceBundleIterator{
/**
* Returns the next element of this iterator if this iterator object has at least one more element to provide
* @return the UResourceBundle object
* @throws NoSuchElementException
* @throws NoSuchElementException If there does not exist such an element.
* @stable ICU 3.8
*/
public UResourceBundle next()throws NoSuchElementException{
@ -64,8 +64,8 @@ public class UResourceBundleIterator{
/**
* Returns the next String of this iterator if this iterator object has at least one more element to provide
* @return the UResourceBundle object
* @throws NoSuchElementException
* @throws UResourceTypeMismatchException
* @throws NoSuchElementException If there does not exist such an element.
* @throws UResourceTypeMismatchException If resource has a type mismatch.
* @stable ICU 3.8
*/
public String nextString()throws NoSuchElementException, UResourceTypeMismatchException{

View file

@ -190,7 +190,7 @@ public class VTimeZone extends BasicTimeZone {
* Writes RFC2445 VTIMEZONE data for this time zone
*
* @param writer A <code>Writer</code> used for the output
* @throws IOException
* @throws IOException If there were problems creating a buffered writer or writing to it.
*
* @stable ICU 3.8
*/
@ -235,7 +235,7 @@ public class VTimeZone extends BasicTimeZone {
* @param writer The <code>Writer</code> used for the output
* @param start The start time
*
* @throws IOException
* @throws IOException If there were problems reading and writing to the writer.
*
* @stable ICU 3.8
*/
@ -269,7 +269,7 @@ public class VTimeZone extends BasicTimeZone {
* @param writer The <code>Writer</code> used for the output
* @param time The date
*
* @throws IOException
* @throws IOException If there were problems reading or writing to the writer.
*
* @stable ICU 3.8
*/

View file

@ -170,7 +170,7 @@ public final class VersionInfo implements Comparable<VersionInfo>
* not specified they are taken as 0s. E.g. Version "3.1" is
* equivalent to "3.1.0.0".
* @return an instance of VersionInfo with the argument version.
* @exception throws an IllegalArgumentException when the argument version
* @exception IllegalArgumentException when the argument version
* is not in the right format
* @stable ICU 2.6
*/
@ -215,8 +215,7 @@ public final class VersionInfo implements Comparable<VersionInfo>
* @param minor minor version, non-negative number <= 255.
* @param milli milli version, non-negative number <= 255.
* @param micro micro version, non-negative number <= 255.
* @exception throws an IllegalArgumentException when either arguments are
* negative or > 255
* @exception IllegalArgumentException when either arguments are negative or > 255
* @stable ICU 2.6
*/
public static VersionInfo getInstance(int major, int minor, int milli,
@ -244,7 +243,7 @@ public final class VersionInfo implements Comparable<VersionInfo>
* @param major major version, non-negative number <= 255.
* @param minor minor version, non-negative number <= 255.
* @param milli milli version, non-negative number <= 255.
* @exception throws an IllegalArgumentException when either arguments are
* @exception IllegalArgumentException when either arguments are
* negative or > 255
* @stable ICU 2.6
*/
@ -258,7 +257,7 @@ public final class VersionInfo implements Comparable<VersionInfo>
* Equivalent to getInstance(major, minor, 0, 0).
* @param major major version, non-negative number <= 255.
* @param minor minor version, non-negative number <= 255.
* @exception throws an IllegalArgumentException when either arguments are
* @exception IllegalArgumentException when either arguments are
* negative or > 255
* @stable ICU 2.6
*/
@ -271,7 +270,7 @@ public final class VersionInfo implements Comparable<VersionInfo>
* Returns an instance of VersionInfo with the argument version.
* Equivalent to getInstance(major, 0, 0, 0).
* @param major major version, non-negative number <= 255.
* @exception throws an IllegalArgumentException when either arguments are
* @exception IllegalArgumentException when either arguments are
* negative or > 255
* @stable ICU 2.6
*/

View file

@ -552,7 +552,6 @@ public class BagFormatter {
doAt(c);
}
@SuppressWarnings("unused")
public String format(Object o) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);

View file

@ -568,7 +568,6 @@ abstract public class Pick {
}
}
@SuppressWarnings("unused")
private abstract static class ListPick extends Pick {
protected Pick[] items = new Pick[0];