# HG changeset patch
# User peytoia
# Date 1374826928 -32400
# Node ID a64012cb49d618b2745f36b1feb1440f15f4b8fb
# Parent 69648476a89e017a054f8fcce30172b1346a42d0
8021108: Clean up doclint warnings and errors in java.text package
Reviewed-by: darcy, okutsu
diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/Annotation.java
--- a/jdk/src/share/classes/java/text/Annotation.java Thu Jul 25 20:03:20 2013 -0700
+++ b/jdk/src/share/classes/java/text/Annotation.java Fri Jul 26 17:22:08 2013 +0900
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -59,7 +59,8 @@
/**
* Constructs an annotation record with the given value, which
* may be null.
- * @param value The value of the attribute
+ *
+ * @param value the value of the attribute
*/
public Annotation(Object value) {
this.value = value;
@@ -67,6 +68,8 @@
/**
* Returns the value of the attribute, which may be null.
+ *
+ * @return the value of the attribute
*/
public Object getValue() {
return value;
@@ -74,6 +77,8 @@
/**
* Returns the String representation of this Annotation.
+ *
+ * @return the {@code String} representation of this {@code Annotation}
*/
public String toString() {
return getClass().getName() + "[value=" + value + "]";
diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/AttributedCharacterIterator.java
--- a/jdk/src/share/classes/java/text/AttributedCharacterIterator.java Thu Jul 25 20:03:20 2013 -0700
+++ b/jdk/src/share/classes/java/text/AttributedCharacterIterator.java Fri Jul 26 17:22:08 2013 +0900
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -101,6 +101,8 @@
/**
* Constructs an {@code Attribute} with the given name.
+ *
+ * @param name the name of {@code Attribute}
*/
protected Attribute(String name) {
this.name = name;
@@ -111,7 +113,7 @@
/**
* Compares two objects for equality. This version only returns true
- * for x.equals(y)
if x
and y
refer
+ * for {@code x.equals(y)} if {@code x} and {@code y} refer
* to the same object, and guarantees this for all subclasses.
*/
public final boolean equals(Object obj) {
@@ -137,6 +139,8 @@
/**
* Returns the name of the attribute.
+ *
+ * @return the name of {@code Attribute}
*/
protected String getName() {
return name;
@@ -144,6 +148,10 @@
/**
* Resolves instances being deserialized to the predefined constants.
+ *
+ * @return the resolved {@code Attribute} object
+ * @throws InvalidObjectException if the object to resolve is not
+ * an instance of {@code Attribute}
*/
protected Object readResolve() throws InvalidObjectException {
if (this.getClass() != Attribute.class) {
@@ -171,6 +179,7 @@
* it is often necessary to store the reading (pronunciation) along with the
* written form.
*
Values are instances of {@link Annotation} holding instances of {@link String}. + * * @see Annotation * @see java.lang.String */ @@ -196,18 +205,26 @@ *
Any contiguous text segments having the same attributes (the * same set of attribute/value pairs) are treated as separate runs * if the attributes have been given to those text segments separately. + * + * @return the index of the first character of the run */ public int getRunStart(); /** * Returns the index of the first character of the run * with respect to the given {@code attribute} containing the current character. + * + * @param attribute the desired attribute. + * @return the index of the first character of the run */ public int getRunStart(Attribute attribute); /** * Returns the index of the first character of the run * with respect to the given {@code attributes} containing the current character. + * + * @param attributes a set of the desired attributes. + * @return the index of the first character of the run */ public int getRunStart(Set extends Attribute> attributes); @@ -218,30 +235,43 @@ *
Any contiguous text segments having the same attributes (the
* same set of attribute/value pairs) are treated as separate runs
* if the attributes have been given to those text segments separately.
+ *
+ * @return the index of the first character following the run
*/
public int getRunLimit();
/**
* Returns the index of the first character following the run
* with respect to the given {@code attribute} containing the current character.
+ *
+ * @param attribute the desired attribute
+ * @return the index of the first character following the run
*/
public int getRunLimit(Attribute attribute);
/**
* Returns the index of the first character following the run
* with respect to the given {@code attributes} containing the current character.
+ *
+ * @param attributes a set of the desired attributes
+ * @return the index of the first character following the run
*/
public int getRunLimit(Set extends Attribute> attributes);
/**
* Returns a map with the attributes defined on the current
* character.
+ *
+ * @return a map with the attributes defined on the current character
*/
public Map
* Here is a simple example that shows formatting and parsing:
*
* Specifying a pattern for ChoiceFormat objects is fairly straightforward.
* For example:
*
* Choice formats are not synchronized.
@@ -255,6 +255,8 @@
/**
* Gets the pattern.
+ *
+ * @return the pattern string
*/
public String toPattern() {
StringBuffer result = new StringBuffer();
@@ -305,6 +307,8 @@
/**
* Constructs with limits and corresponding formats based on the pattern.
+ *
+ * @param newPattern the new pattern string
* @see #applyPattern
*/
public ChoiceFormat(String newPattern) {
@@ -313,6 +317,9 @@
/**
* Constructs with the limits and the corresponding formats.
+ *
+ * @param limits limits in ascending order
+ * @param formats corresponding format strings
* @see #setChoices
*/
public ChoiceFormat(double[] limits, String[] formats) {
@@ -322,9 +329,9 @@
/**
* Set the choices to be used in formatting.
* @param limits contains the top value that you want
- * parsed with that format,and should be in ascending sorted order. When
+ * parsed with that format, and should be in ascending sorted order. When
* formatting X, the choice will be the i, where
- * limit[i] <= X < limit[i+1].
+ * limit[i] ≤ X {@literal <} limit[i+1].
* If the limit array is not in ascending order, the results of formatting
* will be incorrect.
* @param formats are the formats you want to use for each limit.
@@ -434,9 +441,12 @@
}
/**
- * Finds the least double greater than d.
- * If NaN, returns same value.
+ * Finds the least double greater than {@code d}.
+ * If {@code NaN}, returns same value.
* Used to make half-open intervals.
+ *
+ * @param d the reference value
+ * @return the least double value greather than {@code d}
* @see #previousDouble
*/
public static final double nextDouble (double d) {
@@ -444,8 +454,11 @@
}
/**
- * Finds the greatest double less than d.
- * If NaN, returns same value.
+ * Finds the greatest double less than {@code d}.
+ * If {@code NaN}, returns same value.
+ *
+ * @param d the reference value
+ * @return the greatest double value less than {@code d}
* @see #nextDouble
*/
public static final double previousDouble (double d) {
@@ -553,15 +566,21 @@
static final long POSITIVEINFINITY = 0x7FF0000000000000L;
/**
- * Finds the least double greater than d (if positive == true),
- * or the greatest double less than d (if positive == false).
- * If NaN, returns same value.
+ * Finds the least double greater than {@code d} (if {@code positive} is
+ * {@code true}), or the greatest double less than {@code d} (if
+ * {@code positive} is {@code false}).
+ * If {@code NaN}, returns same value.
*
* Does not affect floating-point flags,
* provided these member functions do not:
* Double.longBitsToDouble(long)
* Double.doubleToLongBits(double)
* Double.isNaN(double)
+ *
+ * @param d the reference value
+ * @param positive {@code true} if the least double is desired;
+ * {@code false} otherwise
+ * @return the least or greater double value
*/
public static double nextDouble (double d, boolean positive) {
diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/CollationElementIterator.java
--- a/jdk/src/share/classes/java/text/CollationElementIterator.java Thu Jul 25 20:03:20 2013 -0700
+++ b/jdk/src/share/classes/java/text/CollationElementIterator.java Fri Jul 26 17:22:08 2013 +0900
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, 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,14 +54,14 @@
* For example, consider the following in Spanish:
*
- *
+ *
* (The iterator returned by BreakIterator.getWordInstance() is unique in that
* the break positions it returns don't represent both the start and end of the
* thing being iterated over. That is, a sentence-break iterator returns breaks
diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/ChoiceFormat.java
--- a/jdk/src/share/classes/java/text/ChoiceFormat.java Thu Jul 25 20:03:20 2013 -0700
+++ b/jdk/src/share/classes/java/text/ChoiceFormat.java Fri Jul 26 17:22:08 2013 +0900
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, 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,7 +50,7 @@
* specifies a half-open interval up to the next item:
* {@code
* public static int nextWordStartAfter(int pos, String text) {
* BreakIterator wb = BreakIterator.getWordInstance();
* wb.setText(text);
@@ -207,7 +207,7 @@
* }
* return BreakIterator.DONE;
* }
- *
+ * }
*
* If there is no match, then either the first or last index is used, depending
@@ -85,21 +85,21 @@
*
- * X matches j if and only if limit[j] <= X < limit[j+1]
+ * X matches j if and only if limit[j] ≤ X < limit[j+1]
*
*
- *
* Here is a more complex example, with a pattern format:
*
+ *
* {@code
* double[] limits = {1,2,3,4,5,6,7};
* String[] dayOfWeekNames = {"Sun","Mon","Tue","Wed","Thur","Fri","Sat"};
* ChoiceFormat form = new ChoiceFormat(limits, dayOfWeekNames);
* ParsePosition status = new ParsePosition(0);
- * for (double i = 0.0; i <= 8.0; ++i) {
+ * for (double i = 0.0; i <= 8.0; ++i) {
* status.setIndex(0);
- * System.out.println(i + " -> " + form.format(i) + " -> "
+ * System.out.println(i + " -> " + form.format(i) + " -> "
* + form.parse(form.format(i),status));
* }
- *
+ * }
- *
*
+ *
* {@code
* double[] filelimits = {0,1,2};
* String[] filepart = {"are no files","is one file","are {2} files"};
* ChoiceFormat fileform = new ChoiceFormat(filelimits, filepart);
@@ -107,20 +107,20 @@
* MessageFormat pattform = new MessageFormat("There {0} on {1}");
* pattform.setFormats(testFormats);
* Object[] testArgs = {null, "ADisk", null};
- * for (int i = 0; i < 4; ++i) {
+ * for (int i = 0; i < 4; ++i) {
* testArgs[0] = new Integer(i);
* testArgs[2] = testArgs[0];
* System.out.println(pattform.format(testArgs));
* }
- *
+ * }
- *
* And the output result would be like the following:
*
+ *
{@code
* ChoiceFormat fmt = new ChoiceFormat(
- * "-1#is negative| 0#is zero or fraction | 1#is one |1.0<is 1+ |2#is two |2<is more than 2.");
+ * "-1#is negative| 0#is zero or fraction | 1#is one |1.0
*
- *
*
- *
- * Format with -INF : is negative
- * Format with -1.0 : is negative
- * Format with 0 : is zero or fraction
- * Format with 0.9 : is zero or fraction
- * Format with 1.0 : is one
- * Format with 1.5 : is 1+
- * Format with 2 : is two
- * Format with 2.1 : is more than 2.
- * Format with NaN : is negative
- * Format with +INF : is more than 2.
- *
+ * {@code
+ * Format with -INF : is negative
+ * Format with -1.0 : is negative
+ * Format with 0 : is zero or fraction
+ * Format with 0.9 : is zero or fraction
+ * Format with 1.0 : is one
+ * Format with 1.5 : is 1+
+ * Format with 2 : is two
+ * Format with 2.1 : is more than 2.
+ * Format with NaN : is negative
+ * Format with +INF : is more than 2.
+ * }
* Synchronization
+ * Synchronization
*
*
*
* And in German,
*
- * "ca" -> the first key is key('c') and second key is key('a').
- * "cha" -> the first key is key('ch') and second key is key('a').
+ * "ca" → the first key is key('c') and second key is key('a').
+ * "cha" → the first key is key('ch') and second key is key('a').
*
*
*
@@ -177,6 +177,8 @@
* means that when you change direction while iterating (i.e., call next() and
* then call previous(), or call previous() and then call next()), you'll get
* back the same element twice.
- * "\u00e4b"-> the first key is key('a'), the second key is key('e'), and
+ * "\u00e4b" → the first key is key('a'), the second key is key('e'), and
* the third key is key('b').
*
*
CollationKey
s might be used
* to sort a list of String
s.
* - ** * @see Collator @@ -112,6 +112,8 @@ /** * Returns the String that this CollationKey represents. + * + * @return the source string of this CollationKey */ public String getSourceString() { return source; @@ -123,6 +125,8 @@ * could be legitimately compared, then one could compare the byte arrays * for each of those keys to obtain the same result. Byte arrays are * organized most significant byte first. + * + * @return a byte array representation of the CollationKey */ abstract public byte[] toByteArray(); @@ -130,8 +134,8 @@ /** * CollationKey constructor. * - * @param source - the source string. - * @exception NullPointerException if+ **{@code * // Create an array of CollationKeys for the Strings to be sorted. * Collator myCollator = Collator.getInstance(); * CollationKey[] keys = new CollationKey[3]; * keys[0] = myCollator.getCollationKey("Tom"); * keys[1] = myCollator.getCollationKey("Dick"); * keys[2] = myCollator.getCollationKey("Harry"); - * sort( keys ); - *+ * System.out.println(keys[0].getSourceString()); + * System.out.println(keys[1].getSourceString()); + * System.out.println(keys[2].getSourceString()); + * }
+ * sort(keys); + * * //... - *
+ * * // Inside body of sort routine, compare keys this way - * if( keys[i].compareTo( keys[j] ) > 0 ) + * if (keys[i].compareTo(keys[j]) > 0) * // swap keys[i] and keys[j] - *
+ * * //... - *
+ * * // Finally, when we've returned from sort. - * System.out.println( keys[0].getSourceString() ); - * System.out.println( keys[1].getSourceString() ); - * System.out.println( keys[2].getSourceString() ); - *
source
is null.
+ * @param source the source string
+ * @exception NullPointerException if {@code source} is null
* @since 1.6
*/
protected CollationKey(String source) {
diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/DateFormat.java
--- a/jdk/src/share/classes/java/text/DateFormat.java Thu Jul 25 20:03:20 2013 -0700
+++ b/jdk/src/share/classes/java/text/DateFormat.java Fri Jul 26 17:22:08 2013 +0900
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, 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
@@ -57,7 +57,7 @@
* {@code DateFormat} is an abstract class for date/time formatting subclasses which
* formats and parses dates or time in a language-independent manner.
* The date/time formatting subclass, such as {@link SimpleDateFormat}, allows for
- * formatting (i.e., date -> text), parsing (text -> date), and
+ * formatting (i.e., date → text), parsing (text → date), and
* normalization. The date is represented as a Date
object or
* as the milliseconds since January 1, 1970, 00:00:00 GMT.
*
@@ -73,28 +73,36 @@
*
* To format a date for the current Locale, use one of the * static factory methods: - *
- * myString = DateFormat.getDateInstance().format(myDate); - *+ *
+ **{@code + * myString = DateFormat.getDateInstance().format(myDate); + * }+ *
If you are formatting multiple dates, it is * more efficient to get the format and use it multiple times so that * the system doesn't have to fetch the information about the local * language and country conventions multiple times. - *
- * DateFormat df = DateFormat.getDateInstance(); - * for (int i = 0; i < myDate.length; ++i) { - * output.println(df.format(myDate[i]) + "; "); - * } - *+ *
+ **{@code + * DateFormat df = DateFormat.getDateInstance(); + * for (int i = 0; i < myDate.length; ++i) { + * output.println(df.format(myDate[i]) + "; "); + * } + * }+ *
To format a date for a different Locale, specify it in the * call to {@link #getDateInstance(int, Locale) getDateInstance()}. - *
- * DateFormat df = DateFormat.getDateInstance(DateFormat.LONG, Locale.FRANCE); - *+ *
+ **{@code + * DateFormat df = DateFormat.getDateInstance(DateFormat.LONG, Locale.FRANCE); + * }+ *
You can use a DateFormat to parse also. - *
- * myDate = df.parse(myString); - *+ *
+ **{@code + * myDate = df.parse(myString); + * }+ *
Use {@code getDateInstance} to get the normal date format for that country. * There are other static factory methods available. * Use {@code getTimeInstance} to get the time format for that country. @@ -125,7 +133,7 @@ * on the screen. * * - *
* Date formats are not synchronized. @@ -581,6 +589,8 @@ /** * Get a default date/time formatter that uses the SHORT style for both the * date and the time. + * + * @return a date/time formatter */ public final static DateFormat getInstance() { return getDateTimeInstance(SHORT, SHORT); @@ -653,9 +663,9 @@ /** * Sets the time zone for the calendar of this {@code DateFormat} object. * This method is equivalent to the following call. - *
+ *- * getCalendar().setTimeZone(zone) - *
* *{@code + * getCalendar().setTimeZone(zone) + * }
The {@code TimeZone} set by this method is overwritten by a * {@link #setCalendar(java.util.Calendar) setCalendar} call. @@ -673,9 +683,9 @@ /** * Gets the time zone. * This method is equivalent to the following call. - *
+ *- * getCalendar().getTimeZone() - *
* * @return the time zone associated with the calendar of DateFormat. */ @@ -691,9 +701,9 @@ * inputs must match this object's format. * *{@code + * getCalendar().getTimeZone() + * }
This method is equivalent to the following call. - *
+ *- * getCalendar().setLenient(lenient) - *
* *{@code + * getCalendar().setLenient(lenient) + * }
This leniency value is overwritten by a call to {@link * #setCalendar(java.util.Calendar) setCalendar()}. @@ -709,9 +719,9 @@ /** * Tell whether date/time parsing is to be lenient. * This method is equivalent to the following call. - *
+ *- * getCalendar().isLenient() - *
* * @return {@code true} if the {@link #calendar} is lenient; * {@code false} otherwise. diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/DateFormatSymbols.java --- a/jdk/src/share/classes/java/text/DateFormatSymbols.java Thu Jul 25 20:03:20 2013 -0700 +++ b/jdk/src/share/classes/java/text/DateFormatSymbols.java Fri Jul 26 17:22:08 2013 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -135,6 +135,7 @@ * implementations. For full locale coverage, use the * {@link #getInstance(Locale) getInstance} method. * + * @param locale the desired locale * @see #getInstance(Locale) * @exception java.util.MissingResourceException * if the resources for the specified locale cannot be diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/DecimalFormat.java --- a/jdk/src/share/classes/java/text/DecimalFormat.java Thu Jul 25 20:03:20 2013 -0700 +++ b/jdk/src/share/classes/java/text/DecimalFormat.java Fri Jul 26 17:22:08 2013 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -87,7 +87,7 @@ * the{@code + * getCalendar().isLenient() + * }
NumberFormat
factory methods, the pattern and symbols are
* read from localized ResourceBundle
s.
*
- * DecimalFormat
patterns have the following syntax:
* @@ -174,7 +174,7 @@ **- *
+ * * Symbol * Location * Localized? @@ -184,7 +184,7 @@ * Number * Yes * Digit - * + * * #
*Number * Yes @@ -194,7 +194,7 @@ * Number * Yes * Decimal separator or monetary decimal separator - * + * * -
*Number * Yes @@ -204,7 +204,7 @@ * Number * Yes * Grouping separator - * + * * E
*Number * Yes @@ -215,7 +215,7 @@ * Subpattern boundary * Yes * Separates positive and negative subpatterns - * + * * %
*Prefix or suffix * Yes @@ -225,7 +225,7 @@ * Prefix or suffix * Yes * Multiply by 1000 and show as per mille value - * + * * ¤
(\u00A4
) *Prefix or suffix * No @@ -248,7 +248,8 @@ * * Numbers in scientific notation are expressed as the product of a mantissa * and a power of ten, for example, 1234 can be expressed as 1.234 x 10^3. The - * mantissa is often in the range 1.0 <= x < 10.0, but it need not be. + * mantissa is often in the range 1.0 ≤ x {@literal <} 10.0, but it need not + * be. *
DecimalFormat
can be instructed to format and parse scientific * notation only via a pattern; there is currently no factory method * that creates a scientific notation format. In a pattern, the exponent @@ -336,13 +337,13 @@ * *Example
* - ** * @see Java Tutorial * @see NumberFormat @@ -421,7 +422,7 @@ * return the most appropriate sub-class of NumberFormat for a given * locale. * - * @param pattern A non-localized pattern string. + * @param pattern a non-localized pattern string. * @exception NullPointerException if+ *+ * }{@code * // Print out a number using the localized number, integer, currency, * // and percent format for each locale * Locale[] locales = NumberFormat.getAvailableLocales(); * double myNumber = -1234.56; * NumberFormat form; - * for (int j=0; j<4; ++j) { + * for (int j = 0; j < 4; ++j) { * System.out.println("FORMAT"); * for (int i = 0; i < locales.length; ++i) { * if (locales[i].getCountry().length() == 0) { @@ -368,7 +369,7 @@ * } catch (ParseException e) {} * } * } - *pattern
is null * @exception IllegalArgumentException if the given pattern is invalid. * @see java.text.NumberFormat#getInstance @@ -2382,6 +2383,8 @@ /** * Get the positive prefix. *Examples: +123, $123, sFr123 + * + * @return the positive prefix */ public String getPositivePrefix () { return positivePrefix; @@ -2390,6 +2393,8 @@ /** * Set the positive prefix. *
Examples: +123, $123, sFr123 + * + * @param newValue the new positive prefix */ public void setPositivePrefix (String newValue) { positivePrefix = newValue; @@ -2420,6 +2425,8 @@ /** * Get the negative prefix. *
Examples: -123, ($123) (with negative suffix), sFr-123 + * + * @return the negative prefix */ public String getNegativePrefix () { return negativePrefix; @@ -2428,6 +2435,8 @@ /** * Set the negative prefix. *
Examples: -123, ($123) (with negative suffix), sFr-123 + * + * @param newValue the new negative prefix */ public void setNegativePrefix (String newValue) { negativePrefix = newValue; @@ -2457,6 +2466,8 @@ /** * Get the positive suffix. *
Example: 123% + * + * @return the positive suffix */ public String getPositiveSuffix () { return positiveSuffix; @@ -2465,6 +2476,8 @@ /** * Set the positive suffix. *
Example: 123% + * + * @param newValue the new positive suffix */ public void setPositiveSuffix (String newValue) { positiveSuffix = newValue; @@ -2494,6 +2507,8 @@ /** * Get the negative suffix. *
Examples: -123%, ($123) (with positive suffixes) + * + * @return the negative suffix */ public String getNegativeSuffix () { return negativeSuffix; @@ -2502,6 +2517,8 @@ /** * Set the negative suffix. *
Examples: 123% + * + * @param newValue the new negative suffix */ public void setNegativeSuffix (String newValue) { negativeSuffix = newValue; @@ -2532,6 +2549,7 @@ * Gets the multiplier for use in percent, per mille, and similar * formats. * + * @return the multiplier * @see #setMultiplier(int) */ public int getMultiplier () { @@ -2549,6 +2567,7 @@ *
Example: with multiplier 100, 1.23 is formatted as "123", and * "123" is parsed into 1.23. * + * @param newValue the new multiplier * @see #getMultiplier */ public void setMultiplier (int newValue) { @@ -2571,6 +2590,8 @@ * Return the grouping size. Grouping size is the number of digits between * grouping separators in the integer portion of a number. For example, * in the number "123,456.78", the grouping size is 3. + * + * @return the grouping size * @see #setGroupingSize * @see java.text.NumberFormat#isGroupingUsed * @see java.text.DecimalFormatSymbols#getGroupingSeparator @@ -2585,6 +2606,8 @@ * in the number "123,456.78", the grouping size is 3. *
* The value passed in is converted to a byte, which may lose information. + * + * @param newValue the new grouping size * @see #getGroupingSize * @see java.text.NumberFormat#setGroupingUsed * @see java.text.DecimalFormatSymbols#setGroupingSeparator @@ -2597,7 +2620,10 @@ /** * Allows you to get the behavior of the decimal separator with integers. * (The decimal separator will always appear with decimals.) - *Example: Decimal ON: 12345 -> 12345.; OFF: 12345 -> 12345 + *
Example: Decimal ON: 12345 → 12345.; OFF: 12345 → 12345 + * + * @return {@code true} if the decimal separator is always shown; + * {@code false} otherwise */ public boolean isDecimalSeparatorAlwaysShown() { return decimalSeparatorAlwaysShown; @@ -2606,7 +2632,10 @@ /** * Allows you to set the behavior of the decimal separator with integers. * (The decimal separator will always appear with decimals.) - *
Example: Decimal ON: 12345 -> 12345.; OFF: 12345 -> 12345 + *
Example: Decimal ON: 12345 → 12345.; OFF: 12345 → 12345 + * + * @param newValue {@code true} if the decimal separator is always shown; + * {@code false} otherwise */ public void setDecimalSeparatorAlwaysShown(boolean newValue) { decimalSeparatorAlwaysShown = newValue; @@ -2616,6 +2645,9 @@ /** * Returns whether the {@link #parse(java.lang.String, java.text.ParsePosition)} * method returns
BigDecimal
. The default value is false. + * + * @return {@code true} if the parse method returns BigDecimal; + * {@code false} otherwise * @see #setParseBigDecimal * @since 1.5 */ @@ -2626,6 +2658,9 @@ /** * Sets whether the {@link #parse(java.lang.String, java.text.ParsePosition)} * method returnsBigDecimal
. + * + * @param newValue {@code true} if the parse method returns BigDecimal; + * {@code false} otherwise * @see #isParseBigDecimal * @since 1.5 */ @@ -2712,6 +2747,8 @@ /** * Synthesizes a pattern string that represents the current state * of this Format object. + * + * @return a pattern string * @see #applyPattern */ public String toPattern() { @@ -2721,6 +2758,8 @@ /** * Synthesizes a localized pattern string that represents the current * state of this Format object. + * + * @return a localized pattern string * @see #applyPattern */ public String toLocalizedPattern() { @@ -3049,7 +3088,7 @@ * by this routine, since that is the typical end-user desire; * use setMaximumInteger if you want to set a real value. * For negative numbers, use a second pattern, separated by a semicolon - *Example
"#,#00.0#"
-> 1,234.56 + *Example
"#,#00.0#"
→ 1,234.56 *This means a minimum of 2 integer digits, 1 fraction digit, and * a maximum of 2 fraction digits. *
Example:
"#,#00.0#;(#,#00.0#)"
for negatives in @@ -3057,6 +3096,7 @@ *In negative patterns, the minimum and maximum counts are ignored; * these are presumed to be set in the positive pattern. * + * @param pattern a new pattern * @exception NullPointerException if
pattern
is null * @exception IllegalArgumentException if the given pattern is invalid. */ @@ -3075,7 +3115,7 @@ * by this routine, since that is the typical end-user desire; * use setMaximumInteger if you want to set a real value. * For negative numbers, use a second pattern, separated by a semicolon - *Example
"#,#00.0#"
-> 1,234.56 + *Example
"#,#00.0#"
→ 1,234.56 *This means a minimum of 2 integer digits, 1 fraction digit, and * a maximum of 2 fraction digits. *
Example:
"#,#00.0#;(#,#00.0#)"
for negatives in @@ -3083,6 +3123,7 @@ *In negative patterns, the minimum and maximum counts are ignored; * these are presumed to be set in the positive pattern. * + * @param pattern a new pattern * @exception NullPointerException if
pattern
is null * @exception IllegalArgumentException if the given pattern is invalid. */ diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/DecimalFormatSymbols.java --- a/jdk/src/share/classes/java/text/DecimalFormatSymbols.java Thu Jul 25 20:03:20 2013 -0700 +++ b/jdk/src/share/classes/java/text/DecimalFormatSymbols.java Fri Jul 26 17:22:08 2013 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -106,6 +106,7 @@ * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * + * @param locale the desired locale * @exception NullPointerException iflocale
is null */ public DecimalFormatSymbols( Locale locale ) { @@ -122,7 +123,7 @@ * implementations. It must contain at least aLocale
* instance equal to {@link java.util.Locale#US Locale.US}. * - * @return An array of locales for which localized + * @return an array of locales for which localized *DecimalFormatSymbols
instances are available. * @since 1.6 */ @@ -166,6 +167,7 @@ * * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. + * * @param locale the desired locale. * @return aDecimalFormatSymbols
instance. * @exception NullPointerException iflocale
is null @@ -185,6 +187,8 @@ /** * Gets the character used for zero. Different for Arabic, etc. + * + * @return the character used for zero */ public char getZeroDigit() { return zeroDigit; @@ -192,6 +196,8 @@ /** * Sets the character used for zero. Different for Arabic, etc. + * + * @param zeroDigit the character used for zero */ public void setZeroDigit(char zeroDigit) { this.zeroDigit = zeroDigit; @@ -199,6 +205,8 @@ /** * Gets the character used for thousands separator. Different for French, etc. + * + * @return the grouping separator */ public char getGroupingSeparator() { return groupingSeparator; @@ -206,6 +214,8 @@ /** * Sets the character used for thousands separator. Different for French, etc. + * + * @param groupingSeparator the grouping separator */ public void setGroupingSeparator(char groupingSeparator) { this.groupingSeparator = groupingSeparator; @@ -213,6 +223,8 @@ /** * Gets the character used for decimal sign. Different for French, etc. + * + * @return the character used for decimal sign */ public char getDecimalSeparator() { return decimalSeparator; @@ -220,6 +232,8 @@ /** * Sets the character used for decimal sign. Different for French, etc. + * + * @param decimalSeparator the character used for decimal sign */ public void setDecimalSeparator(char decimalSeparator) { this.decimalSeparator = decimalSeparator; @@ -227,6 +241,8 @@ /** * Gets the character used for per mille sign. Different for Arabic, etc. + * + * @return the character used for per mille sign */ public char getPerMill() { return perMill; @@ -234,6 +250,8 @@ /** * Sets the character used for per mille sign. Different for Arabic, etc. + * + * @param perMill the character used for per mille sign */ public void setPerMill(char perMill) { this.perMill = perMill; @@ -241,6 +259,8 @@ /** * Gets the character used for percent sign. Different for Arabic, etc. + * + * @return the character used for percent sign */ public char getPercent() { return percent; @@ -248,6 +268,8 @@ /** * Sets the character used for percent sign. Different for Arabic, etc. + * + * @param percent the character used for percent sign */ public void setPercent(char percent) { this.percent = percent; @@ -255,6 +277,8 @@ /** * Gets the character used for a digit in a pattern. + * + * @return the character used for a digit in a pattern */ public char getDigit() { return digit; @@ -262,6 +286,8 @@ /** * Sets the character used for a digit in a pattern. + * + * @param digit the character used for a digit in a pattern */ public void setDigit(char digit) { this.digit = digit; @@ -270,6 +296,8 @@ /** * Gets the character used to separate positive and negative subpatterns * in a pattern. + * + * @return the pattern separator */ public char getPatternSeparator() { return patternSeparator; @@ -278,6 +306,8 @@ /** * Sets the character used to separate positive and negative subpatterns * in a pattern. + * + * @param patternSeparator the pattern separator */ public void setPatternSeparator(char patternSeparator) { this.patternSeparator = patternSeparator; @@ -286,6 +316,8 @@ /** * Gets the string used to represent infinity. Almost always left * unchanged. + * + * @return the string representing infinity */ public String getInfinity() { return infinity; @@ -294,6 +326,8 @@ /** * Sets the string used to represent infinity. Almost always left * unchanged. + * + * @param infinity the string representing infinity */ public void setInfinity(String infinity) { this.infinity = infinity; @@ -302,6 +336,8 @@ /** * Gets the string used to represent "not a number". Almost always left * unchanged. + * + * @return the string representing "not a number" */ public String getNaN() { return NaN; @@ -310,6 +346,8 @@ /** * Sets the string used to represent "not a number". Almost always left * unchanged. + * + * @param NaN the string representing "not a number" */ public void setNaN(String NaN) { this.NaN = NaN; @@ -319,6 +357,8 @@ * Gets the character used to represent minus sign. If no explicit * negative format is specified, one is formed by prefixing * minusSign to the positive format. + * + * @return the character representing minus sign */ public char getMinusSign() { return minusSign; @@ -328,6 +368,8 @@ * Sets the character used to represent minus sign. If no explicit * negative format is specified, one is formed by prefixing * minusSign to the positive format. + * + * @param minusSign the character representing minus sign */ public void setMinusSign(char minusSign) { this.minusSign = minusSign; @@ -336,6 +378,8 @@ /** * Returns the currency symbol for the currency of these * DecimalFormatSymbols in their locale. + * + * @return the currency symbol * @since 1.2 */ public String getCurrencySymbol() @@ -346,6 +390,8 @@ /** * Sets the currency symbol for the currency of these * DecimalFormatSymbols in their locale. + * + * @param currency the currency symbol * @since 1.2 */ public void setCurrencySymbol(String currency) @@ -356,6 +402,8 @@ /** * Returns the ISO 4217 currency code of the currency of these * DecimalFormatSymbols. + * + * @return the currency code * @since 1.2 */ public String getInternationalCurrencySymbol() @@ -374,6 +422,7 @@ * then the currency attribute is set to null and the currency symbol * attribute is not modified. * + * @param currencyCode the currency code * @see #setCurrency * @see #setCurrencySymbol * @since 1.2 @@ -427,6 +476,8 @@ /** * Returns the monetary decimal separator. + * + * @return the monetary decimal separator * @since 1.2 */ public char getMonetaryDecimalSeparator() @@ -436,6 +487,8 @@ /** * Sets the monetary decimal separator. + * + * @param sep the monetary decimal separator * @since 1.2 */ public void setMonetaryDecimalSeparator(char sep) diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/FieldPosition.java --- a/jdk/src/share/classes/java/text/FieldPosition.java Thu Jul 25 20:03:20 2013 -0700 +++ b/jdk/src/share/classes/java/text/FieldPosition.java Fri Jul 26 17:22:08 2013 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2002, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -100,6 +100,7 @@ * identified by constants, whose names typically end with _FIELD, * in the various subclasses of Format. * + * @param field the field identifier * @see java.text.NumberFormat#INTEGER_FIELD * @see java.text.NumberFormat#FRACTION_FIELD * @see java.text.DateFormat#YEAR_FIELD @@ -157,6 +158,8 @@ /** * Retrieves the field identifier. + * + * @return the field identifier */ public int getField() { return field; @@ -164,6 +167,8 @@ /** * Retrieves the index of the first character in the requested field. + * + * @return the begin index */ public int getBeginIndex() { return beginIndex; @@ -172,6 +177,8 @@ /** * Retrieves the index of the character following the last character in the * requested field. + * + * @return the end index */ public int getEndIndex() { return endIndex; @@ -179,6 +186,8 @@ /** * Sets the begin index. For use by subclasses of Format. + * + * @param bi the begin index * @since 1.2 */ public void setBeginIndex(int bi) { @@ -187,6 +196,8 @@ /** * Sets the end index. For use by subclasses of Format. + * + * @param ei the end index * @since 1.2 */ public void setEndIndex(int ei) { diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/Format.java --- a/jdk/src/share/classes/java/text/Format.java Thu Jul 25 20:03:20 2013 -0700 +++ b/jdk/src/share/classes/java/text/Format.java Fri Jul 26 17:22:08 2013 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -58,7 +58,7 @@ * no separator in between, and in this case theparseObject
could * not tell which digits belong to which number. * - *Subclassing
+ *Subclassing
* ** The Java Platform provides three specialized subclasses of
Format
-- diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/MessageFormat.java --- a/jdk/src/share/classes/java/text/MessageFormat.java Thu Jul 25 20:03:20 2013 -0700 +++ b/jdk/src/share/classes/java/text/MessageFormat.java Fri Jul 26 17:22:08 2013 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -68,7 +68,7 @@ * behavior is defined by the pattern that you provide as well as the * subformats used for inserted arguments. * - *Patterns and Their Interpretation
+ *Patterns and Their Interpretation
* *MessageFormat
uses patterns of the following form: *@@ -287,10 +287,10 @@ * You can create theChoiceFormat
programmatically, as in the * above example, or by using a pattern. See {@link ChoiceFormat} * for more information. - ** *+ *+ * "There {0,choice,0#are no files|1#is one file|1{@code * form.applyPattern( - * "There {0,choice,0#are no files|1#is one file|1<are {0,number,integer} files}."); - ** Note: As we see above, the string produced @@ -778,7 +778,7 @@ *
* instanceof ChoiceFormat
*any - * subformat.format(argument).indexOf('{') >= 0 ?
+ *subformat.format(argument).indexOf('{') >= 0 ?
*
* (new MessageFormat(subformat.format(argument), getLocale())).format(argument) : * subformat.format(argument)@@ -811,6 +811,8 @@ * @param result where text is appended. * @param pos On input: an alignment field, if desired. * On output: the offsets of the alignment field. + * @return the string buffer passed in as {@code result}, with formatted + * text appended * @exception IllegalArgumentException if an argument in the * arguments
array is not of the type * expected by the format element(s) that use it. @@ -828,6 +830,9 @@ *(new {@link #MessageFormat(String) MessageFormat}(pattern)).{@link #format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition) format}(arguments, new StringBuffer(), null).toString()
* * + * @param pattern the pattern string + * @param arguments object(s) to format + * @return the formatted string * @exception IllegalArgumentException if the pattern is invalid, * or if an argument in thearguments
array * is not of the type expected by the format element(s) @@ -940,6 +945,10 @@ * is comparing against the pattern "AAD {0} BBB", the error index is * 0. When an error occurs, the call to this method will return null. * If the source is null, return an empty array. + * + * @param source the string to parse + * @param pos the parse position + * @return an array of parsed objects */ public Object[] parse(String source, ParsePosition pos) { if (source == null) { diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/Normalizer.java --- a/jdk/src/share/classes/java/text/Normalizer.java Thu Jul 25 20:03:20 2013 -0700 +++ b/jdk/src/share/classes/java/text/Normalizer.java Fri Jul 26 17:22:08 2013 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, 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 @@ -55,14 +55,12 @@ * ** U+00C1 LATIN CAPITAL LETTER A WITH ACUTE- * * * or as two separate characters (the "decomposed" form): * ** U+0041 LATIN CAPITAL LETTER A * U+0301 COMBINING ACUTE ACCENT- * * * To a user of your program, however, both of these sequences should be * treated as the same "user-level" character "A with acute accent". When you @@ -78,13 +76,11 @@ * U+0066 LATIN SMALL LETTER F * U+0066 LATIN SMALL LETTER F * U+0069 LATIN SMALL LETTER I - * * * or as the single character * ** U+FB03 LATIN SMALL LIGATURE FFI- * * * The ffi ligature is not a distinct semantic character, and strictly speaking * it shouldn't be in Unicode at all, but it was included for compatibility diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/NumberFormat.java --- a/jdk/src/share/classes/java/text/NumberFormat.java Thu Jul 25 20:03:20 2013 -0700 +++ b/jdk/src/share/classes/java/text/NumberFormat.java Fri Jul 26 17:22:08 2013 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -73,34 +73,34 @@ * To format a number for the current Locale, use one of the factory * class methods: *- ** If you are formatting multiple numbers, it is * more efficient to get the format and use it multiple times so that * the system doesn't have to fetch the information about the local * language and country conventions multiple times. *- * myString = NumberFormat.getInstance().format(myNumber); - *+ *{@code + * myString = NumberFormat.getInstance().format(myNumber); + * }*- ** To format a number for a different Locale, specify it in the * call to+ **{@code * NumberFormat nf = NumberFormat.getInstance(); * for (int i = 0; i < myNumber.length; ++i) { * output.println(nf.format(myNumber[i]) + "; "); * } - *+ * }getInstance
. *- ** You can also use a+ **{@code * NumberFormat nf = NumberFormat.getInstance(Locale.FRENCH); - *+ * }NumberFormat
to parse numbers: *- ** Use+ **{@code * myNumber = nf.parse(myString); - *+ * }getInstance
orgetNumberInstance
to get the * normal number format. UsegetIntegerInstance
to get an @@ -125,8 +125,8 @@ * the detailed description for each these control methods, ** setParseIntegerOnly : only affects parsing, e.g. - * if true, "3456.78" -> 3456 (and leaves the parse position just after index 6) - * if false, "3456.78" -> 3456.78 (and leaves the parse position just after index 8) + * if true, "3456.78" → 3456 (and leaves the parse position just after index 6) + * if false, "3456.78" → 3456.78 (and leaves the parse position just after index 8) * This is independent of formatting. If you want to not show a decimal point * where there might be no digits after the decimal point, use * setDecimalSeparatorAlwaysShown. @@ -134,8 +134,8 @@ * setDecimalSeparatorAlwaysShown : only affects formatting, and only where * there might be no digits after the decimal point, such as with a pattern * like "#,##0.##", e.g., - * if true, 3456.00 -> "3,456." - * if false, 3456.00 -> "3456" + * if true, 3456.00 → "3,456." + * if false, 3456.00 → "3456" * This is independent of parsing. If you want parsing to stop at the decimal * point, use setParseIntegerOnly. * @@ -166,7 +166,7 @@ * numbers: "(12)" for -12. * * - *
Synchronization
+ *Synchronization
* ** Number formats are generally not synchronized. @@ -280,6 +280,9 @@ /** * Specialization of format. + * + * @param number the double number to format + * @return the formatted String * @exception ArithmeticException if rounding is needed with rounding * mode being set to RoundingMode.UNNECESSARY * @see java.text.Format#format @@ -302,6 +305,9 @@ /** * Specialization of format. + * + * @param number the long number to format + * @return the formatted String * @exception ArithmeticException if rounding is needed with rounding * mode being set to RoundingMode.UNNECESSARY * @see java.text.Format#format @@ -313,6 +319,12 @@ /** * Specialization of format. + * + * @param number the double number to format + * @param toAppendTo the StringBuffer to which the formatted text is to be + * appended + * @param pos the field position + * @return the formatted StringBuffer * @exception ArithmeticException if rounding is needed with rounding * mode being set to RoundingMode.UNNECESSARY * @see java.text.Format#format @@ -323,6 +335,12 @@ /** * Specialization of format. + * + * @param number the long number to format + * @param toAppendTo the StringBuffer to which the formatted text is to be + * appended + * @param pos the field position + * @return the formatted StringBuffer * @exception ArithmeticException if rounding is needed with rounding * mode being set to RoundingMode.UNNECESSARY * @see java.text.Format#format @@ -339,6 +357,10 @@ * after the 1). * Does not throw an exception; if no object can be parsed, index is * unchanged! + * + * @param source the String to parse + * @param parsePosition the parse position + * @return the parsed value * @see java.text.NumberFormat#isParseIntegerOnly * @see java.text.Format#parseObject */ @@ -373,6 +395,9 @@ * would stop at the "." character. Of course, the exact format accepted * by the parse operation is locale dependant and determined by sub-classes * of NumberFormat. + * + * @return {@code true} if numbers should be parsed as integers only; + * {@code false} otherwise */ public boolean isParseIntegerOnly() { return parseIntegerOnly; @@ -380,6 +405,9 @@ /** * Sets whether or not numbers should be parsed as integers only. + * + * @param value {@code true} if numbers should be parsed as integers only; + * {@code false} otherwise * @see #isParseIntegerOnly */ public void setParseIntegerOnly(boolean value) { @@ -393,6 +421,9 @@ * {@link java.util.Locale.Category#FORMAT FORMAT} locale. * This is the same as calling * {@link #getNumberInstance() getNumberInstance()}. + * + * @return the {@code NumberFormat} instance for general-purpose number + * formatting */ public final static NumberFormat getInstance() { return getInstance(Locale.getDefault(Locale.Category.FORMAT), NUMBERSTYLE); @@ -402,6 +433,10 @@ * Returns a general-purpose number format for the specified locale. * This is the same as calling * {@link #getNumberInstance(java.util.Locale) getNumberInstance(inLocale)}. + * + * @param inLocale the desired locale + * @return the {@code NumberFormat} instance for general-purpose number + * formatting */ public static NumberFormat getInstance(Locale inLocale) { return getInstance(inLocale, NUMBERSTYLE); @@ -413,6 +448,9 @@ *
This is equivalent to calling * {@link #getNumberInstance(Locale) * getNumberInstance(Locale.getDefault(Locale.Category.FORMAT))}. + * + * @return the {@code NumberFormat} instance for general-purpose number + * formatting * @see java.util.Locale#getDefault(java.util.Locale.Category) * @see java.util.Locale.Category#FORMAT */ @@ -422,6 +460,10 @@ /** * Returns a general-purpose number format for the specified locale. + * + * @param inLocale the desired locale + * @return the {@code NumberFormat} instance for general-purpose number + * formatting */ public static NumberFormat getNumberInstance(Locale inLocale) { return getInstance(inLocale, NUMBERSTYLE); @@ -457,6 +499,7 @@ * and to parse only the integer part of an input string (see {@link * #isParseIntegerOnly isParseIntegerOnly}). * + * @param inLocale the desired locale * @see #getRoundingMode() * @return a number format for integer values * @since 1.4 @@ -472,6 +515,7 @@ * {@link #getCurrencyInstance(Locale) * getCurrencyInstance(Locale.getDefault(Locale.Category.FORMAT))}. * + * @return the {@code NumberFormat} instance for currency formatting * @see java.util.Locale#getDefault(java.util.Locale.Category) * @see java.util.Locale.Category#FORMAT */ @@ -481,6 +525,9 @@ /** * Returns a currency format for the specified locale. + * + * @param inLocale the desired locale + * @return the {@code NumberFormat} instance for currency formatting */ public static NumberFormat getCurrencyInstance(Locale inLocale) { return getInstance(inLocale, CURRENCYSTYLE); @@ -493,6 +540,7 @@ * {@link #getPercentInstance(Locale) * getPercentInstance(Locale.getDefault(Locale.Category.FORMAT))}. * + * @return the {@code NumberFormat} instance for percentage formatting * @see java.util.Locale#getDefault(java.util.Locale.Category) * @see java.util.Locale.Category#FORMAT */ @@ -502,6 +550,9 @@ /** * Returns a percentage format for the specified locale. + * + * @param inLocale the desired locale + * @return the {@code NumberFormat} instance for percentage formatting */ public static NumberFormat getPercentInstance(Locale inLocale) { return getInstance(inLocale, PERCENTSTYLE); @@ -516,6 +567,8 @@ /** * Returns a scientific format for the specified locale. + * + * @param inLocale the desired locale */ /*public*/ static NumberFormat getScientificInstance(Locale inLocale) { return getInstance(inLocale, SCIENTIFICSTYLE); @@ -586,6 +639,9 @@ * English locale, with grouping on, the number 1234567 might be formatted * as "1,234,567". The grouping separator as well as the size of each group * is locale dependant and is determined by sub-classes of NumberFormat. + * + * @return {@code true} if grouping is used; + * {@code false} otherwise * @see #setGroupingUsed */ public boolean isGroupingUsed() { @@ -594,6 +650,9 @@ /** * Set whether or not grouping will be used in this format. + * + * @param newValue {@code true} if grouping is used; + * {@code false} otherwise * @see #isGroupingUsed */ public void setGroupingUsed(boolean newValue) { @@ -603,6 +662,8 @@ /** * Returns the maximum number of digits allowed in the integer portion of a * number. + * + * @return the maximum number of digits * @see #setMaximumIntegerDigits */ public int getMaximumIntegerDigits() { @@ -611,10 +672,11 @@ /** * Sets the maximum number of digits allowed in the integer portion of a - * number. maximumIntegerDigits must be >= minimumIntegerDigits. If the + * number. maximumIntegerDigits must be ≥ minimumIntegerDigits. If the * new value for maximumIntegerDigits is less than the current value * of minimumIntegerDigits, then minimumIntegerDigits will also be set to * the new value. + * * @param newValue the maximum number of integer digits to be shown; if * less than zero, then zero is used. The concrete subclass may enforce an * upper limit to this value appropriate to the numeric type being formatted. @@ -630,6 +692,8 @@ /** * Returns the minimum number of digits allowed in the integer portion of a * number. + * + * @return the minimum number of digits * @see #setMinimumIntegerDigits */ public int getMinimumIntegerDigits() { @@ -638,10 +702,11 @@ /** * Sets the minimum number of digits allowed in the integer portion of a - * number. minimumIntegerDigits must be <= maximumIntegerDigits. If the + * number. minimumIntegerDigits must be ≤ maximumIntegerDigits. If the * new value for minimumIntegerDigits exceeds the current value * of maximumIntegerDigits, then maximumIntegerDigits will also be set to * the new value + * * @param newValue the minimum number of integer digits to be shown; if * less than zero, then zero is used. The concrete subclass may enforce an * upper limit to this value appropriate to the numeric type being formatted. @@ -657,6 +722,8 @@ /** * Returns the maximum number of digits allowed in the fraction portion of a * number. + * + * @return the maximum number of digits. * @see #setMaximumFractionDigits */ public int getMaximumFractionDigits() { @@ -665,10 +732,11 @@ /** * Sets the maximum number of digits allowed in the fraction portion of a - * number. maximumFractionDigits must be >= minimumFractionDigits. If the + * number. maximumFractionDigits must be ≥ minimumFractionDigits. If the * new value for maximumFractionDigits is less than the current value * of minimumFractionDigits, then minimumFractionDigits will also be set to * the new value. + * * @param newValue the maximum number of fraction digits to be shown; if * less than zero, then zero is used. The concrete subclass may enforce an * upper limit to this value appropriate to the numeric type being formatted. @@ -684,6 +752,8 @@ /** * Returns the minimum number of digits allowed in the fraction portion of a * number. + * + * @return the minimum number of digits * @see #setMinimumFractionDigits */ public int getMinimumFractionDigits() { @@ -692,10 +762,11 @@ /** * Sets the minimum number of digits allowed in the fraction portion of a - * number. minimumFractionDigits must be <= maximumFractionDigits. If the + * number. minimumFractionDigits must be ≤ maximumFractionDigits. If the * new value for minimumFractionDigits exceeds the current value * of maximumFractionDigits, then maximumIntegerDigits will also be set to * the new value + * * @param newValue the minimum number of fraction digits to be shown; if * less than zero, then zero is used. The concrete subclass may enforce an * upper limit to this value appropriate to the numeric type being formatted. diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/ParseException.java --- a/jdk/src/share/classes/java/text/ParseException.java Thu Jul 25 20:03:20 2013 -0700 +++ b/jdk/src/share/classes/java/text/ParseException.java Fri Jul 26 17:22:08 2013 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -55,6 +55,7 @@ * Constructs a ParseException with the specified detail message and * offset. * A detail message is a String that describes this particular exception. + * * @param s the detail message * @param errorOffset the position where the error is found while parsing. */ @@ -65,6 +66,8 @@ /** * Returns the position where the error was found. + * + * @return the position where the error was found */ public int getErrorOffset () { return errorOffset; diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/ParsePosition.java --- a/jdk/src/share/classes/java/text/ParsePosition.java Thu Jul 25 20:03:20 2013 -0700 +++ b/jdk/src/share/classes/java/text/ParsePosition.java Fri Jul 26 17:22:08 2013 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2002, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -69,6 +69,8 @@ * Retrieve the current parse position. On input to a parse method, this * is the index of the character at which parsing will begin; on output, it * is the index of the character following the last character parsed. + * + * @return the current parse position */ public int getIndex() { return index; @@ -76,6 +78,8 @@ /** * Set the current parse position. + * + * @param index the current parse position */ public void setIndex(int index) { this.index = index; @@ -83,6 +87,8 @@ /** * Create a new ParsePosition with the given initial index. + * + * @param index initial index */ public ParsePosition(int index) { this.index = index; @@ -91,6 +97,8 @@ * Set the index at which a parse error occurred. Formatters * should set this before returning an error code from their * parseObject method. The default value is -1 if this is not set. + * + * @param ei the index at which an error occurred * @since 1.2 */ public void setErrorIndex(int ei) @@ -101,12 +109,15 @@ /** * Retrieve the index at which an error occurred, or -1 if the * error index has not been set. + * + * @return the index at which an error occurred * @since 1.2 */ public int getErrorIndex() { return errorIndex; } + /** * Overrides equals */ diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/RuleBasedCollator.java --- a/jdk/src/share/classes/java/text/RuleBasedCollator.java Thu Jul 25 20:03:20 2013 -0700 +++ b/jdk/src/share/classes/java/text/RuleBasedCollator.java Fri Jul 26 17:22:08 2013 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, 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 @@ -68,17 +68,17 @@ * <reset> <text-argument> * * The definitions of the rule elements is as follows: - *
+ *
*
- Text-Argument: A text-argument is any sequence of * characters, excluding special characters (that is, common * whitespace characters [0009-000D, 0020] and rule syntax characters * [0021-002F, 003A-0040, 005B-0060, 007B-007E]). If those * characters are desired, you can put them in single quotes - * (e.g. ampersand => '&'). Note that unquoted white space characters + * (e.g. ampersand => '&'). Note that unquoted white space characters * are ignored; e.g.
b c
is treated asbc
. *- Modifier: There are currently two modifiers that * turn on special collation rules. - *
+ *
*
*- '@' : Turns on backwards sorting of accents (secondary * differences), as in French. *
- '!' : Turns on Thai/Lao vowel-consonant swapping. If this @@ -91,7 +91,7 @@ *
'@' : Indicates that accents are sorted backwards, as in French. *
- Relation: The relations are the following: - *
+ *
*
* @@ -166,7 +166,7 @@ *- '<' : Greater, as a letter difference (primary) *
- ';' : Greater, as an accent difference (secondary) *
- ',' : Greater, as a case difference (tertiary) @@ -100,7 +100,7 @@ *
- Reset: There is a single reset * which is used primarily for contractions and expansions, but which * can also be used to add a modification at the end of a set of rules. - *
'&' : Indicates that the next rule follows the position to where + *
'&' : Indicates that the next rule follows the position to where * the reset text-argument would be sorted. *
Errors *
* The following are errors: - *
+ *
*
- A text-argument contains unquoted punctuation symbols * (e.g. "a < b-c < d"). *
- A relation or reset character not followed by a text-argument @@ -206,8 +206,8 @@ * String Norwegian = "< a, A < b, B < c, C < d, D < e, E < f, F < g, G < h, H < i, I" + * "< j, J < k, K < l, L < m, M < n, N < o, O < p, P < q, Q < r, R" + * "< s, S < t, T < u, U < v, V < w, W < x, X < y, Y < z, Z" + - * "< \u00E6, \u00C6" + // Latin letter ae & AE - * "< \u00F8, \u00D8" + // Latin letter o & O with stroke + * "< \u00E6, \u00C6" + // Latin letter ae & AE + * "< \u00F8, \u00D8" + // Latin letter o & O with stroke * "< \u00E5 = a\u030A," + // Latin letter a with ring above * " \u00C5 = A\u030A;" + // Latin letter A with ring above * " aa, AA"; @@ -232,9 +232,9 @@ * + ";\u030B;\u030C;\u030D;\u030E" // main accents * + ";\u030F;\u0310;\u0311;\u0312" // main accents * + "< a , A ; ae, AE ; \u00e6 , \u00c6" - * + "< b , B < c, C < e, E & C < d, D"; + * + "< b , B < c, C < e, E & C < d, D"; * // change the order of accent characters - * String addOn = "& \u0300 ; \u0308 ; \u0302"; + * String addOn = "& \u0300 ; \u0308 ; \u0302"; * RuleBasedCollator myCollator = new RuleBasedCollator(oldRules + addOn); * * @@ -274,7 +274,7 @@ * @param rules the collation rules to build the collation table from. * @exception 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 + * example, build rule "a < ? < d" will cause the constructor to * throw the ParseException because the '?' is not quoted. */ public RuleBasedCollator(String rules) throws ParseException { @@ -320,7 +320,10 @@ } /** - * Return a CollationElementIterator for the given String. + * Returns a CollationElementIterator for the given String. + * + * @param source the string to be collated + * @return a {@code CollationElementIterator} object * @see java.text.CollationElementIterator */ public CollationElementIterator getCollationElementIterator(String source) { @@ -328,7 +331,10 @@ } /** - * Return a CollationElementIterator for the given String. + * Returns a CollationElementIterator for the given CharacterIterator. + * + * @param source the character iterator to be collated + * @return a {@code CollationElementIterator} object * @see java.text.CollationElementIterator * @since 1.2 */ diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/SimpleDateFormat.java --- a/jdk/src/share/classes/java/text/SimpleDateFormat.java Thu Jul 25 20:03:20 2013 -0700 +++ b/jdk/src/share/classes/java/text/SimpleDateFormat.java Fri Jul 26 17:22:08 2013 +0900 @@ -59,7 +59,7 @@ /** *
SimpleDateFormat
is a concrete class for formatting and * parsing dates in a locale-sensitive manner. It allows for formatting - * (date -> text), parsing (text -> date), and normalization. + * (date → text), parsing (text → date), and normalization. * **
SimpleDateFormat
allows you to start by choosing @@ -73,7 +73,7 @@ * For more information on using these methods, see * {@link DateFormat}. * - *Date and Time Patterns
+ *Date and Time Patterns
** Date and time formats are specified by date and time pattern * strings. @@ -93,7 +93,7 @@ *
'z'
are reserved): **- *
+ * * Letter * Date or Time Component * Presentation @@ -103,7 +103,7 @@ * Era designator * Text * AD
- *+ * * y
*Year * Year @@ -113,7 +113,7 @@ * Week year * Year * 2009
;09
- *+ * * M
*Month in year (context sensitive) * Month @@ -123,7 +123,7 @@ * Month in year (standalone form) * Month * July
;Jul
;07
- *+ * * w
*Week in year * Number @@ -133,7 +133,7 @@ * Week in month * Number * 2
- *+ * * D
*Day in year * Number @@ -143,7 +143,7 @@ * Day in month * Number * 10
- *+ * * F
*Day of week in month * Number @@ -153,7 +153,7 @@ * Day name in week * Text * Tuesday
;Tue
- *+ * * u
*Day number of week (1 = Monday, ..., 7 = Sunday) * Number @@ -163,7 +163,7 @@ * Am/pm marker * Text * PM
- *+ * * H
*Hour in day (0-23) * Number @@ -173,7 +173,7 @@ * Hour in day (1-24) * Number * 24
- *+ * * K
*Hour in am/pm (0-11) * Number @@ -183,7 +183,7 @@ * Hour in am/pm (1-12) * Number * 12
- *+ * * m
*Minute in hour * Number @@ -193,7 +193,7 @@ * Second in minute * Number * 55
- *+ * * S
*Millisecond * Number @@ -203,7 +203,7 @@ * Time zone * General time zone * Pacific Standard Time
;PST
;GMT-08:00
- *+ * * Z
*Time zone * RFC 822 time zone @@ -365,37 +365,37 @@ * in the U.S. Pacific Time time zone. * *- *
+ * * Date and Time Pattern * Result * * "yyyy.MM.dd G 'at' HH:mm:ss z"
*2001.07.04 AD at 12:08:56 PDT
- *+ * * "EEE, MMM d, ''yy"
*Wed, Jul 4, '01
** "h:mm a"
*12:08 PM
- *+ * * "hh 'o''clock' a, zzzz"
*12 o'clock PM, Pacific Daylight Time
** "K:mm a, z"
*0:08 PM, PDT
- *+ * * "yyyyy.MMMMM.dd GGG hh:mm aaa"
*02001.July.04 AD 12:08 PM
** "EEE, d MMM yyyy HH:mm:ss Z"
*Wed, 4 Jul 2001 12:08:56 -0700
- *+ * * "yyMMddHHmmssZ"
*010704120856-0700
** "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
*2001-07-04T12:08:56.235-0700
- *+ * * "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"
*2001-07-04T12:08:56.235-07:00
*diff -r 69648476a89e -r a64012cb49d6 jdk/src/share/classes/java/text/StringCharacterIterator.java --- a/jdk/src/share/classes/java/text/StringCharacterIterator.java Thu Jul 25 20:03:20 2013 -0700 +++ b/jdk/src/share/classes/java/text/StringCharacterIterator.java Fri Jul 26 17:22:08 2013 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, 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 @@ -59,6 +59,8 @@ /** * Constructs an iterator with an initial index of 0. + * + * @param text the {@code String} to be iterated over */ public StringCharacterIterator(String text) {