mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8230648: Replace @exception tag with @throws in java.base
Minor coding style update of javadoc tag in any file in java.base Reviewed-by: prappo, lancea
This commit is contained in:
parent
2fc6c6459d
commit
b15b322cf3
196 changed files with 1959 additions and 1962 deletions
|
@ -117,7 +117,7 @@ public class AttributedString {
|
|||
/**
|
||||
* Constructs an AttributedString instance with the given text.
|
||||
* @param text The text for this attributed string.
|
||||
* @exception NullPointerException if <code>text</code> is null.
|
||||
* @throws NullPointerException if <code>text</code> is null.
|
||||
*/
|
||||
public AttributedString(String text) {
|
||||
if (text == null) {
|
||||
|
@ -130,9 +130,9 @@ public class AttributedString {
|
|||
* Constructs an AttributedString instance with the given text and attributes.
|
||||
* @param text The text for this attributed string.
|
||||
* @param attributes The attributes that apply to the entire string.
|
||||
* @exception NullPointerException if <code>text</code> or
|
||||
* @throws NullPointerException if <code>text</code> or
|
||||
* <code>attributes</code> is null.
|
||||
* @exception IllegalArgumentException if the text has length 0
|
||||
* @throws IllegalArgumentException if the text has length 0
|
||||
* and the attributes parameter is not an empty Map (attributes
|
||||
* cannot be applied to a 0-length range).
|
||||
*/
|
||||
|
@ -171,7 +171,7 @@ public class AttributedString {
|
|||
* Constructs an AttributedString instance with the given attributed
|
||||
* text represented by AttributedCharacterIterator.
|
||||
* @param text The text for this attributed string.
|
||||
* @exception NullPointerException if <code>text</code> is null.
|
||||
* @throws NullPointerException if <code>text</code> is null.
|
||||
*/
|
||||
public AttributedString(AttributedCharacterIterator text) {
|
||||
// If performance is critical, this constructor should be
|
||||
|
@ -192,8 +192,8 @@ public class AttributedString {
|
|||
* @param beginIndex Index of the first character of the range.
|
||||
* @param endIndex Index of the character following the last character
|
||||
* of the range.
|
||||
* @exception NullPointerException if <code>text</code> is null.
|
||||
* @exception IllegalArgumentException if the subrange given by
|
||||
* @throws NullPointerException if <code>text</code> is null.
|
||||
* @throws IllegalArgumentException if the subrange given by
|
||||
* beginIndex and endIndex is out of the text range.
|
||||
* @see java.text.Annotation
|
||||
*/
|
||||
|
@ -220,8 +220,8 @@ public class AttributedString {
|
|||
* @param attributes Specifies attributes to be extracted
|
||||
* from the text. If null is specified, all available attributes will
|
||||
* be used.
|
||||
* @exception NullPointerException if <code>text</code> is null.
|
||||
* @exception IllegalArgumentException if the subrange given by
|
||||
* @throws NullPointerException if <code>text</code> is null.
|
||||
* @throws IllegalArgumentException if the subrange given by
|
||||
* beginIndex and endIndex is out of the text range.
|
||||
* @see java.text.Annotation
|
||||
*/
|
||||
|
@ -307,8 +307,8 @@ public class AttributedString {
|
|||
* Adds an attribute to the entire string.
|
||||
* @param attribute the attribute key
|
||||
* @param value the value of the attribute; may be null
|
||||
* @exception NullPointerException if <code>attribute</code> is null.
|
||||
* @exception IllegalArgumentException if the AttributedString has length 0
|
||||
* @throws NullPointerException if <code>attribute</code> is null.
|
||||
* @throws IllegalArgumentException if the AttributedString has length 0
|
||||
* (attributes cannot be applied to a 0-length range).
|
||||
*/
|
||||
public void addAttribute(Attribute attribute, Object value) {
|
||||
|
@ -331,8 +331,8 @@ public class AttributedString {
|
|||
* @param value The value of the attribute. May be null.
|
||||
* @param beginIndex Index of the first character of the range.
|
||||
* @param endIndex Index of the character following the last character of the range.
|
||||
* @exception NullPointerException if <code>attribute</code> is null.
|
||||
* @exception IllegalArgumentException if beginIndex is less than 0, endIndex is
|
||||
* @throws NullPointerException if <code>attribute</code> is null.
|
||||
* @throws IllegalArgumentException if beginIndex is less than 0, endIndex is
|
||||
* greater than the length of the string, or beginIndex and endIndex together don't
|
||||
* define a non-empty subrange of the string.
|
||||
*/
|
||||
|
@ -356,8 +356,8 @@ public class AttributedString {
|
|||
* @param beginIndex Index of the first character of the range.
|
||||
* @param endIndex Index of the character following the last
|
||||
* character of the range.
|
||||
* @exception NullPointerException if <code>attributes</code> is null.
|
||||
* @exception IllegalArgumentException if beginIndex is less than
|
||||
* @throws NullPointerException if <code>attributes</code> is null.
|
||||
* @throws IllegalArgumentException if beginIndex is less than
|
||||
* 0, endIndex is greater than the length of the string, or
|
||||
* beginIndex and endIndex together don't define a non-empty
|
||||
* subrange of the string and the attributes parameter is not an
|
||||
|
@ -580,7 +580,7 @@ public class AttributedString {
|
|||
* @param beginIndex the index of the first character
|
||||
* @param endIndex the index of the character following the last character
|
||||
* @return an iterator providing access to the text and its attributes
|
||||
* @exception IllegalArgumentException if beginIndex is less than 0,
|
||||
* @throws IllegalArgumentException if beginIndex is less than 0,
|
||||
* endIndex is greater than the length of the string, or beginIndex is
|
||||
* greater than endIndex.
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -327,7 +327,7 @@ public abstract class BreakIterator implements Cloneable
|
|||
* @return The first boundary after the specified offset or
|
||||
* <code>BreakIterator.DONE</code> if the last text boundary is passed in
|
||||
* as the offset.
|
||||
* @exception IllegalArgumentException if the specified offset is less than
|
||||
* @throws IllegalArgumentException if the specified offset is less than
|
||||
* the first text boundary or greater than the last text boundary.
|
||||
*/
|
||||
public abstract int following(int offset);
|
||||
|
@ -343,7 +343,7 @@ public abstract class BreakIterator implements Cloneable
|
|||
* @return The last boundary before the specified offset or
|
||||
* <code>BreakIterator.DONE</code> if the first text boundary is passed in
|
||||
* as the offset.
|
||||
* @exception IllegalArgumentException if the specified offset is less than
|
||||
* @throws IllegalArgumentException if the specified offset is less than
|
||||
* the first text boundary or greater than the last text boundary.
|
||||
* @since 1.2
|
||||
*/
|
||||
|
@ -363,7 +363,7 @@ public abstract class BreakIterator implements Cloneable
|
|||
* @param offset the character offset to check.
|
||||
* @return <code>true</code> if "offset" is a boundary position,
|
||||
* <code>false</code> otherwise.
|
||||
* @exception IllegalArgumentException if the specified offset is less than
|
||||
* @throws IllegalArgumentException if the specified offset is less than
|
||||
* the first text boundary or greater than the last text boundary.
|
||||
* @since 1.2
|
||||
*/
|
||||
|
@ -453,7 +453,7 @@ public abstract class BreakIterator implements Cloneable
|
|||
* for the given locale.
|
||||
* @param locale the desired locale
|
||||
* @return A break iterator for word breaks
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
*/
|
||||
public static BreakIterator getWordInstance(Locale locale)
|
||||
{
|
||||
|
@ -477,7 +477,7 @@ public abstract class BreakIterator implements Cloneable
|
|||
* for the given locale.
|
||||
* @param locale the desired locale
|
||||
* @return A break iterator for line breaks
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
*/
|
||||
public static BreakIterator getLineInstance(Locale locale)
|
||||
{
|
||||
|
@ -501,7 +501,7 @@ public abstract class BreakIterator implements Cloneable
|
|||
* for the given locale.
|
||||
* @param locale the desired locale
|
||||
* @return A break iterator for character breaks
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
*/
|
||||
public static BreakIterator getCharacterInstance(Locale locale)
|
||||
{
|
||||
|
@ -525,7 +525,7 @@ public abstract class BreakIterator implements Cloneable
|
|||
* for the given locale.
|
||||
* @param locale the desired locale
|
||||
* @return A break iterator for sentence breaks
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
*/
|
||||
public static BreakIterator getSentenceInstance(Locale locale)
|
||||
{
|
||||
|
|
|
@ -174,7 +174,7 @@ public class ChoiceFormat extends NumberFormat {
|
|||
/**
|
||||
* Sets the pattern.
|
||||
* @param newPattern See the class description.
|
||||
* @exception NullPointerException if {@code newPattern}
|
||||
* @throws NullPointerException if {@code newPattern}
|
||||
* is {@code null}
|
||||
*/
|
||||
public void applyPattern(String newPattern) {
|
||||
|
@ -313,7 +313,7 @@ public class ChoiceFormat extends NumberFormat {
|
|||
* Constructs with limits and corresponding formats based on the pattern.
|
||||
*
|
||||
* @param newPattern the new pattern string
|
||||
* @exception NullPointerException if {@code newPattern} is
|
||||
* @throws NullPointerException if {@code newPattern} is
|
||||
* {@code null}
|
||||
* @see #applyPattern
|
||||
*/
|
||||
|
@ -326,7 +326,7 @@ public class ChoiceFormat extends NumberFormat {
|
|||
*
|
||||
* @param limits limits in ascending order
|
||||
* @param formats corresponding format strings
|
||||
* @exception NullPointerException if {@code limits} or {@code formats}
|
||||
* @throws NullPointerException if {@code limits} or {@code formats}
|
||||
* is {@code null}
|
||||
* @see #setChoices
|
||||
*/
|
||||
|
@ -347,7 +347,7 @@ public class ChoiceFormat extends NumberFormat {
|
|||
* When formatting with object Y,
|
||||
* if the object is a NumberFormat, then ((NumberFormat) Y).format(X)
|
||||
* is called. Otherwise Y.toString() is called.
|
||||
* @exception NullPointerException if {@code limits} or
|
||||
* @throws NullPointerException if {@code limits} or
|
||||
* {@code formats} is {@code null}
|
||||
*/
|
||||
public void setChoices(double[] limits, String formats[]) {
|
||||
|
@ -396,7 +396,7 @@ public class ChoiceFormat extends NumberFormat {
|
|||
* @param number number to be formatted and substituted.
|
||||
* @param toAppendTo where text is appended.
|
||||
* @param status ignore no useful status is returned.
|
||||
* @exception NullPointerException if {@code toAppendTo}
|
||||
* @throws NullPointerException if {@code toAppendTo}
|
||||
* is {@code null}
|
||||
*/
|
||||
public StringBuffer format(double number, StringBuffer toAppendTo,
|
||||
|
@ -426,7 +426,7 @@ public class ChoiceFormat extends NumberFormat {
|
|||
* status.index is unchanged and status.errorIndex is set to the
|
||||
* first index of the character that caused the parse to fail.
|
||||
* @return A Number representing the value of the number parsed.
|
||||
* @exception NullPointerException if {@code status} is {@code null}
|
||||
* @throws NullPointerException if {@code status} is {@code null}
|
||||
* or if {@code text} is {@code null} and the list of
|
||||
* choice strings is not empty.
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -136,7 +136,7 @@ public abstract class CollationKey implements Comparable<CollationKey> {
|
|||
* CollationKey constructor.
|
||||
*
|
||||
* @param source the source string
|
||||
* @exception NullPointerException if {@code source} is null
|
||||
* @throws NullPointerException if {@code source} is null
|
||||
* @since 1.6
|
||||
*/
|
||||
protected CollationKey(String source) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -296,7 +296,7 @@ public abstract class Collator
|
|||
* @return a negative integer, zero, or a positive integer as the
|
||||
* first argument is less than, equal to, or greater than the
|
||||
* second.
|
||||
* @exception ClassCastException the arguments cannot be cast to Strings.
|
||||
* @throws ClassCastException the arguments cannot be cast to Strings.
|
||||
* @see java.util.Comparator
|
||||
* @since 1.2
|
||||
*/
|
||||
|
@ -358,7 +358,7 @@ public abstract class Collator
|
|||
* @see java.text.Collator#SECONDARY
|
||||
* @see java.text.Collator#TERTIARY
|
||||
* @see java.text.Collator#IDENTICAL
|
||||
* @exception IllegalArgumentException If the new strength value is not one of
|
||||
* @throws IllegalArgumentException If the new strength value is not one of
|
||||
* PRIMARY, SECONDARY, TERTIARY or IDENTICAL.
|
||||
*/
|
||||
public synchronized void setStrength(int newStrength) {
|
||||
|
@ -402,7 +402,7 @@ public abstract class Collator
|
|||
* @see java.text.Collator#NO_DECOMPOSITION
|
||||
* @see java.text.Collator#CANONICAL_DECOMPOSITION
|
||||
* @see java.text.Collator#FULL_DECOMPOSITION
|
||||
* @exception IllegalArgumentException If the given value is not a valid decomposition
|
||||
* @throws IllegalArgumentException If the given value is not a valid decomposition
|
||||
* mode.
|
||||
*/
|
||||
public synchronized void setDecomposition(int decompositionMode) {
|
||||
|
|
|
@ -1342,7 +1342,7 @@ public final class CompactNumberFormat extends NumberFormat {
|
|||
* @param pos a {@code ParsePosition} object with index and error
|
||||
* index information as described above
|
||||
* @return the parsed value, or {@code null} if the parse fails
|
||||
* @exception NullPointerException if {@code text} or
|
||||
* @throws NullPointerException if {@code text} or
|
||||
* {@code pos} is null
|
||||
*
|
||||
*/
|
||||
|
@ -2143,4 +2143,3 @@ public final class CompactNumberFormat extends NumberFormat {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -323,7 +323,7 @@ public abstract class DateFormat extends Format {
|
|||
* first occurrence of the timezone pattern character {@code 'z'}.
|
||||
* @return the string buffer passed in as {@code toAppendTo},
|
||||
* with formatted text appended.
|
||||
* @exception IllegalArgumentException if the {@code Format} cannot format
|
||||
* @throws IllegalArgumentException if the {@code Format} cannot format
|
||||
* the given {@code obj}.
|
||||
* @see java.text.Format
|
||||
*/
|
||||
|
@ -385,7 +385,7 @@ public abstract class DateFormat extends Format {
|
|||
*
|
||||
* @param source A <code>String</code> whose beginning should be parsed.
|
||||
* @return A <code>Date</code> parsed from the string.
|
||||
* @exception ParseException if the beginning of the specified string
|
||||
* @throws ParseException if the beginning of the specified string
|
||||
* cannot be parsed.
|
||||
*/
|
||||
public Date parse(String source) throws ParseException
|
||||
|
|
|
@ -122,7 +122,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
|
|||
* @see #getInstance()
|
||||
* @see java.util.Locale#getDefault(java.util.Locale.Category)
|
||||
* @see java.util.Locale.Category#FORMAT
|
||||
* @exception java.util.MissingResourceException
|
||||
* @throws java.util.MissingResourceException
|
||||
* if the resources for the default locale cannot be
|
||||
* found or cannot be loaded.
|
||||
*/
|
||||
|
@ -142,7 +142,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
|
|||
*
|
||||
* @param locale the desired locale
|
||||
* @see #getInstance(Locale)
|
||||
* @exception java.util.MissingResourceException
|
||||
* @throws java.util.MissingResourceException
|
||||
* if the resources for the specified locale cannot be
|
||||
* found or cannot be loaded.
|
||||
*/
|
||||
|
@ -340,7 +340,7 @@ public class DateFormatSymbols implements Serializable, Cloneable {
|
|||
* implementations.
|
||||
* @param locale the given locale.
|
||||
* @return a <code>DateFormatSymbols</code> instance.
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
* @since 1.6
|
||||
*/
|
||||
public static final DateFormatSymbols getInstance(Locale locale) {
|
||||
|
@ -596,9 +596,9 @@ public class DateFormatSymbols implements Serializable, Cloneable {
|
|||
* All other entries are localized names.
|
||||
*
|
||||
* @param newZoneStrings the new time zone strings.
|
||||
* @exception IllegalArgumentException if the length of any row in
|
||||
* @throws IllegalArgumentException if the length of any row in
|
||||
* <code>newZoneStrings</code> is less than 5
|
||||
* @exception NullPointerException if <code>newZoneStrings</code> is null
|
||||
* @throws NullPointerException if <code>newZoneStrings</code> is null
|
||||
* @see #getZoneStrings()
|
||||
*/
|
||||
public void setZoneStrings(String[][] newZoneStrings) {
|
||||
|
|
|
@ -425,8 +425,8 @@ public class DecimalFormat extends NumberFormat {
|
|||
* locale.
|
||||
*
|
||||
* @param pattern a non-localized pattern string.
|
||||
* @exception NullPointerException if {@code pattern} is null
|
||||
* @exception IllegalArgumentException if the given pattern is invalid.
|
||||
* @throws NullPointerException if {@code pattern} is null
|
||||
* @throws IllegalArgumentException if the given pattern is invalid.
|
||||
* @see java.text.NumberFormat#getInstance
|
||||
* @see java.text.NumberFormat#getNumberInstance
|
||||
* @see java.text.NumberFormat#getCurrencyInstance
|
||||
|
@ -452,8 +452,8 @@ public class DecimalFormat extends NumberFormat {
|
|||
*
|
||||
* @param pattern a non-localized pattern string
|
||||
* @param symbols the set of symbols to be used
|
||||
* @exception NullPointerException if any of the given arguments is null
|
||||
* @exception IllegalArgumentException if the given pattern is invalid
|
||||
* @throws NullPointerException if any of the given arguments is null
|
||||
* @throws IllegalArgumentException if the given pattern is invalid
|
||||
* @see java.text.NumberFormat#getInstance
|
||||
* @see java.text.NumberFormat#getNumberInstance
|
||||
* @see java.text.NumberFormat#getCurrencyInstance
|
||||
|
@ -486,11 +486,11 @@ public class DecimalFormat extends NumberFormat {
|
|||
* to 0 and 9, respectively for the output string
|
||||
* {@code 1,234,567.89}.
|
||||
* @return the value passed in as {@code toAppendTo}
|
||||
* @exception IllegalArgumentException if {@code number} is
|
||||
* @throws IllegalArgumentException if {@code number} is
|
||||
* null or not an instance of {@code Number}.
|
||||
* @exception NullPointerException if {@code toAppendTo} or
|
||||
* @throws NullPointerException if {@code toAppendTo} or
|
||||
* {@code pos} is null
|
||||
* @exception ArithmeticException if rounding is needed with rounding
|
||||
* @throws ArithmeticException if rounding is needed with rounding
|
||||
* mode being set to RoundingMode.UNNECESSARY
|
||||
* @see java.text.FieldPosition
|
||||
*/
|
||||
|
@ -528,9 +528,9 @@ public class DecimalFormat extends NumberFormat {
|
|||
* and end index of {@code fieldPosition} will be set
|
||||
* to 0 and 9, respectively for the output string
|
||||
* {@code 1,234,567.89}.
|
||||
* @exception NullPointerException if {@code result} or
|
||||
* @throws NullPointerException if {@code result} or
|
||||
* {@code fieldPosition} is {@code null}
|
||||
* @exception ArithmeticException if rounding is needed with rounding
|
||||
* @throws ArithmeticException if rounding is needed with rounding
|
||||
* mode being set to RoundingMode.UNNECESSARY
|
||||
* @return The formatted number string
|
||||
* @see java.text.FieldPosition
|
||||
|
@ -565,7 +565,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* @param number The double to format
|
||||
* @param result where the text is to be appended
|
||||
* @param delegate notified of locations of sub fields
|
||||
* @exception ArithmeticException if rounding is needed with rounding
|
||||
* @throws ArithmeticException if rounding is needed with rounding
|
||||
* mode being set to RoundingMode.UNNECESSARY
|
||||
* @return The formatted number string
|
||||
*/
|
||||
|
@ -698,9 +698,9 @@ public class DecimalFormat extends NumberFormat {
|
|||
* and end index of {@code fieldPosition} will be set
|
||||
* to 0 and 11, respectively for the output string
|
||||
* {@code 123,456,789}.
|
||||
* @exception NullPointerException if {@code result} or
|
||||
* @throws NullPointerException if {@code result} or
|
||||
* {@code fieldPosition} is {@code null}
|
||||
* @exception ArithmeticException if rounding is needed with rounding
|
||||
* @throws ArithmeticException if rounding is needed with rounding
|
||||
* mode being set to RoundingMode.UNNECESSARY
|
||||
* @return The formatted number string
|
||||
* @see java.text.FieldPosition
|
||||
|
@ -720,7 +720,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* @param result where the text is to be appended
|
||||
* @param delegate notified of locations of sub fields
|
||||
* @return The formatted number string
|
||||
* @exception ArithmeticException if rounding is needed with rounding
|
||||
* @throws ArithmeticException if rounding is needed with rounding
|
||||
* mode being set to RoundingMode.UNNECESSARY
|
||||
* @see java.text.FieldPosition
|
||||
*/
|
||||
|
@ -795,7 +795,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* to 0 and 9, respectively for the output string
|
||||
* {@code 1,234,567.89}.
|
||||
* @return The formatted number string
|
||||
* @exception ArithmeticException if rounding is needed with rounding
|
||||
* @throws ArithmeticException if rounding is needed with rounding
|
||||
* mode being set to RoundingMode.UNNECESSARY
|
||||
* @see java.text.FieldPosition
|
||||
*/
|
||||
|
@ -811,7 +811,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* @param number The BigDecimal to format
|
||||
* @param result where the text is to be appended
|
||||
* @param delegate notified of locations of sub fields
|
||||
* @exception ArithmeticException if rounding is needed with rounding
|
||||
* @throws ArithmeticException if rounding is needed with rounding
|
||||
* mode being set to RoundingMode.UNNECESSARY
|
||||
* @return The formatted number string
|
||||
*/
|
||||
|
@ -854,7 +854,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* to 0 and 11, respectively for the output string
|
||||
* {@code 123,456,789}.
|
||||
* @return The formatted number string
|
||||
* @exception ArithmeticException if rounding is needed with rounding
|
||||
* @throws ArithmeticException if rounding is needed with rounding
|
||||
* mode being set to RoundingMode.UNNECESSARY
|
||||
* @see java.text.FieldPosition
|
||||
*/
|
||||
|
@ -872,7 +872,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* @param result where the text is to be appended
|
||||
* @param delegate notified of locations of sub fields
|
||||
* @return The formatted number string
|
||||
* @exception ArithmeticException if rounding is needed with rounding
|
||||
* @throws ArithmeticException if rounding is needed with rounding
|
||||
* mode being set to RoundingMode.UNNECESSARY
|
||||
* @see java.text.FieldPosition
|
||||
*/
|
||||
|
@ -923,10 +923,10 @@ public class DecimalFormat extends NumberFormat {
|
|||
* {@code NumberFormat.Field}, with the attribute value being the
|
||||
* same as the attribute key.
|
||||
*
|
||||
* @exception NullPointerException if obj is null.
|
||||
* @exception IllegalArgumentException when the Format cannot format the
|
||||
* @throws NullPointerException if obj is null.
|
||||
* @throws IllegalArgumentException when the Format cannot format the
|
||||
* given object.
|
||||
* @exception ArithmeticException if rounding is needed with rounding
|
||||
* @throws ArithmeticException if rounding is needed with rounding
|
||||
* mode being set to RoundingMode.UNNECESSARY
|
||||
* @param obj The object to format
|
||||
* @return AttributedCharacterIterator describing the formatted value.
|
||||
|
@ -2130,7 +2130,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* @param pos A {@code ParsePosition} object with index and error
|
||||
* index information as described above.
|
||||
* @return the parsed value, or {@code null} if the parse fails
|
||||
* @exception NullPointerException if {@code text} or
|
||||
* @throws NullPointerException if {@code text} or
|
||||
* {@code pos} is null.
|
||||
*/
|
||||
@Override
|
||||
|
@ -3254,8 +3254,8 @@ public class DecimalFormat extends NumberFormat {
|
|||
* these are presumed to be set in the positive pattern.
|
||||
*
|
||||
* @param pattern a new pattern
|
||||
* @exception NullPointerException if {@code pattern} is null
|
||||
* @exception IllegalArgumentException if the given pattern is invalid.
|
||||
* @throws NullPointerException if {@code pattern} is null
|
||||
* @throws IllegalArgumentException if the given pattern is invalid.
|
||||
*/
|
||||
public void applyPattern(String pattern) {
|
||||
applyPattern(pattern, false);
|
||||
|
@ -3281,8 +3281,8 @@ public class DecimalFormat extends NumberFormat {
|
|||
* these are presumed to be set in the positive pattern.
|
||||
*
|
||||
* @param pattern a new pattern
|
||||
* @exception NullPointerException if {@code pattern} is null
|
||||
* @exception IllegalArgumentException if the given pattern is invalid.
|
||||
* @throws NullPointerException if {@code pattern} is null
|
||||
* @throws IllegalArgumentException if the given pattern is invalid.
|
||||
*/
|
||||
public void applyLocalizedPattern(String pattern) {
|
||||
applyPattern(pattern, true);
|
||||
|
@ -3782,7 +3782,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
* on this number format's symbols.
|
||||
*
|
||||
* @param currency the new currency to be used by this decimal format
|
||||
* @exception NullPointerException if {@code currency} is null
|
||||
* @throws NullPointerException if {@code currency} is null
|
||||
* @since 1.4
|
||||
*/
|
||||
@Override
|
||||
|
@ -3813,7 +3813,7 @@ public class DecimalFormat extends NumberFormat {
|
|||
*
|
||||
* @param roundingMode The {@code RoundingMode} to be used
|
||||
* @see #getRoundingMode()
|
||||
* @exception NullPointerException if {@code roundingMode} is null.
|
||||
* @throws NullPointerException if {@code roundingMode} is null.
|
||||
* @since 1.6
|
||||
*/
|
||||
@Override
|
||||
|
|
|
@ -109,7 +109,7 @@ public class DecimalFormatSymbols implements Cloneable, Serializable {
|
|||
* instead of the Latin numbering system.
|
||||
*
|
||||
* @param locale the desired locale
|
||||
* @exception NullPointerException if {@code locale} is null
|
||||
* @throws NullPointerException if {@code locale} is null
|
||||
*/
|
||||
public DecimalFormatSymbols( Locale locale ) {
|
||||
initialize( locale );
|
||||
|
@ -172,7 +172,7 @@ public class DecimalFormatSymbols implements Cloneable, Serializable {
|
|||
*
|
||||
* @param locale the desired locale.
|
||||
* @return a {@code DecimalFormatSymbols} instance.
|
||||
* @exception NullPointerException if {@code locale} is null
|
||||
* @throws NullPointerException if {@code locale} is null
|
||||
* @since 1.6
|
||||
*/
|
||||
public static final DecimalFormatSymbols getInstance(Locale locale) {
|
||||
|
@ -576,7 +576,7 @@ public class DecimalFormatSymbols implements Cloneable, Serializable {
|
|||
* symbol attribute to the currency's ISO 4217 currency code.
|
||||
*
|
||||
* @param currency the new currency to be used
|
||||
* @exception NullPointerException if {@code currency} is null
|
||||
* @throws NullPointerException if {@code currency} is null
|
||||
* @since 1.4
|
||||
* @see #setCurrencySymbol
|
||||
* @see #setInternationalCurrencySymbol
|
||||
|
@ -652,7 +652,7 @@ public class DecimalFormatSymbols implements Cloneable, Serializable {
|
|||
* Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.
|
||||
*
|
||||
* @param exp the exponent separator string
|
||||
* @exception NullPointerException if {@code exp} is null
|
||||
* @throws NullPointerException if {@code exp} is null
|
||||
* @see #getExponentSeparator()
|
||||
* @since 1.6
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -445,7 +445,7 @@ final class DigitList implements Cloneable {
|
|||
* @param alreadyRounded whether or not rounding up has already happened.
|
||||
* @param valueExactAsDecimal whether or not collected digits provide
|
||||
* an exact decimal representation of the value.
|
||||
* @exception ArithmeticException if rounding is needed with rounding
|
||||
* @throws ArithmeticException if rounding is needed with rounding
|
||||
* mode being set to RoundingMode.UNNECESSARY
|
||||
* @return true if digit <code>maximumDigits-1</code> should be
|
||||
* incremented
|
||||
|
|
|
@ -152,7 +152,7 @@ public abstract class Format implements Serializable, Cloneable {
|
|||
*
|
||||
* @param obj The object to format
|
||||
* @return Formatted string.
|
||||
* @exception IllegalArgumentException if the Format cannot format the given
|
||||
* @throws IllegalArgumentException if the Format cannot format the given
|
||||
* object
|
||||
*/
|
||||
public final String format (Object obj) {
|
||||
|
@ -172,9 +172,9 @@ public abstract class Format implements Serializable, Cloneable {
|
|||
* in the formatted text
|
||||
* @return the string buffer passed in as <code>toAppendTo</code>,
|
||||
* with formatted text appended
|
||||
* @exception NullPointerException if <code>toAppendTo</code> or
|
||||
* @throws NullPointerException if <code>toAppendTo</code> or
|
||||
* <code>pos</code> is null
|
||||
* @exception IllegalArgumentException if the Format cannot format the given
|
||||
* @throws IllegalArgumentException if the Format cannot format the given
|
||||
* object
|
||||
*/
|
||||
public abstract StringBuffer format(Object obj,
|
||||
|
@ -197,8 +197,8 @@ public abstract class Format implements Serializable, Cloneable {
|
|||
* that support fields should override this and create an
|
||||
* <code>AttributedCharacterIterator</code> with meaningful attributes.
|
||||
*
|
||||
* @exception NullPointerException if obj is null.
|
||||
* @exception IllegalArgumentException when the Format cannot format the
|
||||
* @throws NullPointerException if obj is null.
|
||||
* @throws IllegalArgumentException when the Format cannot format the
|
||||
* given object.
|
||||
* @param obj The object to format
|
||||
* @return AttributedCharacterIterator describing the formatted value.
|
||||
|
@ -237,7 +237,7 @@ public abstract class Format implements Serializable, Cloneable {
|
|||
*
|
||||
* @param source A <code>String</code> whose beginning should be parsed.
|
||||
* @return An <code>Object</code> parsed from the string.
|
||||
* @exception ParseException if the beginning of the specified string
|
||||
* @throws ParseException if the beginning of the specified string
|
||||
* cannot be parsed.
|
||||
* @throws NullPointerException if {@code source} is null.
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -64,7 +64,7 @@ final class MergeCollation {
|
|||
|
||||
/**
|
||||
* Creates from a pattern
|
||||
* @exception ParseException If the input pattern is incorrect.
|
||||
* @throws ParseException If the input pattern is incorrect.
|
||||
*/
|
||||
public MergeCollation(String pattern) throws ParseException
|
||||
{
|
||||
|
|
|
@ -362,8 +362,8 @@ public class MessageFormat extends Format {
|
|||
* <a href="#patterns">class description</a>.
|
||||
*
|
||||
* @param pattern the pattern for this message format
|
||||
* @exception IllegalArgumentException if the pattern is invalid
|
||||
* @exception NullPointerException if {@code pattern} is
|
||||
* @throws IllegalArgumentException if the pattern is invalid
|
||||
* @throws NullPointerException if {@code pattern} is
|
||||
* {@code null}
|
||||
*/
|
||||
public MessageFormat(String pattern) {
|
||||
|
@ -381,8 +381,8 @@ public class MessageFormat extends Format {
|
|||
*
|
||||
* @param pattern the pattern for this message format
|
||||
* @param locale the locale for this message format
|
||||
* @exception IllegalArgumentException if the pattern is invalid
|
||||
* @exception NullPointerException if {@code pattern} is
|
||||
* @throws IllegalArgumentException if the pattern is invalid
|
||||
* @throws NullPointerException if {@code pattern} is
|
||||
* {@code null}
|
||||
* @since 1.4
|
||||
*/
|
||||
|
@ -430,8 +430,8 @@ public class MessageFormat extends Format {
|
|||
* <a href="#patterns">class description</a>.
|
||||
*
|
||||
* @param pattern the pattern for this message format
|
||||
* @exception IllegalArgumentException if the pattern is invalid
|
||||
* @exception NullPointerException if {@code pattern} is
|
||||
* @throws IllegalArgumentException if the pattern is invalid
|
||||
* @throws NullPointerException if {@code pattern} is
|
||||
* {@code null}
|
||||
*/
|
||||
@SuppressWarnings("fallthrough") // fallthrough in switch is expected, suppress it
|
||||
|
@ -614,7 +614,7 @@ public class MessageFormat extends Format {
|
|||
* than <code>newFormats.length</code> are replaced.
|
||||
*
|
||||
* @param newFormats the new formats to use
|
||||
* @exception NullPointerException if <code>newFormats</code> is null
|
||||
* @throws NullPointerException if <code>newFormats</code> is null
|
||||
* @since 1.4
|
||||
*/
|
||||
public void setFormatsByArgumentIndex(Format[] newFormats) {
|
||||
|
@ -646,7 +646,7 @@ public class MessageFormat extends Format {
|
|||
* the <code>parse</code> methods.
|
||||
*
|
||||
* @param newFormats the new formats to use
|
||||
* @exception NullPointerException if <code>newFormats</code> is null
|
||||
* @throws NullPointerException if <code>newFormats</code> is null
|
||||
*/
|
||||
public void setFormats(Format[] newFormats) {
|
||||
int runsToCopy = newFormats.length;
|
||||
|
@ -698,7 +698,7 @@ public class MessageFormat extends Format {
|
|||
*
|
||||
* @param formatElementIndex the index of a format element within the pattern
|
||||
* @param newFormat the format to use for the specified format element
|
||||
* @exception ArrayIndexOutOfBoundsException if {@code formatElementIndex} is equal to or
|
||||
* @throws ArrayIndexOutOfBoundsException if {@code formatElementIndex} is equal to or
|
||||
* larger than the number of format elements in the pattern string
|
||||
*/
|
||||
public void setFormat(int formatElementIndex, Format newFormat) {
|
||||
|
@ -829,10 +829,10 @@ public class MessageFormat extends Format {
|
|||
in the output string.
|
||||
* @return the string buffer passed in as {@code result}, with formatted
|
||||
* text appended
|
||||
* @exception IllegalArgumentException if an argument in the
|
||||
* @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.
|
||||
* @exception NullPointerException if {@code result} is {@code null}
|
||||
* @throws NullPointerException if {@code result} is {@code null}
|
||||
*/
|
||||
public final StringBuffer format(Object[] arguments, StringBuffer result,
|
||||
FieldPosition pos)
|
||||
|
@ -850,11 +850,11 @@ public class MessageFormat extends Format {
|
|||
* @param pattern the pattern string
|
||||
* @param arguments object(s) to format
|
||||
* @return the formatted string
|
||||
* @exception IllegalArgumentException if the pattern is invalid,
|
||||
* @throws IllegalArgumentException if the pattern is invalid,
|
||||
* or if an argument in the <code>arguments</code> array
|
||||
* is not of the type expected by the format element(s)
|
||||
* that use it.
|
||||
* @exception NullPointerException if {@code pattern} is {@code null}
|
||||
* @throws NullPointerException if {@code pattern} is {@code null}
|
||||
*/
|
||||
public static String format(String pattern, Object ... arguments) {
|
||||
MessageFormat temp = new MessageFormat(pattern);
|
||||
|
@ -875,10 +875,10 @@ public class MessageFormat extends Format {
|
|||
* @param result where text is appended.
|
||||
* @param pos keeps track on the position of the first replaced argument
|
||||
* in the output string.
|
||||
* @exception IllegalArgumentException if an argument in the
|
||||
* @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.
|
||||
* @exception NullPointerException if {@code result} is {@code null}
|
||||
* @throws NullPointerException if {@code result} is {@code null}
|
||||
*/
|
||||
public final StringBuffer format(Object arguments, StringBuffer result,
|
||||
FieldPosition pos)
|
||||
|
@ -915,8 +915,8 @@ public class MessageFormat extends Format {
|
|||
*
|
||||
* @param arguments an array of objects to be formatted and substituted.
|
||||
* @return AttributedCharacterIterator describing the formatted value.
|
||||
* @exception NullPointerException if <code>arguments</code> is null.
|
||||
* @exception IllegalArgumentException if an argument in the
|
||||
* @throws NullPointerException if <code>arguments</code> is null.
|
||||
* @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.
|
||||
* @since 1.4
|
||||
|
@ -968,7 +968,7 @@ public class MessageFormat extends Format {
|
|||
* @param source the string to parse
|
||||
* @param pos the parse position
|
||||
* @return an array of parsed objects
|
||||
* @exception NullPointerException if {@code pos} is {@code null}
|
||||
* @throws NullPointerException if {@code pos} is {@code null}
|
||||
* for a non-null {@code source} string.
|
||||
*/
|
||||
public Object[] parse(String source, ParsePosition pos) {
|
||||
|
@ -1057,7 +1057,7 @@ public class MessageFormat extends Format {
|
|||
*
|
||||
* @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
|
||||
* @throws ParseException if the beginning of the specified string
|
||||
* cannot be parsed.
|
||||
*/
|
||||
public Object[] parse(String source) throws ParseException {
|
||||
|
@ -1253,7 +1253,7 @@ public class MessageFormat extends Format {
|
|||
* {@code Field.ARGUMENT} as the field attribute, the location of
|
||||
* the first replaced argument will be set in it.
|
||||
*
|
||||
* @exception IllegalArgumentException if an argument in the
|
||||
* @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.
|
||||
*/
|
||||
|
|
|
@ -259,11 +259,11 @@ public abstract class NumberFormat extends Format {
|
|||
* to 0 and 9, respectively for the output string
|
||||
* {@code 1,234,567.89}.
|
||||
* @return the value passed in as <code>toAppendTo</code>
|
||||
* @exception IllegalArgumentException if <code>number</code> is
|
||||
* @throws IllegalArgumentException if <code>number</code> is
|
||||
* null or not an instance of <code>Number</code>.
|
||||
* @exception NullPointerException if <code>toAppendTo</code> or
|
||||
* @throws NullPointerException if <code>toAppendTo</code> or
|
||||
* <code>pos</code> is null
|
||||
* @exception ArithmeticException if rounding is needed with rounding
|
||||
* @throws ArithmeticException if rounding is needed with rounding
|
||||
* mode being set to RoundingMode.UNNECESSARY
|
||||
* @see java.text.FieldPosition
|
||||
*/
|
||||
|
@ -318,7 +318,7 @@ public abstract class NumberFormat extends Format {
|
|||
*
|
||||
* @param number the double number to format
|
||||
* @return the formatted String
|
||||
* @exception ArithmeticException if rounding is needed with rounding
|
||||
* @throws ArithmeticException if rounding is needed with rounding
|
||||
* mode being set to RoundingMode.UNNECESSARY
|
||||
* @see java.text.Format#format
|
||||
*/
|
||||
|
@ -343,7 +343,7 @@ public abstract class NumberFormat extends Format {
|
|||
*
|
||||
* @param number the long number to format
|
||||
* @return the formatted String
|
||||
* @exception ArithmeticException if rounding is needed with rounding
|
||||
* @throws ArithmeticException if rounding is needed with rounding
|
||||
* mode being set to RoundingMode.UNNECESSARY
|
||||
* @see java.text.Format#format
|
||||
*/
|
||||
|
@ -367,7 +367,7 @@ public abstract class NumberFormat extends Format {
|
|||
* to 0 and 9, respectively for the output string
|
||||
* {@code 1,234,567.89}.
|
||||
* @return the formatted StringBuffer
|
||||
* @exception ArithmeticException if rounding is needed with rounding
|
||||
* @throws ArithmeticException if rounding is needed with rounding
|
||||
* mode being set to RoundingMode.UNNECESSARY
|
||||
* @see java.text.Format#format
|
||||
*/
|
||||
|
@ -390,7 +390,7 @@ public abstract class NumberFormat extends Format {
|
|||
* to 0 and 11, respectively for the output string
|
||||
* {@code 123,456,789}.
|
||||
* @return the formatted StringBuffer
|
||||
* @exception ArithmeticException if rounding is needed with rounding
|
||||
* @throws ArithmeticException if rounding is needed with rounding
|
||||
* mode being set to RoundingMode.UNNECESSARY
|
||||
* @see java.text.Format#format
|
||||
*/
|
||||
|
@ -424,7 +424,7 @@ public abstract class NumberFormat extends Format {
|
|||
*
|
||||
* @param source A <code>String</code> whose beginning should be parsed.
|
||||
* @return A <code>Number</code> parsed from the string.
|
||||
* @exception ParseException if the beginning of the specified string
|
||||
* @throws ParseException if the beginning of the specified string
|
||||
* cannot be parsed.
|
||||
*/
|
||||
public Number parse(String source) throws ParseException {
|
||||
|
@ -891,7 +891,7 @@ public abstract class NumberFormat extends Format {
|
|||
* <code>UnsupportedOperationException</code>.
|
||||
*
|
||||
* @return the currency used by this number format, or <code>null</code>
|
||||
* @exception UnsupportedOperationException if the number format class
|
||||
* @throws UnsupportedOperationException if the number format class
|
||||
* doesn't implement currency formatting
|
||||
* @since 1.4
|
||||
*/
|
||||
|
@ -908,9 +908,9 @@ public abstract class NumberFormat extends Format {
|
|||
* <code>UnsupportedOperationException</code>.
|
||||
*
|
||||
* @param currency the new currency to be used by this number format
|
||||
* @exception UnsupportedOperationException if the number format class
|
||||
* @throws UnsupportedOperationException if the number format class
|
||||
* doesn't implement currency formatting
|
||||
* @exception NullPointerException if <code>currency</code> is null
|
||||
* @throws NullPointerException if <code>currency</code> is null
|
||||
* @since 1.4
|
||||
*/
|
||||
public void setCurrency(Currency currency) {
|
||||
|
@ -924,7 +924,7 @@ public abstract class NumberFormat extends Format {
|
|||
* Subclasses which handle different rounding modes should override
|
||||
* this method.
|
||||
*
|
||||
* @exception UnsupportedOperationException The default implementation
|
||||
* @throws UnsupportedOperationException The default implementation
|
||||
* always throws this exception
|
||||
* @return The <code>RoundingMode</code> used for this NumberFormat.
|
||||
* @see #setRoundingMode(RoundingMode)
|
||||
|
@ -941,9 +941,9 @@ public abstract class NumberFormat extends Format {
|
|||
* Subclasses which handle different rounding modes should override
|
||||
* this method.
|
||||
*
|
||||
* @exception UnsupportedOperationException The default implementation
|
||||
* @throws UnsupportedOperationException The default implementation
|
||||
* always throws this exception
|
||||
* @exception NullPointerException if <code>roundingMode</code> is null
|
||||
* @throws NullPointerException if <code>roundingMode</code> is null
|
||||
* @param roundingMode The <code>RoundingMode</code> to be used
|
||||
* @see #getRoundingMode()
|
||||
* @since 1.6
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -72,7 +72,7 @@ final class RBTableBuilder {
|
|||
* stores them back in the RBCollationTables object. It is called
|
||||
* ONLY by the RBCollationTables constructor.
|
||||
* @see RuleBasedCollator#RuleBasedCollator
|
||||
* @exception ParseException If the rules format is incorrect.
|
||||
* @throws ParseException If the rules format is incorrect.
|
||||
*/
|
||||
|
||||
public void build(String pattern, int decmp) throws ParseException {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -273,7 +273,7 @@ public class RuleBasedCollator extends Collator{
|
|||
* description for more details on the collation rule syntax.
|
||||
* @see java.util.Locale
|
||||
* @param rules the collation rules to build the collation table from.
|
||||
* @exception ParseException A format exception
|
||||
* @throws ParseException A format exception
|
||||
* will be thrown if the build process of the rules fails. For
|
||||
* example, build rule "a < ? < d" will cause the constructor to
|
||||
* throw the ParseException because the '?' is not quoted.
|
||||
|
@ -290,7 +290,7 @@ public class RuleBasedCollator extends Collator{
|
|||
* @param rules the collation rules to build the collation table from.
|
||||
* @param decomp the decomposition strength used to build the
|
||||
* collation table and to perform comparisons.
|
||||
* @exception ParseException A format exception
|
||||
* @throws ParseException A format exception
|
||||
* will be thrown if the build process of the rules fails. For
|
||||
* example, build rule "a < ? < d" will cause the constructor to
|
||||
* throw the ParseException because the '?' is not quoted.
|
||||
|
@ -350,7 +350,7 @@ public class RuleBasedCollator extends Collator{
|
|||
* than, greater than or equal to another string in a language.
|
||||
* This can be overridden in a subclass.
|
||||
*
|
||||
* @exception NullPointerException if <code>source</code> or <code>target</code> is null.
|
||||
* @throws NullPointerException if <code>source</code> or <code>target</code> is null.
|
||||
*/
|
||||
public synchronized int compare(String source, String target)
|
||||
{
|
||||
|
|
|
@ -592,8 +592,8 @@ public class SimpleDateFormat extends DateFormat {
|
|||
* @see java.util.Locale#getDefault(java.util.Locale.Category)
|
||||
* @see java.util.Locale.Category#FORMAT
|
||||
* @param pattern the pattern describing the date and time format
|
||||
* @exception NullPointerException if the given pattern is null
|
||||
* @exception IllegalArgumentException if the given pattern is invalid
|
||||
* @throws NullPointerException if the given pattern is null
|
||||
* @throws IllegalArgumentException if the given pattern is invalid
|
||||
*/
|
||||
public SimpleDateFormat(String pattern)
|
||||
{
|
||||
|
@ -609,8 +609,8 @@ public class SimpleDateFormat extends DateFormat {
|
|||
*
|
||||
* @param pattern the pattern describing the date and time format
|
||||
* @param locale the locale whose date format symbols should be used
|
||||
* @exception NullPointerException if the given pattern or locale is null
|
||||
* @exception IllegalArgumentException if the given pattern is invalid
|
||||
* @throws NullPointerException if the given pattern or locale is null
|
||||
* @throws IllegalArgumentException if the given pattern is invalid
|
||||
*/
|
||||
public SimpleDateFormat(String pattern, Locale locale)
|
||||
{
|
||||
|
@ -631,8 +631,8 @@ public class SimpleDateFormat extends DateFormat {
|
|||
*
|
||||
* @param pattern the pattern describing the date and time format
|
||||
* @param formatSymbols the date format symbols to be used for formatting
|
||||
* @exception NullPointerException if the given pattern or formatSymbols is null
|
||||
* @exception IllegalArgumentException if the given pattern is invalid
|
||||
* @throws NullPointerException if the given pattern or formatSymbols is null
|
||||
* @throws IllegalArgumentException if the given pattern is invalid
|
||||
*/
|
||||
public SimpleDateFormat(String pattern, DateFormatSymbols formatSymbols)
|
||||
{
|
||||
|
@ -739,8 +739,8 @@ public class SimpleDateFormat extends DateFormat {
|
|||
* is "'o'", the TaggedData entry is
|
||||
* <code>((TAG_QUOTE_ASCII_CHAR&nbs;<<&nbs;8)&nbs;|&nbs;'o')</code>.
|
||||
*
|
||||
* @exception NullPointerException if the given pattern is null
|
||||
* @exception IllegalArgumentException if the given pattern is invalid
|
||||
* @throws NullPointerException if the given pattern is null
|
||||
* @throws IllegalArgumentException if the given pattern is invalid
|
||||
*/
|
||||
private char[] compile(String pattern) {
|
||||
int length = pattern.length();
|
||||
|
@ -958,7 +958,7 @@ public class SimpleDateFormat extends DateFormat {
|
|||
* {@code fieldPosition} will be set to 5 and 8, respectively, for the
|
||||
* first occurrence of the timezone pattern character {@code 'z'}.
|
||||
* @return the formatted date-time string.
|
||||
* @exception NullPointerException if any of the parameters is {@code null}.
|
||||
* @throws NullPointerException if any of the parameters is {@code null}.
|
||||
*/
|
||||
@Override
|
||||
public StringBuffer format(Date date, StringBuffer toAppendTo,
|
||||
|
@ -1012,8 +1012,8 @@ public class SimpleDateFormat extends DateFormat {
|
|||
* <code>DateFormat.Field</code>, with the corresponding attribute value
|
||||
* being the same as the attribute key.
|
||||
*
|
||||
* @exception NullPointerException if obj is null.
|
||||
* @exception IllegalArgumentException if the Format cannot format the
|
||||
* @throws NullPointerException if obj is null.
|
||||
* @throws IllegalArgumentException if the Format cannot format the
|
||||
* given object, or if the Format's pattern string is invalid.
|
||||
* @param obj The object to format
|
||||
* @return AttributedCharacterIterator describing the formatted value.
|
||||
|
@ -1459,7 +1459,7 @@ public class SimpleDateFormat extends DateFormat {
|
|||
* index information as described above.
|
||||
* @return A <code>Date</code> parsed from the string. In case of
|
||||
* error, returns null.
|
||||
* @exception NullPointerException if <code>text</code> or <code>pos</code> is null.
|
||||
* @throws NullPointerException if <code>text</code> or <code>pos</code> is null.
|
||||
*/
|
||||
@Override
|
||||
public Date parse(String text, ParsePosition pos)
|
||||
|
@ -2276,7 +2276,7 @@ public class SimpleDateFormat extends DateFormat {
|
|||
* Translates a pattern, mapping each character in the from string to the
|
||||
* corresponding character in the to string.
|
||||
*
|
||||
* @exception IllegalArgumentException if the given pattern is invalid
|
||||
* @throws IllegalArgumentException if the given pattern is invalid
|
||||
*/
|
||||
private String translatePattern(String pattern, String from, String to) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
|
@ -2339,8 +2339,8 @@ public class SimpleDateFormat extends DateFormat {
|
|||
* Applies the given pattern string to this date format.
|
||||
*
|
||||
* @param pattern the new date and time pattern for this date format
|
||||
* @exception NullPointerException if the given pattern is null
|
||||
* @exception IllegalArgumentException if the given pattern is invalid
|
||||
* @throws NullPointerException if the given pattern is null
|
||||
* @throws IllegalArgumentException if the given pattern is invalid
|
||||
*/
|
||||
public void applyPattern(String pattern)
|
||||
{
|
||||
|
@ -2357,8 +2357,8 @@ public class SimpleDateFormat extends DateFormat {
|
|||
*
|
||||
* @param pattern a String to be mapped to the new date and time format
|
||||
* pattern for this format
|
||||
* @exception NullPointerException if the given pattern is null
|
||||
* @exception IllegalArgumentException if the given pattern is invalid
|
||||
* @throws NullPointerException if the given pattern is null
|
||||
* @throws IllegalArgumentException if the given pattern is invalid
|
||||
*/
|
||||
public void applyLocalizedPattern(String pattern) {
|
||||
String p = translatePattern(pattern,
|
||||
|
@ -2383,7 +2383,7 @@ public class SimpleDateFormat extends DateFormat {
|
|||
* Sets the date and time format symbols of this date format.
|
||||
*
|
||||
* @param newFormatSymbols the new date and time format symbols
|
||||
* @exception NullPointerException if the given newFormatSymbols is null
|
||||
* @throws NullPointerException if the given newFormatSymbols is null
|
||||
* @see #getDateFormatSymbols
|
||||
*/
|
||||
public void setDateFormatSymbols(DateFormatSymbols newFormatSymbols)
|
||||
|
@ -2470,7 +2470,7 @@ public class SimpleDateFormat extends DateFormat {
|
|||
* After reading an object from the input stream, the format
|
||||
* pattern in the object is verified.
|
||||
*
|
||||
* @exception InvalidObjectException if the pattern is invalid
|
||||
* @throws InvalidObjectException if the pattern is invalid
|
||||
*/
|
||||
@java.io.Serial
|
||||
private void readObject(ObjectInputStream stream)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -51,8 +51,8 @@ public abstract class BreakIteratorProvider extends LocaleServiceProvider {
|
|||
* for the given locale.
|
||||
* @param locale the desired locale
|
||||
* @return A break iterator for word breaks
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @exception IllegalArgumentException if <code>locale</code> isn't
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
* @throws IllegalArgumentException if <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
|
@ -66,8 +66,8 @@ public abstract class BreakIteratorProvider extends LocaleServiceProvider {
|
|||
* for the given locale.
|
||||
* @param locale the desired locale
|
||||
* @return A break iterator for line breaks
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @exception IllegalArgumentException if <code>locale</code> isn't
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
* @throws IllegalArgumentException if <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
|
@ -81,8 +81,8 @@ public abstract class BreakIteratorProvider extends LocaleServiceProvider {
|
|||
* for the given locale.
|
||||
* @param locale the desired locale
|
||||
* @return A break iterator for character breaks
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @exception IllegalArgumentException if <code>locale</code> isn't
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
* @throws IllegalArgumentException if <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
|
@ -96,8 +96,8 @@ public abstract class BreakIteratorProvider extends LocaleServiceProvider {
|
|||
* for the given locale.
|
||||
* @param locale the desired locale
|
||||
* @return A break iterator for sentence breaks
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @exception IllegalArgumentException if <code>locale</code> isn't
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
* @throws IllegalArgumentException if <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -49,9 +49,9 @@ public abstract class CollatorProvider extends LocaleServiceProvider {
|
|||
* Returns a new <code>Collator</code> instance for the specified locale.
|
||||
* @param locale the desired locale.
|
||||
* @return the <code>Collator</code> for the desired locale.
|
||||
* @exception NullPointerException if
|
||||
* @throws NullPointerException if
|
||||
* <code>locale</code> is null
|
||||
* @exception IllegalArgumentException if <code>locale</code> isn't
|
||||
* @throws IllegalArgumentException if <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -54,12 +54,12 @@ public abstract class DateFormatProvider extends LocaleServiceProvider {
|
|||
* {@link java.text.DateFormat#LONG DateFormat.LONG}, or
|
||||
* {@link java.text.DateFormat#FULL DateFormat.FULL}.
|
||||
* @param locale the desired locale.
|
||||
* @exception IllegalArgumentException if <code>style</code> is invalid,
|
||||
* @throws IllegalArgumentException if <code>style</code> is invalid,
|
||||
* or if <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
* @return a time formatter.
|
||||
* @see java.text.DateFormat#getTimeInstance(int, java.util.Locale)
|
||||
*/
|
||||
|
@ -74,12 +74,12 @@ public abstract class DateFormatProvider extends LocaleServiceProvider {
|
|||
* {@link java.text.DateFormat#LONG DateFormat.LONG}, or
|
||||
* {@link java.text.DateFormat#FULL DateFormat.FULL}.
|
||||
* @param locale the desired locale.
|
||||
* @exception IllegalArgumentException if <code>style</code> is invalid,
|
||||
* @throws IllegalArgumentException if <code>style</code> is invalid,
|
||||
* or if <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
* @return a date formatter.
|
||||
* @see java.text.DateFormat#getDateInstance(int, java.util.Locale)
|
||||
*/
|
||||
|
@ -99,13 +99,13 @@ public abstract class DateFormatProvider extends LocaleServiceProvider {
|
|||
* {@link java.text.DateFormat#LONG DateFormat.LONG}, or
|
||||
* {@link java.text.DateFormat#FULL DateFormat.FULL}.
|
||||
* @param locale the desired locale.
|
||||
* @exception IllegalArgumentException if <code>dateStyle</code> or
|
||||
* @throws IllegalArgumentException if <code>dateStyle</code> or
|
||||
* <code>timeStyle</code> is invalid,
|
||||
* or if <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
* @return a date/time formatter.
|
||||
* @see java.text.DateFormat#getDateTimeInstance(int, int, java.util.Locale)
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -50,8 +50,8 @@ public abstract class DateFormatSymbolsProvider extends LocaleServiceProvider {
|
|||
* specified locale.
|
||||
*
|
||||
* @param locale the desired locale
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @exception IllegalArgumentException if <code>locale</code> isn't
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
* @throws IllegalArgumentException if <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -60,8 +60,8 @@ public abstract class DecimalFormatSymbolsProvider extends LocaleServiceProvider
|
|||
* specified locale.
|
||||
*
|
||||
* @param locale the desired locale
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @exception IllegalArgumentException if <code>locale</code> isn't
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
* @throws IllegalArgumentException if <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -50,8 +50,8 @@ public abstract class NumberFormatProvider extends LocaleServiceProvider {
|
|||
* monetary values for the specified locale.
|
||||
*
|
||||
* @param locale the desired locale.
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @exception IllegalArgumentException if <code>locale</code> isn't
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
* @throws IllegalArgumentException if <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
|
@ -71,8 +71,8 @@ public abstract class NumberFormatProvider extends LocaleServiceProvider {
|
|||
* java.text.NumberFormat#isParseIntegerOnly isParseIntegerOnly}).
|
||||
*
|
||||
* @param locale the desired locale
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @exception IllegalArgumentException if <code>locale</code> isn't
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
* @throws IllegalArgumentException if <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
|
@ -86,8 +86,8 @@ public abstract class NumberFormatProvider extends LocaleServiceProvider {
|
|||
* the specified locale.
|
||||
*
|
||||
* @param locale the desired locale
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @exception IllegalArgumentException if <code>locale</code> isn't
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
* @throws IllegalArgumentException if <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
|
@ -101,8 +101,8 @@ public abstract class NumberFormatProvider extends LocaleServiceProvider {
|
|||
* percentage values for the specified locale.
|
||||
*
|
||||
* @param locale the desired locale
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @exception IllegalArgumentException if <code>locale</code> isn't
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
* @throws IllegalArgumentException if <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue