8231186: Replace html tag <code>foo</code> with javadoc tag {@code foo} in java.base

Minor coding style update of javadoc tag in any file in java.base

Reviewed-by: bchristi, lancea
This commit is contained in:
Julia Boes 2019-09-24 09:43:43 +01:00
parent 13d0bac294
commit d15a57b842
139 changed files with 3499 additions and 3499 deletions

File diff suppressed because it is too large Load diff

View file

@ -107,7 +107,7 @@ public class ConcurrentModificationException extends RuntimeException {
* Constructs a new exception with the specified detail message and
* cause.
*
* <p>Note that the detail message associated with <code>cause</code> is
* <p>Note that the detail message associated with {@code cause} is
* <i>not</i> automatically incorporated in this exception's detail
* message.
*

View file

@ -55,9 +55,9 @@ import sun.util.logging.PlatformLogger;
* ISO web site</a> for more information.
* <p>
* The class is designed so that there's never more than one
* <code>Currency</code> instance for any given currency. Therefore, there's
* no public constructor. You obtain a <code>Currency</code> instance using
* the <code>getInstance</code> methods.
* {@code Currency} instance for any given currency. Therefore, there's
* no public constructor. You obtain a {@code Currency} instance using
* the {@code getInstance} methods.
* <p>
* Users can supersede the Java runtime currency data by means of the system
* property {@systemProperty java.util.currency.data}. If this system property is
@ -274,7 +274,7 @@ public final class Currency implements Serializable {
/**
* Constructs a <code>Currency</code> instance. The constructor is private
* Constructs a {@code Currency} instance. The constructor is private
* so that we can insure that there's never more than one instance for a
* given currency.
*/
@ -285,12 +285,12 @@ public final class Currency implements Serializable {
}
/**
* Returns the <code>Currency</code> instance for the given currency code.
* Returns the {@code Currency} instance for the given currency code.
*
* @param currencyCode the ISO 4217 code of the currency
* @return the <code>Currency</code> instance for the given currency code
* @throws NullPointerException if <code>currencyCode</code> is null
* @throws IllegalArgumentException if <code>currencyCode</code> is not
* @return the {@code Currency} instance for the given currency code
* @throws NullPointerException if {@code currencyCode} is null
* @throws IllegalArgumentException if {@code currencyCode} is not
* a supported ISO 4217 code.
*/
public static Currency getInstance(String currencyCode) {
@ -350,7 +350,7 @@ public final class Currency implements Serializable {
}
/**
* Returns the <code>Currency</code> instance for the country of the
* Returns the {@code Currency} instance for the country of the
* given locale. The language and variant components of the locale
* are ignored. The result may vary over time, as countries change their
* currencies. For example, for the original member countries of the
@ -365,14 +365,14 @@ public final class Currency implements Serializable {
* specified, the currency from the "cu" extension supersedes the implicit one
* from the "rg" extension.
* <p>
* The method returns <code>null</code> for territories that don't
* The method returns {@code null} for territories that don't
* have a currency, such as Antarctica.
*
* @param locale the locale for whose country a <code>Currency</code>
* @param locale the locale for whose country a {@code Currency}
* instance is needed
* @return the <code>Currency</code> instance for the country of the given
* @return the {@code Currency} instance for the country of the given
* locale, or {@code null}
* @throws NullPointerException if <code>locale</code>
* @throws NullPointerException if {@code locale}
* is {@code null}
* @throws IllegalArgumentException if the country of the given {@code locale}
* is not a supported ISO 3166 country code.
@ -537,7 +537,7 @@ public final class Currency implements Serializable {
* @param locale the locale for which a display name for this currency is
* needed
* @return the symbol of this currency for the specified locale
* @throws NullPointerException if <code>locale</code> is null
* @throws NullPointerException if {@code locale} is null
*/
public String getSymbol(Locale locale) {
LocaleServiceProviderPool pool =
@ -632,7 +632,7 @@ public final class Currency implements Serializable {
* @param locale the locale for which a display name for this currency is
* needed
* @return the display name of this currency for the specified locale
* @throws NullPointerException if <code>locale</code> is null
* @throws NullPointerException if {@code locale} is null
* @since 1.7
*/
public String getDisplayName(Locale locale) {

View file

@ -53,11 +53,11 @@ import sun.util.calendar.JulianCalendar;
import sun.util.calendar.ZoneInfo;
/**
* <code>GregorianCalendar</code> is a concrete subclass of
* <code>Calendar</code> and provides the standard calendar system
* {@code GregorianCalendar} is a concrete subclass of
* {@code Calendar} and provides the standard calendar system
* used by most of the world.
*
* <p> <code>GregorianCalendar</code> is a hybrid calendar that
* <p> {@code GregorianCalendar} is a hybrid calendar that
* supports both the Julian and Gregorian calendar systems with the
* support of a single discontinuity, which corresponds by default to
* the Gregorian date when the Gregorian calendar was instituted
@ -68,19 +68,19 @@ import sun.util.calendar.ZoneInfo;
* <p>
* Historically, in those countries which adopted the Gregorian calendar first,
* October 4, 1582 (Julian) was thus followed by October 15, 1582 (Gregorian). This calendar models
* this correctly. Before the Gregorian cutover, <code>GregorianCalendar</code>
* this correctly. Before the Gregorian cutover, {@code GregorianCalendar}
* implements the Julian calendar. The only difference between the Gregorian
* and the Julian calendar is the leap year rule. The Julian calendar specifies
* leap years every four years, whereas the Gregorian calendar omits century
* years which are not divisible by 400.
*
* <p>
* <code>GregorianCalendar</code> implements <em>proleptic</em> Gregorian and
* {@code GregorianCalendar} implements <em>proleptic</em> Gregorian and
* Julian calendars. That is, dates are computed by extrapolating the current
* rules indefinitely far backward and forward in time. As a result,
* <code>GregorianCalendar</code> may be used for all years to generate
* {@code GregorianCalendar} may be used for all years to generate
* meaningful and consistent results. However, dates obtained using
* <code>GregorianCalendar</code> are historically accurate only from March 1, 4
* {@code GregorianCalendar} are historically accurate only from March 1, 4
* AD onward, when modern Julian calendar rules were adopted. Before this date,
* leap year rules were applied irregularly, and before 45 BC the Julian
* calendar did not even exist.
@ -135,28 +135,28 @@ import sun.util.calendar.ZoneInfo;
*
* <h3>Week Of Month</h3>
*
* <p>Values calculated for the <code>WEEK_OF_MONTH</code> field range from 0
* <p>Values calculated for the {@code WEEK_OF_MONTH} field range from 0
* to 6. Week 1 of a month (the days with <code>WEEK_OF_MONTH =
* 1</code>) is the earliest set of at least
* <code>getMinimalDaysInFirstWeek()</code> contiguous days in that month,
* ending on the day before <code>getFirstDayOfWeek()</code>. Unlike
* {@code getMinimalDaysInFirstWeek()} contiguous days in that month,
* ending on the day before {@code getFirstDayOfWeek()}. Unlike
* week 1 of a year, week 1 of a month may be shorter than 7 days, need
* not start on <code>getFirstDayOfWeek()</code>, and will not include days of
* not start on {@code getFirstDayOfWeek()}, and will not include days of
* the previous month. Days of a month before week 1 have a
* <code>WEEK_OF_MONTH</code> of 0.
* {@code WEEK_OF_MONTH} of 0.
*
* <p>For example, if <code>getFirstDayOfWeek()</code> is <code>SUNDAY</code>
* and <code>getMinimalDaysInFirstWeek()</code> is 4, then the first week of
* <p>For example, if {@code getFirstDayOfWeek()} is {@code SUNDAY}
* and {@code getMinimalDaysInFirstWeek()} is 4, then the first week of
* January 1998 is Sunday, January 4 through Saturday, January 10. These days
* have a <code>WEEK_OF_MONTH</code> of 1. Thursday, January 1 through
* Saturday, January 3 have a <code>WEEK_OF_MONTH</code> of 0. If
* <code>getMinimalDaysInFirstWeek()</code> is changed to 3, then January 1
* through January 3 have a <code>WEEK_OF_MONTH</code> of 1.
* have a {@code WEEK_OF_MONTH} of 1. Thursday, January 1 through
* Saturday, January 3 have a {@code WEEK_OF_MONTH} of 0. If
* {@code getMinimalDaysInFirstWeek()} is changed to 3, then January 1
* through January 3 have a {@code WEEK_OF_MONTH} of 1.
*
* <h3>Default Fields Values</h3>
*
* <p>The <code>clear</code> method sets calendar field(s)
* undefined. <code>GregorianCalendar</code> uses the following
* <p>The {@code clear} method sets calendar field(s)
* undefined. {@code GregorianCalendar} uses the following
* default value for each calendar field if its value is undefined.
*
* <table class="striped" style="text-align: left; width: 66%;">
@ -174,74 +174,74 @@ import sun.util.calendar.ZoneInfo;
* <tbody>
* <tr>
* <th scope="row">
* <code>ERA</code>
* {@code ERA}
* </th>
* <td>
* <code>AD</code>
* {@code AD}
* </td>
* </tr>
* <tr>
* <th scope="row">
* <code>YEAR</code>
* {@code YEAR}
* </th>
* <td>
* <code>1970</code>
* {@code 1970}
* </td>
* </tr>
* <tr>
* <th scope="row">
* <code>MONTH</code>
* {@code MONTH}
* </th>
* <td>
* <code>JANUARY</code>
* {@code JANUARY}
* </td>
* </tr>
* <tr>
* <th scope="row">
* <code>DAY_OF_MONTH</code>
* {@code DAY_OF_MONTH}
* </th>
* <td>
* <code>1</code>
* {@code 1}
* </td>
* </tr>
* <tr>
* <th scope="row">
* <code>DAY_OF_WEEK</code>
* {@code DAY_OF_WEEK}
* </th>
* <td>
* <code>the first day of week</code>
* {@code the first day of week}
* </td>
* </tr>
* <tr>
* <th scope="row">
* <code>WEEK_OF_MONTH</code>
* {@code WEEK_OF_MONTH}
* </th>
* <td>
* <code>0</code>
* {@code 0}
* </td>
* </tr>
* <tr>
* <th scope="row">
* <code>DAY_OF_WEEK_IN_MONTH</code>
* {@code DAY_OF_WEEK_IN_MONTH}
* </th>
* <td>
* <code>1</code>
* {@code 1}
* </td>
* </tr>
* <tr>
* <th scope="row">
* <code>AM_PM</code>
* {@code AM_PM}
* </th>
* <td>
* <code>AM</code>
* {@code AM}
* </td>
* </tr>
* <tr>
* <th scope="row">
* <code>HOUR, HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND</code>
* {@code HOUR, HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND}
* </th>
* <td>
* <code>0</code>
* {@code 0}
* </td>
* </tr>
* </tbody>
@ -360,9 +360,9 @@ public class GregorianCalendar extends Calendar {
//////////////////
/**
* Value of the <code>ERA</code> field indicating
* Value of the {@code ERA} field indicating
* the period before the common era (before Christ), also known as BCE.
* The sequence of years at the transition from <code>BC</code> to <code>AD</code> is
* The sequence of years at the transition from {@code BC} to {@code AD} is
* ..., 2 BC, 1 BC, 1 AD, 2 AD,...
*
* @see #ERA
@ -378,9 +378,9 @@ public class GregorianCalendar extends Calendar {
static final int BCE = 0;
/**
* Value of the <code>ERA</code> field indicating
* Value of the {@code ERA} field indicating
* the common era (Anno Domini), also known as CE.
* The sequence of years at the transition from <code>BC</code> to <code>AD</code> is
* The sequence of years at the transition from {@code BC} to {@code AD} is
* ..., 2 BC, 1 BC, 1 AD, 2 AD,...
*
* @see #ERA
@ -585,7 +585,7 @@ public class GregorianCalendar extends Calendar {
///////////////
/**
* Constructs a default <code>GregorianCalendar</code> using the current time
* Constructs a default {@code GregorianCalendar} using the current time
* in the default time zone with the default
* {@link Locale.Category#FORMAT FORMAT} locale.
*/
@ -595,7 +595,7 @@ public class GregorianCalendar extends Calendar {
}
/**
* Constructs a <code>GregorianCalendar</code> based on the current time
* Constructs a {@code GregorianCalendar} based on the current time
* in the given time zone with the default
* {@link Locale.Category#FORMAT FORMAT} locale.
*
@ -606,7 +606,7 @@ public class GregorianCalendar extends Calendar {
}
/**
* Constructs a <code>GregorianCalendar</code> based on the current time
* Constructs a {@code GregorianCalendar} based on the current time
* in the default time zone with the given locale.
*
* @param aLocale the given locale.
@ -617,7 +617,7 @@ public class GregorianCalendar extends Calendar {
}
/**
* Constructs a <code>GregorianCalendar</code> based on the current time
* Constructs a {@code GregorianCalendar} based on the current time
* in the given time zone with the given locale.
*
* @param zone the given time zone.
@ -630,29 +630,29 @@ public class GregorianCalendar extends Calendar {
}
/**
* Constructs a <code>GregorianCalendar</code> with the given date set
* Constructs a {@code GregorianCalendar} with the given date set
* in the default time zone with the default locale.
*
* @param year the value used to set the <code>YEAR</code> calendar field in the calendar.
* @param month the value used to set the <code>MONTH</code> calendar field in the calendar.
* @param year the value used to set the {@code YEAR} calendar field in the calendar.
* @param month the value used to set the {@code MONTH} calendar field in the calendar.
* Month value is 0-based. e.g., 0 for January.
* @param dayOfMonth the value used to set the <code>DAY_OF_MONTH</code> calendar field in the calendar.
* @param dayOfMonth the value used to set the {@code DAY_OF_MONTH} calendar field in the calendar.
*/
public GregorianCalendar(int year, int month, int dayOfMonth) {
this(year, month, dayOfMonth, 0, 0, 0, 0);
}
/**
* Constructs a <code>GregorianCalendar</code> with the given date
* Constructs a {@code GregorianCalendar} with the given date
* and time set for the default time zone with the default locale.
*
* @param year the value used to set the <code>YEAR</code> calendar field in the calendar.
* @param month the value used to set the <code>MONTH</code> calendar field in the calendar.
* @param year the value used to set the {@code YEAR} calendar field in the calendar.
* @param month the value used to set the {@code MONTH} calendar field in the calendar.
* Month value is 0-based. e.g., 0 for January.
* @param dayOfMonth the value used to set the <code>DAY_OF_MONTH</code> calendar field in the calendar.
* @param hourOfDay the value used to set the <code>HOUR_OF_DAY</code> calendar field
* @param dayOfMonth the value used to set the {@code DAY_OF_MONTH} calendar field in the calendar.
* @param hourOfDay the value used to set the {@code HOUR_OF_DAY} calendar field
* in the calendar.
* @param minute the value used to set the <code>MINUTE</code> calendar field
* @param minute the value used to set the {@code MINUTE} calendar field
* in the calendar.
*/
public GregorianCalendar(int year, int month, int dayOfMonth, int hourOfDay,
@ -664,15 +664,15 @@ public class GregorianCalendar extends Calendar {
* Constructs a GregorianCalendar with the given date
* and time set for the default time zone with the default locale.
*
* @param year the value used to set the <code>YEAR</code> calendar field in the calendar.
* @param month the value used to set the <code>MONTH</code> calendar field in the calendar.
* @param year the value used to set the {@code YEAR} calendar field in the calendar.
* @param month the value used to set the {@code MONTH} calendar field in the calendar.
* Month value is 0-based. e.g., 0 for January.
* @param dayOfMonth the value used to set the <code>DAY_OF_MONTH</code> calendar field in the calendar.
* @param hourOfDay the value used to set the <code>HOUR_OF_DAY</code> calendar field
* @param dayOfMonth the value used to set the {@code DAY_OF_MONTH} calendar field in the calendar.
* @param hourOfDay the value used to set the {@code HOUR_OF_DAY} calendar field
* in the calendar.
* @param minute the value used to set the <code>MINUTE</code> calendar field
* @param minute the value used to set the {@code MINUTE} calendar field
* in the calendar.
* @param second the value used to set the <code>SECOND</code> calendar field
* @param second the value used to set the {@code SECOND} calendar field
* in the calendar.
*/
public GregorianCalendar(int year, int month, int dayOfMonth, int hourOfDay,
@ -681,20 +681,20 @@ public class GregorianCalendar extends Calendar {
}
/**
* Constructs a <code>GregorianCalendar</code> with the given date
* Constructs a {@code GregorianCalendar} with the given date
* and time set for the default time zone with the default locale.
*
* @param year the value used to set the <code>YEAR</code> calendar field in the calendar.
* @param month the value used to set the <code>MONTH</code> calendar field in the calendar.
* @param year the value used to set the {@code YEAR} calendar field in the calendar.
* @param month the value used to set the {@code MONTH} calendar field in the calendar.
* Month value is 0-based. e.g., 0 for January.
* @param dayOfMonth the value used to set the <code>DAY_OF_MONTH</code> calendar field in the calendar.
* @param hourOfDay the value used to set the <code>HOUR_OF_DAY</code> calendar field
* @param dayOfMonth the value used to set the {@code DAY_OF_MONTH} calendar field in the calendar.
* @param hourOfDay the value used to set the {@code HOUR_OF_DAY} calendar field
* in the calendar.
* @param minute the value used to set the <code>MINUTE</code> calendar field
* @param minute the value used to set the {@code MINUTE} calendar field
* in the calendar.
* @param second the value used to set the <code>SECOND</code> calendar field
* @param second the value used to set the {@code SECOND} calendar field
* in the calendar.
* @param millis the value used to set the <code>MILLISECOND</code> calendar field
* @param millis the value used to set the {@code MILLISECOND} calendar field
*/
GregorianCalendar(int year, int month, int dayOfMonth,
int hourOfDay, int minute, int second, int millis) {
@ -745,13 +745,13 @@ public class GregorianCalendar extends Calendar {
/////////////////
/**
* Sets the <code>GregorianCalendar</code> change date. This is the point when the switch
* Sets the {@code GregorianCalendar} change date. This is the point when the switch
* from Julian dates to Gregorian dates occurred. Default is October 15,
* 1582 (Gregorian). Previous to this, dates will be in the Julian calendar.
* <p>
* To obtain a pure Julian calendar, set the change date to
* <code>Date(Long.MAX_VALUE)</code>. To obtain a pure Gregorian calendar,
* set the change date to <code>Date(Long.MIN_VALUE)</code>.
* {@code Date(Long.MAX_VALUE)}. To obtain a pure Gregorian calendar,
* set the change date to {@code Date(Long.MIN_VALUE)}.
*
* @param date the given Gregorian cutover date.
*/
@ -803,20 +803,20 @@ public class GregorianCalendar extends Calendar {
* October 15, 1582 (Gregorian). Previous to this, dates will be in the Julian
* calendar.
*
* @return the Gregorian cutover date for this <code>GregorianCalendar</code> object.
* @return the Gregorian cutover date for this {@code GregorianCalendar} object.
*/
public final Date getGregorianChange() {
return new Date(gregorianCutover);
}
/**
* Determines if the given year is a leap year. Returns <code>true</code> if
* Determines if the given year is a leap year. Returns {@code true} if
* the given year is a leap year. To specify BC year numbers,
* <code>1 - year number</code> must be given. For example, year BC 4 is
* {@code 1 - year number} must be given. For example, year BC 4 is
* specified as -3.
*
* @param year the given year.
* @return <code>true</code> if the given year is a leap year; <code>false</code> otherwise.
* @return {@code true} if the given year is a leap year; {@code false} otherwise.
*/
public boolean isLeapYear(int year) {
if ((year & 3) != 0) {
@ -853,17 +853,17 @@ public class GregorianCalendar extends Calendar {
}
/**
* Compares this <code>GregorianCalendar</code> to the specified
* <code>Object</code>. The result is <code>true</code> if and
* only if the argument is a <code>GregorianCalendar</code> object
* Compares this {@code GregorianCalendar} to the specified
* {@code Object}. The result is {@code true} if and
* only if the argument is a {@code GregorianCalendar} object
* that represents the same time value (millisecond offset from
* the <a href="Calendar.html#Epoch">Epoch</a>) under the same
* <code>Calendar</code> parameters and Gregorian change date as
* {@code Calendar} parameters and Gregorian change date as
* this object.
*
* @param obj the object to compare with.
* @return <code>true</code> if this object is equal to <code>obj</code>;
* <code>false</code> otherwise.
* @return {@code true} if this object is equal to {@code obj};
* {@code false} otherwise.
* @see Calendar#compareTo(Calendar)
*/
@Override
@ -874,7 +874,7 @@ public class GregorianCalendar extends Calendar {
}
/**
* Generates the hash code for this <code>GregorianCalendar</code> object.
* Generates the hash code for this {@code GregorianCalendar} object.
*/
@Override
public int hashCode() {
@ -885,27 +885,27 @@ public class GregorianCalendar extends Calendar {
* Adds the specified (signed) amount of time to the given calendar field,
* based on the calendar's rules.
*
* <p><em>Add rule 1</em>. The value of <code>field</code>
* after the call minus the value of <code>field</code> before the
* call is <code>amount</code>, modulo any overflow that has occurred in
* <code>field</code>. Overflow occurs when a field value exceeds its
* <p><em>Add rule 1</em>. The value of {@code field}
* after the call minus the value of {@code field} before the
* call is {@code amount}, modulo any overflow that has occurred in
* {@code field}. Overflow occurs when a field value exceeds its
* range and, as a result, the next larger field is incremented or
* decremented and the field value is adjusted back into its range.</p>
*
* <p><em>Add rule 2</em>. If a smaller field is expected to be
* invariant, but it is impossible for it to be equal to its
* prior value because of changes in its minimum or maximum after
* <code>field</code> is changed, then its value is adjusted to be as close
* {@code field} is changed, then its value is adjusted to be as close
* as possible to its expected value. A smaller field represents a
* smaller unit of time. <code>HOUR</code> is a smaller field than
* <code>DAY_OF_MONTH</code>. No adjustment is made to smaller fields
* smaller unit of time. {@code HOUR} is a smaller field than
* {@code DAY_OF_MONTH}. No adjustment is made to smaller fields
* that are not expected to be invariant. The calendar system
* determines what fields are expected to be invariant.</p>
*
* @param field the calendar field.
* @param amount the amount of date or time to be added to the field.
* @throws IllegalArgumentException if <code>field</code> is
* <code>ZONE_OFFSET</code>, <code>DST_OFFSET</code>, or unknown,
* @throws IllegalArgumentException if {@code field} is
* {@code ZONE_OFFSET}, {@code DST_OFFSET}, or unknown,
* or if any calendar fields have out-of-range values in
* non-lenient mode.
*/
@ -1094,15 +1094,15 @@ public class GregorianCalendar extends Calendar {
* Adds or subtracts (up/down) a single unit of time on the given time
* field without changing larger fields.
* <p>
* <em>Example</em>: Consider a <code>GregorianCalendar</code>
* <em>Example</em>: Consider a {@code GregorianCalendar}
* originally set to December 31, 1999. Calling {@link #roll(int,boolean) roll(Calendar.MONTH, true)}
* sets the calendar to January 31, 1999. The <code>YEAR</code> field is unchanged
* because it is a larger field than <code>MONTH</code>.</p>
* sets the calendar to January 31, 1999. The {@code YEAR} field is unchanged
* because it is a larger field than {@code MONTH}.</p>
*
* @param up indicates if the value of the specified calendar field is to be
* rolled up or rolled down. Use <code>true</code> if rolling up, <code>false</code> otherwise.
* @throws IllegalArgumentException if <code>field</code> is
* <code>ZONE_OFFSET</code>, <code>DST_OFFSET</code>, or unknown,
* rolled up or rolled down. Use {@code true} if rolling up, {@code false} otherwise.
* @throws IllegalArgumentException if {@code field} is
* {@code ZONE_OFFSET}, {@code DST_OFFSET}, or unknown,
* or if any calendar fields have out-of-range values in
* non-lenient mode.
* @see #add(int,int)
@ -1121,35 +1121,35 @@ public class GregorianCalendar extends Calendar {
* <p>This method calls {@link #complete()} before adding the
* amount so that all the calendar fields are normalized. If there
* is any calendar field having an out-of-range value in non-lenient mode, then an
* <code>IllegalArgumentException</code> is thrown.
* {@code IllegalArgumentException} is thrown.
*
* <p>
* <em>Example</em>: Consider a <code>GregorianCalendar</code>
* <em>Example</em>: Consider a {@code GregorianCalendar}
* originally set to August 31, 1999. Calling <code>roll(Calendar.MONTH,
* 8)</code> sets the calendar to April 30, <strong>1999</strong>. Using a
* <code>GregorianCalendar</code>, the <code>DAY_OF_MONTH</code> field cannot
* be 31 in the month April. <code>DAY_OF_MONTH</code> is set to the closest possible
* value, 30. The <code>YEAR</code> field maintains the value of 1999 because it
* is a larger field than <code>MONTH</code>.
* {@code GregorianCalendar}, the {@code DAY_OF_MONTH} field cannot
* be 31 in the month April. {@code DAY_OF_MONTH} is set to the closest possible
* value, 30. The {@code YEAR} field maintains the value of 1999 because it
* is a larger field than {@code MONTH}.
* <p>
* <em>Example</em>: Consider a <code>GregorianCalendar</code>
* <em>Example</em>: Consider a {@code GregorianCalendar}
* originally set to Sunday June 6, 1999. Calling
* <code>roll(Calendar.WEEK_OF_MONTH, -1)</code> sets the calendar to
* {@code roll(Calendar.WEEK_OF_MONTH, -1)} sets the calendar to
* Tuesday June 1, 1999, whereas calling
* <code>add(Calendar.WEEK_OF_MONTH, -1)</code> sets the calendar to
* {@code add(Calendar.WEEK_OF_MONTH, -1)} sets the calendar to
* Sunday May 30, 1999. This is because the roll rule imposes an
* additional constraint: The <code>MONTH</code> must not change when the
* <code>WEEK_OF_MONTH</code> is rolled. Taken together with add rule 1,
* additional constraint: The {@code MONTH} must not change when the
* {@code WEEK_OF_MONTH} is rolled. Taken together with add rule 1,
* the resultant date must be between Tuesday June 1 and Saturday June
* 5. According to add rule 2, the <code>DAY_OF_WEEK</code>, an invariant
* when changing the <code>WEEK_OF_MONTH</code>, is set to Tuesday, the
* 5. According to add rule 2, the {@code DAY_OF_WEEK}, an invariant
* when changing the {@code WEEK_OF_MONTH}, is set to Tuesday, the
* closest possible value to Sunday (where Sunday is the first day of the
* week).</p>
*
* @param field the calendar field.
* @param amount the signed amount to add to <code>field</code>.
* @throws IllegalArgumentException if <code>field</code> is
* <code>ZONE_OFFSET</code>, <code>DST_OFFSET</code>, or unknown,
* @param amount the signed amount to add to {@code field}.
* @throws IllegalArgumentException if {@code field} is
* {@code ZONE_OFFSET}, {@code DST_OFFSET}, or unknown,
* or if any calendar fields have out-of-range values in
* non-lenient mode.
* @see #roll(int,boolean)
@ -1512,7 +1512,7 @@ public class GregorianCalendar extends Calendar {
/**
* Returns the minimum value for the given calendar field of this
* <code>GregorianCalendar</code> instance. The minimum value is
* {@code GregorianCalendar} instance. The minimum value is
* defined as the smallest value returned by the {@link
* Calendar#get(int) get} method for any possible time value,
* taking into consideration the current values of the
@ -1536,7 +1536,7 @@ public class GregorianCalendar extends Calendar {
/**
* Returns the maximum value for the given calendar field of this
* <code>GregorianCalendar</code> instance. The maximum value is
* {@code GregorianCalendar} instance. The maximum value is
* defined as the largest value returned by the {@link
* Calendar#get(int) get} method for any possible time value,
* taking into consideration the current values of the
@ -1585,7 +1585,7 @@ public class GregorianCalendar extends Calendar {
/**
* Returns the highest minimum value for the given calendar field
* of this <code>GregorianCalendar</code> instance. The highest
* of this {@code GregorianCalendar} instance. The highest
* minimum value is defined as the largest value returned by
* {@link #getActualMinimum(int)} for any possible time value,
* taking into consideration the current values of the
@ -1615,7 +1615,7 @@ public class GregorianCalendar extends Calendar {
/**
* Returns the lowest maximum value for the given calendar field
* of this <code>GregorianCalendar</code> instance. The lowest
* of this {@code GregorianCalendar} instance. The lowest
* maximum value is defined as the smallest value returned by
* {@link #getActualMaximum(int)} for any possible time value,
* taking into consideration the current values of the
@ -1665,16 +1665,16 @@ public class GregorianCalendar extends Calendar {
* {@link Calendar#getTimeZone() getTimeZone} methods.
*
* <p>For example, if the Gregorian change date is January 10,
* 1970 and the date of this <code>GregorianCalendar</code> is
* 1970 and the date of this {@code GregorianCalendar} is
* January 20, 1970, the actual minimum value of the
* <code>DAY_OF_MONTH</code> field is 10 because the previous date
* {@code DAY_OF_MONTH} field is 10 because the previous date
* of January 10, 1970 is December 27, 1996 (in the Julian
* calendar). Therefore, December 28, 1969 to January 9, 1970
* don't exist.
*
* @param field the calendar field
* @return the minimum of the given field for the time value of
* this <code>GregorianCalendar</code>
* this {@code GregorianCalendar}
* @see #getMinimum(int)
* @see #getMaximum(int)
* @see #getGreatestMinimum(int)
@ -1705,7 +1705,7 @@ public class GregorianCalendar extends Calendar {
* {@link #getGregorianChange() getGregorianChange} and
* {@link Calendar#getTimeZone() getTimeZone} methods.
* For example, if the date of this instance is February 1, 2004,
* the actual maximum value of the <code>DAY_OF_MONTH</code> field
* the actual maximum value of the {@code DAY_OF_MONTH} field
* is 29 because 2004 is a leap year, and if the date of this
* instance is February 1, 2005, it's 28.
*
@ -1718,7 +1718,7 @@ public class GregorianCalendar extends Calendar {
*
* @param field the calendar field
* @return the maximum of the given field for the time value of
* this <code>GregorianCalendar</code>
* this {@code GregorianCalendar}
* @see #getMinimum(int)
* @see #getMaximum(int)
* @see #getGreatestMinimum(int)
@ -2287,7 +2287,7 @@ public class GregorianCalendar extends Calendar {
* href="Calendar.html#Epoch">Epoch</a>) to calendar field values.
* The time is <em>not</em>
* recomputed first; to recompute the time, then the fields, call the
* <code>complete</code> method.
* {@code complete} method.
*
* @see Calendar#complete
*/

View file

@ -47,7 +47,7 @@ public class IllformedLocaleException extends RuntimeException {
private int _errIdx = -1;
/**
* Constructs a new <code>IllformedLocaleException</code> with no
* Constructs a new {@code IllformedLocaleException} with no
* detail message and -1 as the error index.
*/
public IllformedLocaleException() {
@ -55,7 +55,7 @@ public class IllformedLocaleException extends RuntimeException {
}
/**
* Constructs a new <code>IllformedLocaleException</code> with the
* Constructs a new {@code IllformedLocaleException} with the
* given message and -1 as the error index.
*
* @param message the message
@ -65,7 +65,7 @@ public class IllformedLocaleException extends RuntimeException {
}
/**
* Constructs a new <code>IllformedLocaleException</code> with the
* Constructs a new {@code IllformedLocaleException} with the
* given message and the error index. The error index is the approximate
* offset from the start of the ill-formed value to the point where the
* parse first detected an error. A negative error index value indicates

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2016, 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
@ -43,16 +43,16 @@ package java.util;
import sun.util.ResourceBundleEnumeration;
/**
* <code>ListResourceBundle</code> is an abstract subclass of
* <code>ResourceBundle</code> that manages resources for a locale
* in a convenient and easy to use list. See <code>ResourceBundle</code> for
* {@code ListResourceBundle} is an abstract subclass of
* {@code ResourceBundle} that manages resources for a locale
* in a convenient and easy to use list. See {@code ResourceBundle} for
* more information about resource bundles in general.
*
* <P>
* Subclasses must override <code>getContents</code> and provide an array,
* Subclasses must override {@code getContents} and provide an array,
* where each item in the array is a pair of objects.
* The first element of each pair is the key, which must be a
* <code>String</code>, and the second element is the value associated with
* {@code String}, and the second element is the value associated with
* that key.
*
* <p>
@ -60,7 +60,7 @@ import sun.util.ResourceBundleEnumeration;
* bundle family with the base name "MyResources".
* "MyResources" is the default member of the bundle family, and
* "MyResources_fr" is the French member.
* These members are based on <code>ListResourceBundle</code>
* These members are based on {@code ListResourceBundle}
* (a related <a href="PropertyResourceBundle.html#sample">example</a> shows
* how you can add a bundle to this family that's based on a properties file).
* The keys in this example are of the form "s1" etc. The actual
@ -136,11 +136,11 @@ public abstract class ListResourceBundle extends ResourceBundle {
}
/**
* Returns an <code>Enumeration</code> of the keys contained in
* this <code>ResourceBundle</code> and its parent bundles.
* Returns an {@code Enumeration} of the keys contained in
* this {@code ResourceBundle} and its parent bundles.
*
* @return an <code>Enumeration</code> of the keys contained in
* this <code>ResourceBundle</code> and its parent bundles.
* @return an {@code Enumeration} of the keys contained in
* this {@code ResourceBundle} and its parent bundles.
* @see #keySet()
*/
public Enumeration<String> getKeys() {
@ -155,11 +155,11 @@ public abstract class ListResourceBundle extends ResourceBundle {
}
/**
* Returns a <code>Set</code> of the keys contained
* <em>only</em> in this <code>ResourceBundle</code>.
* Returns a {@code Set} of the keys contained
* <em>only</em> in this {@code ResourceBundle}.
*
* @return a <code>Set</code> of the keys contained only in this
* <code>ResourceBundle</code>
* @return a {@code Set} of the keys contained only in this
* {@code ResourceBundle}
* @since 1.6
* @see #keySet()
*/
@ -172,12 +172,12 @@ public abstract class ListResourceBundle extends ResourceBundle {
/**
* Returns an array in which each item is a pair of objects in an
* <code>Object</code> array. The first element of each pair is
* the key, which must be a <code>String</code>, and the second
* {@code Object} array. The first element of each pair is
* the key, which must be a {@code String}, and the second
* element is the value associated with that key. See the class
* description for details.
*
* @return an array of an <code>Object</code> array representing a
* @return an array of an {@code Object} array representing a
* key-value pair.
*/
protected abstract Object[][] getContents();

View file

@ -66,9 +66,9 @@ import sun.util.locale.provider.LocaleServiceProviderPool;
import sun.util.locale.provider.TimeZoneNameUtility;
/**
* A <code>Locale</code> object represents a specific geographical, political,
* or cultural region. An operation that requires a <code>Locale</code> to perform
* its task is called <em>locale-sensitive</em> and uses the <code>Locale</code>
* A {@code Locale} object represents a specific geographical, political,
* or cultural region. An operation that requires a {@code Locale} to perform
* its task is called <em>locale-sensitive</em> and uses the {@code Locale}
* to tailor information for the user. For example, displaying a number
* is a locale-sensitive operation&mdash; the number should be formatted
* according to the customs and conventions of the user's native country,
@ -81,7 +81,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* Locale Data Markup Language") BCP 47-compatible extensions for locale data
* exchange.
*
* <p> A <code>Locale</code> object logically consists of the fields
* <p> A {@code Locale} object logically consists of the fields
* described below.
*
* <dl>
@ -93,7 +93,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* alpha-2 code must be used. You can find a full list of valid
* language codes in the IANA Language Subtag Registry (search for
* "Type: language"). The language field is case insensitive, but
* <code>Locale</code> always canonicalizes to lower case.</dd>
* {@code Locale} always canonicalizes to lower case.</dd>
*
* <dd>Well-formed language values have the form
* <code>[a-zA-Z]{2,8}</code>. Note that this is not the full
@ -108,7 +108,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* <dd>ISO 15924 alpha-4 script code. You can find a full list of
* valid script codes in the IANA Language Subtag Registry (search
* for "Type: script"). The script field is case insensitive, but
* <code>Locale</code> always canonicalizes to title case (the first
* {@code Locale} always canonicalizes to title case (the first
* letter is upper case and the rest of the letters are lower
* case).</dd>
*
@ -123,7 +123,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* You can find a full list of valid country and region codes in the
* IANA Language Subtag Registry (search for "Type: region"). The
* country (region) field is case insensitive, but
* <code>Locale</code> always canonicalizes to upper case.</dd>
* {@code Locale} always canonicalizes to upper case.</dd>
*
* <dd>Well-formed country/region values have
* the form <code>[a-zA-Z]{2} | [0-9]{3}</code></dd>
@ -134,7 +134,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* <dt><a id="def_variant"><b>variant</b></a></dt>
*
* <dd>Any arbitrary value used to indicate a variation of a
* <code>Locale</code>. Where there are two or more variant values
* {@code Locale}. Where there are two or more variant values
* each indicating its own semantics, these values should be ordered
* by importance, with most important first, separated by
* underscore('_'). The variant field is case sensitive.</dd>
@ -146,7 +146,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* region subtags. You can find a full list of valid variant codes
* in the IANA Language Subtag Registry (search for "Type: variant").
*
* <p>However, the variant field in <code>Locale</code> has
* <p>However, the variant field in {@code Locale} has
* historically been used for any kind of variation, not just
* language variations. For example, some supported variants
* available in Java SE Runtime Environments indicate alternative
@ -166,15 +166,15 @@ import sun.util.locale.provider.TimeZoneNameUtility;
*
* <dd>A map from single character keys to string values, indicating
* extensions apart from language identification. The extensions in
* <code>Locale</code> implement the semantics and syntax of BCP 47
* {@code Locale} implement the semantics and syntax of BCP 47
* extension subtags and private use subtags. The extensions are
* case insensitive, but <code>Locale</code> canonicalizes all
* case insensitive, but {@code Locale} canonicalizes all
* extension keys and values to lower case. Note that extensions
* cannot have empty values.</dd>
*
* <dd>Well-formed keys are single characters from the set
* <code>[0-9a-zA-Z]</code>. Well-formed values have the form
* <code>SUBTAG ('-' SUBTAG)*</code> where for the key 'x'
* {@code [0-9a-zA-Z]}. Well-formed values have the form
* {@code SUBTAG ('-' SUBTAG)*} where for the key 'x'
* <code>SUBTAG = [0-9a-zA-Z]{1,8}</code> and for other keys
* <code>SUBTAG = [0-9a-zA-Z]{2,8}</code> (that is, 'x' allows
* single-character subtags).</dd>
@ -184,8 +184,8 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* </dl>
*
* <b>Note:</b> Although BCP 47 requires field values to be registered
* in the IANA Language Subtag Registry, the <code>Locale</code> class
* does not provide any validation features. The <code>Builder</code>
* in the IANA Language Subtag Registry, the {@code Locale} class
* does not provide any validation features. The {@code Builder}
* only checks if an individual field satisfies the syntactic
* requirement (is well-formed), but does not validate the value
* itself. See {@link Builder} for details.
@ -203,11 +203,11 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* extension key 'u' ({@link #UNICODE_LOCALE_EXTENSION}). The above
* example, "nu-thai", becomes the extension "u-nu-thai".
*
* <p>Thus, when a <code>Locale</code> object contains Unicode locale
* <p>Thus, when a {@code Locale} object contains Unicode locale
* attributes and keywords,
* <code>getExtension(UNICODE_LOCALE_EXTENSION)</code> will return a
* {@code getExtension(UNICODE_LOCALE_EXTENSION)} will return a
* String representing this information, for example, "nu-thai". The
* <code>Locale</code> class also provides {@link
* {@code Locale} class also provides {@link
* #getUnicodeLocaleAttributes}, {@link #getUnicodeLocaleKeys}, and
* {@link #getUnicodeLocaleType} which allow you to access Unicode
* locale attributes and key/type pairs directly. When represented as
@ -232,17 +232,17 @@ import sun.util.locale.provider.TimeZoneNameUtility;
*
* <h3>Creating a Locale</h3>
*
* <p>There are several different ways to create a <code>Locale</code>
* <p>There are several different ways to create a {@code Locale}
* object.
*
* <h4>Builder</h4>
*
* <p>Using {@link Builder} you can construct a <code>Locale</code> object
* <p>Using {@link Builder} you can construct a {@code Locale} object
* that conforms to BCP 47 syntax.
*
* <h4>Constructors</h4>
*
* <p>The <code>Locale</code> class provides three constructors:
* <p>The {@code Locale} class provides three constructors:
* <blockquote>
* <pre>
* {@link #Locale(String language)}
@ -250,20 +250,20 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* {@link #Locale(String language, String country, String variant)}
* </pre>
* </blockquote>
* These constructors allow you to create a <code>Locale</code> object
* These constructors allow you to create a {@code Locale} object
* with language, country and variant, but you cannot specify
* script or extensions.
*
* <h4>Factory Methods</h4>
*
* <p>The method {@link #forLanguageTag} creates a <code>Locale</code>
* <p>The method {@link #forLanguageTag} creates a {@code Locale}
* object for a well-formed BCP 47 language tag.
*
* <h4>Locale Constants</h4>
*
* <p>The <code>Locale</code> class provides a number of convenient constants
* that you can use to create <code>Locale</code> objects for commonly used
* locales. For example, the following creates a <code>Locale</code> object
* <p>The {@code Locale} class provides a number of convenient constants
* that you can use to create {@code Locale} objects for commonly used
* locales. For example, the following creates a {@code Locale} object
* for the United States:
* <blockquote>
* <pre>
@ -344,25 +344,25 @@ import sun.util.locale.provider.TimeZoneNameUtility;
*
* <h3>Use of Locale</h3>
*
* <p>Once you've created a <code>Locale</code> you can query it for information
* about itself. Use <code>getCountry</code> to get the country (or region)
* code and <code>getLanguage</code> to get the language code.
* You can use <code>getDisplayCountry</code> to get the
* <p>Once you've created a {@code Locale} you can query it for information
* about itself. Use {@code getCountry} to get the country (or region)
* code and {@code getLanguage} to get the language code.
* You can use {@code getDisplayCountry} to get the
* name of the country suitable for displaying to the user. Similarly,
* you can use <code>getDisplayLanguage</code> to get the name of
* you can use {@code getDisplayLanguage} to get the name of
* the language suitable for displaying to the user. Interestingly,
* the <code>getDisplayXXX</code> methods are themselves locale-sensitive
* the {@code getDisplayXXX} methods are themselves locale-sensitive
* and have two versions: one that uses the default
* {@link Locale.Category#DISPLAY DISPLAY} locale and one
* that uses the locale specified as an argument.
*
* <p>The Java Platform provides a number of classes that perform locale-sensitive
* operations. For example, the <code>NumberFormat</code> class formats
* operations. For example, the {@code NumberFormat} class formats
* numbers, currency, and percentages in a locale-sensitive manner. Classes
* such as <code>NumberFormat</code> have several convenience methods
* such as {@code NumberFormat} have several convenience methods
* for creating a default object of that type. For example, the
* <code>NumberFormat</code> class provides these three convenience methods
* for creating a default <code>NumberFormat</code> object:
* {@code NumberFormat} class provides these three convenience methods
* for creating a default {@code NumberFormat} object:
* <blockquote>
* <pre>
* NumberFormat.getInstance()
@ -380,8 +380,8 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* NumberFormat.getPercentInstance(myLocale)
* </pre>
* </blockquote>
* A <code>Locale</code> is the mechanism for identifying the kind of object
* (<code>NumberFormat</code>) that you would like to get. The locale is
* A {@code Locale} is the mechanism for identifying the kind of object
* ({@code NumberFormat}) that you would like to get. The locale is
* <STRONG>just</STRONG> a mechanism for identifying objects,
* <STRONG>not</STRONG> a container for the objects themselves.
*
@ -390,7 +390,7 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* <p>In order to maintain compatibility with existing usage, Locale's
* constructors retain their behavior prior to the Java Runtime
* Environment version 1.7. The same is largely true for the
* <code>toString</code> method. Thus Locale objects can continue to
* {@code toString} method. Thus Locale objects can continue to
* be used as they were. In particular, clients who parse the output
* of toString into language, country, and variant fields can continue
* to do so (although this is strongly discouraged), although the
@ -400,15 +400,15 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* <p>In addition, BCP 47 imposes syntax restrictions that are not
* imposed by Locale's constructors. This means that conversions
* between some Locales and BCP 47 language tags cannot be made without
* losing information. Thus <code>toLanguageTag</code> cannot
* losing information. Thus {@code toLanguageTag} cannot
* represent the state of locales whose language, country, or variant
* do not conform to BCP 47.
*
* <p>Because of these issues, it is recommended that clients migrate
* away from constructing non-conforming locales and use the
* <code>forLanguageTag</code> and <code>Locale.Builder</code> APIs instead.
* {@code forLanguageTag} and {@code Locale.Builder} APIs instead.
* Clients desiring a string representation of the complete locale can
* then always rely on <code>toLanguageTag</code> for this purpose.
* then always rely on {@code toLanguageTag} for this purpose.
*
* <h4><a id="special_cases_constructor">Special cases</a></h4>
*
@ -454,9 +454,9 @@ import sun.util.locale.provider.TimeZoneNameUtility;
*
* <p>The APIs added in 1.7 map between the old and new language codes,
* maintaining the old codes internal to Locale (so that
* <code>getLanguage</code> and <code>toString</code> reflect the old
* {@code getLanguage} and {@code toString} reflect the old
* code), but using the new codes in the BCP 47 language tag APIs (so
* that <code>toLanguageTag</code> reflects the new one). This
* that {@code toLanguageTag} reflects the new one). This
* preserves the equivalence between Locales no matter which code or
* API is used to construct them. Java's default resource bundle
* lookup mechanism also implements this mapping, so that resources
@ -734,12 +734,12 @@ public final class Locale implements Cloneable, Serializable {
* </ul>
*
* @param language An ISO 639 alpha-2 or alpha-3 language code, or a language subtag
* up to 8 characters in length. See the <code>Locale</code> class description about
* up to 8 characters in length. See the {@code Locale} class description about
* valid language values.
* @param country An ISO 3166 alpha-2 country code or a UN M.49 numeric-3 area code.
* See the <code>Locale</code> class description about valid country values.
* @param variant Any arbitrary value used to indicate a variation of a <code>Locale</code>.
* See the <code>Locale</code> class description for the details.
* See the {@code Locale} class description about valid country values.
* @param variant Any arbitrary value used to indicate a variation of a {@code Locale}.
* See the {@code Locale} class description for the details.
* @throws NullPointerException thrown if any argument is null.
*/
public Locale(String language, String country, String variant) {
@ -766,10 +766,10 @@ public final class Locale implements Cloneable, Serializable {
* </ul>
*
* @param language An ISO 639 alpha-2 or alpha-3 language code, or a language subtag
* up to 8 characters in length. See the <code>Locale</code> class description about
* up to 8 characters in length. See the {@code Locale} class description about
* valid language values.
* @param country An ISO 3166 alpha-2 country code or a UN M.49 numeric-3 area code.
* See the <code>Locale</code> class description about valid country values.
* See the {@code Locale} class description about valid country values.
* @throws NullPointerException thrown if either argument is null.
*/
public Locale(String language, String country) {
@ -791,7 +791,7 @@ public final class Locale implements Cloneable, Serializable {
* </ul>
*
* @param language An ISO 639 alpha-2 or alpha-3 language code, or a language subtag
* up to 8 characters in length. See the <code>Locale</code> class description about
* up to 8 characters in length. See the {@code Locale} class description about
* valid language values.
* @throws NullPointerException thrown if argument is null.
* @since 1.4
@ -801,17 +801,17 @@ public final class Locale implements Cloneable, Serializable {
}
/**
* Returns a <code>Locale</code> constructed from the given
* <code>language</code>, <code>country</code> and
* <code>variant</code>. If the same <code>Locale</code> instance
* Returns a {@code Locale} constructed from the given
* {@code language}, {@code country} and
* {@code variant}. If the same {@code Locale} instance
* is available in the cache, then that instance is
* returned. Otherwise, a new <code>Locale</code> instance is
* returned. Otherwise, a new {@code Locale} instance is
* created and cached.
*
* @param language lowercase 2 to 8 language code.
* @param country uppercase two-letter ISO-3166 code and numeric-3 UN M.49 area code.
* @param variant vendor and browser specific code. See class description.
* @return the <code>Locale</code> instance requested
* @return the {@code Locale} instance requested
* @throws NullPointerException if any argument is null.
*/
static Locale getInstance(String language, String country, String variant) {
@ -1029,8 +1029,8 @@ public final class Locale implements Cloneable, Serializable {
* Sets the default locale for this instance of the Java Virtual Machine.
* This does not affect the host locale.
* <p>
* If there is a security manager, its <code>checkPermission</code>
* method is called with a <code>PropertyPermission("user.language", "write")</code>
* If there is a security manager, its {@code checkPermission}
* method is called with a {@code PropertyPermission("user.language", "write")}
* permission before the default locale is changed.
* <p>
* The Java Virtual Machine sets the default locale during startup
@ -1047,8 +1047,8 @@ public final class Locale implements Cloneable, Serializable {
*
* @throws SecurityException
* if a security manager exists and its
* <code>checkPermission</code> method doesn't allow the operation.
* @throws NullPointerException if <code>newLocale</code> is null
* {@code checkPermission} method doesn't allow the operation.
* @throws NullPointerException if {@code newLocale} is null
* @param newLocale the new default locale
* @see SecurityManager#checkPermission
* @see java.util.PropertyPermission
@ -1113,7 +1113,7 @@ public final class Locale implements Cloneable, Serializable {
* The returned array represents the union of locales supported
* by the Java runtime environment and by installed
* {@link java.util.spi.LocaleServiceProvider LocaleServiceProvider}
* implementations. It must contain at least a <code>Locale</code>
* implementations. It must contain at least a {@code Locale}
* instance equal to {@link java.util.Locale#US Locale.US}.
*
* @return An array of installed locales.
@ -1128,7 +1128,7 @@ public final class Locale implements Cloneable, Serializable {
* This method is equivalent to {@link #getISOCountries(Locale.IsoCountryCode type)}
* with {@code type} {@link IsoCountryCode#PART1_ALPHA2}.
* <p>
* <b>Note:</b> The <code>Locale</code> class also supports other codes for
* <b>Note:</b> The {@code Locale} class also supports other codes for
* country (region), such as 3-letter numeric UN M.49 area codes.
* Therefore, the list returned by this method does not contain ALL valid
* codes that can be used to create Locales.
@ -1171,7 +1171,7 @@ public final class Locale implements Cloneable, Serializable {
* <li>ISO 639 is not a stable standard&mdash; some languages' codes have changed.
* The list this function returns includes both the new and the old codes for the
* languages whose codes have changed.
* <li>The <code>Locale</code> class also supports language codes up to
* <li>The {@code Locale} class also supports language codes up to
* 8 characters in length. Therefore, the list returned by this method does
* not contain ALL valid codes that can be used to create Locales.
* </ul>
@ -1283,7 +1283,7 @@ public final class Locale implements Cloneable, Serializable {
* Returns the extension (or private use) value associated with
* the specified key, or null if there is no extension
* associated with the key. To be well-formed, the key must be one
* of <code>[0-9A-Za-z]</code>. Keys are case-insensitive, so
* of {@code [0-9A-Za-z]}. Keys are case-insensitive, so
* for example 'z' and 'Z' represent the same extension.
*
* @param key the extension key
@ -1343,7 +1343,7 @@ public final class Locale implements Cloneable, Serializable {
* @return The Unicode locale type associated with the key, or null if the
* locale does not define the key.
* @throws IllegalArgumentException if the key is not well-formed
* @throws NullPointerException if <code>key</code> is null
* @throws NullPointerException if {@code key} is null
* @since 1.7
*/
public String getUnicodeLocaleType(String key) {
@ -1388,7 +1388,7 @@ public final class Locale implements Cloneable, Serializable {
}
/**
* Returns a string representation of this <code>Locale</code>
* Returns a string representation of this {@code Locale}
* object, consisting of language, country, variant, script,
* and extensions as below:
* <blockquote>
@ -1411,7 +1411,7 @@ public final class Locale implements Cloneable, Serializable {
* added before the "#".
*
* <p>This behavior is designed to support debugging and to be compatible with
* previous uses of <code>toString</code> that expected language, country, and variant
* previous uses of {@code toString} that expected language, country, and variant
* fields only. To represent a Locale as a String for interchange purposes, use
* {@link #toLanguageTag}.
*
@ -1467,7 +1467,7 @@ public final class Locale implements Cloneable, Serializable {
* Returns a well-formed IETF BCP 47 language tag representing
* this locale.
*
* <p>If this <code>Locale</code> has a language, country, or
* <p>If this {@code Locale} has a language, country, or
* variant that does not satisfy the IETF BCP 47 language tag
* syntax requirements, this method handles these fields as
* described below:
@ -1703,12 +1703,12 @@ public final class Locale implements Cloneable, Serializable {
* <p>For a list of all grandfathered tags, see the
* IANA Language Subtag Registry (search for "Type: grandfathered").
*
* <p><b>Note</b>: there is no guarantee that <code>toLanguageTag</code>
* and <code>forLanguageTag</code> will round-trip.
* <p><b>Note</b>: there is no guarantee that {@code toLanguageTag}
* and {@code forLanguageTag} will round-trip.
*
* @param languageTag the language tag
* @return The locale that best represents the language tag.
* @throws NullPointerException if <code>languageTag</code> is <code>null</code>
* @throws NullPointerException if {@code languageTag} is {@code null}
* @see #toLanguageTag()
* @see java.util.Locale.Builder#setLanguageTag(String)
* @since 1.7
@ -1834,7 +1834,7 @@ public final class Locale implements Cloneable, Serializable {
*
* @param inLocale The locale for which to retrieve the display language.
* @return The name of the display language appropriate to the given locale.
* @throws NullPointerException if <code>inLocale</code> is <code>null</code>
* @throws NullPointerException if {@code inLocale} is {@code null}
*/
public String getDisplayLanguage(Locale inLocale) {
return getDisplayString(baseLocale.getLanguage(), null, inLocale, DISPLAY_LANGUAGE);
@ -1863,7 +1863,7 @@ public final class Locale implements Cloneable, Serializable {
* @param inLocale The locale for which to retrieve the display script.
* @return the display name of the script code for the current default
* {@link Locale.Category#DISPLAY DISPLAY} locale
* @throws NullPointerException if <code>inLocale</code> is <code>null</code>
* @throws NullPointerException if {@code inLocale} is {@code null}
* @since 1.7
*/
public String getDisplayScript(Locale inLocale) {
@ -1907,7 +1907,7 @@ public final class Locale implements Cloneable, Serializable {
*
* @param inLocale The locale for which to retrieve the display country.
* @return The name of the country appropriate to the given locale.
* @throws NullPointerException if <code>inLocale</code> is <code>null</code>
* @throws NullPointerException if {@code inLocale} is {@code null}
*/
public String getDisplayCountry(Locale inLocale) {
return getDisplayString(baseLocale.getRegion(), null, inLocale, DISPLAY_COUNTRY);
@ -1949,7 +1949,7 @@ public final class Locale implements Cloneable, Serializable {
*
* @param inLocale The locale for which to retrieve the display variant code.
* @return The name of the display variant code appropriate to the given locale.
* @throws NullPointerException if <code>inLocale</code> is <code>null</code>
* @throws NullPointerException if {@code inLocale} is {@code null}
*/
public String getDisplayVariant(Locale inLocale) {
if (baseLocale.getVariant().isEmpty())
@ -2014,7 +2014,7 @@ public final class Locale implements Cloneable, Serializable {
*
* @param inLocale The locale for which to retrieve the display name.
* @return The name of the locale appropriate to display.
* @throws NullPointerException if <code>inLocale</code> is <code>null</code>
* @throws NullPointerException if {@code inLocale} is {@code null}
*/
public String getDisplayName(Locale inLocale) {
LocaleResources lr = LocaleProviderAdapter
@ -2313,8 +2313,8 @@ public final class Locale implements Cloneable, Serializable {
};
/**
* Serializes this <code>Locale</code> to the specified <code>ObjectOutputStream</code>.
* @param out the <code>ObjectOutputStream</code> to write
* Serializes this {@code Locale} to the specified {@code ObjectOutputStream}.
* @param out the {@code ObjectOutputStream} to write
* @throws IOException
* @since 1.7
*/
@ -2331,8 +2331,8 @@ public final class Locale implements Cloneable, Serializable {
}
/**
* Deserializes this <code>Locale</code>.
* @param in the <code>ObjectInputStream</code> to read
* Deserializes this {@code Locale}.
* @param in the {@code ObjectInputStream} to read
* @throws IOException
* @throws ClassNotFoundException
* @throws IllformedLocaleException
@ -2362,17 +2362,17 @@ public final class Locale implements Cloneable, Serializable {
}
/**
* Returns a cached <code>Locale</code> instance equivalent to
* the deserialized <code>Locale</code>. When serialized
* Returns a cached {@code Locale} instance equivalent to
* the deserialized {@code Locale}. When serialized
* language, country and variant fields read from the object data stream
* are exactly "ja", "JP", "JP" or "th", "TH", "TH" and script/extensions
* fields are empty, this method supplies <code>UNICODE_LOCALE_EXTENSION</code>
* fields are empty, this method supplies {@code UNICODE_LOCALE_EXTENSION}
* "ca"/"japanese" (calendar type is "japanese") or "nu"/"thai" (number script
* type is "thai"). See <a href="Locale.html#special_cases_constructor">Special Cases</a>
* for more information.
*
* @return an instance of <code>Locale</code> equivalent to
* the deserialized <code>Locale</code>.
* @return an instance of {@code Locale} equivalent to
* the deserialized {@code Locale}.
* @throws java.io.ObjectStreamException
*/
@java.io.Serial
@ -2509,33 +2509,33 @@ public final class Locale implements Cloneable, Serializable {
}
/**
* <code>Builder</code> is used to build instances of <code>Locale</code>
* from values configured by the setters. Unlike the <code>Locale</code>
* constructors, the <code>Builder</code> checks if a value configured by a
* setter satisfies the syntax requirements defined by the <code>Locale</code>
* class. A <code>Locale</code> object created by a <code>Builder</code> is
* {@code Builder} is used to build instances of {@code Locale}
* from values configured by the setters. Unlike the {@code Locale}
* constructors, the {@code Builder} checks if a value configured by a
* setter satisfies the syntax requirements defined by the {@code Locale}
* class. A {@code Locale} object created by a {@code Builder} is
* well-formed and can be transformed to a well-formed IETF BCP 47 language tag
* without losing information.
*
* <p><b>Note:</b> The <code>Locale</code> class does not provide any
* <p><b>Note:</b> The {@code Locale} class does not provide any
* syntactic restrictions on variant, while BCP 47 requires each variant
* subtag to be 5 to 8 alphanumerics or a single numeric followed by 3
* alphanumerics. The method <code>setVariant</code> throws
* <code>IllformedLocaleException</code> for a variant that does not satisfy
* alphanumerics. The method {@code setVariant} throws
* {@code IllformedLocaleException} for a variant that does not satisfy
* this restriction. If it is necessary to support such a variant, use a
* Locale constructor. However, keep in mind that a <code>Locale</code>
* Locale constructor. However, keep in mind that a {@code Locale}
* object created this way might lose the variant information when
* transformed to a BCP 47 language tag.
*
* <p>The following example shows how to create a <code>Locale</code> object
* with the <code>Builder</code>.
* <p>The following example shows how to create a {@code Locale} object
* with the {@code Builder}.
* <blockquote>
* <pre>
* Locale aLocale = new Builder().setLanguage("sr").setScript("Latn").setRegion("RS").build();
* </pre>
* </blockquote>
*
* <p>Builders can be reused; <code>clear()</code> resets all
* <p>Builders can be reused; {@code clear()} resets all
* fields to their default values.
*
* @see Locale#forLanguageTag
@ -2554,13 +2554,13 @@ public final class Locale implements Cloneable, Serializable {
}
/**
* Resets the <code>Builder</code> to match the provided
* <code>locale</code>. Existing state is discarded.
* Resets the {@code Builder} to match the provided
* {@code locale}. Existing state is discarded.
*
* <p>All fields of the locale must be well-formed, see {@link Locale}.
*
* <p>Locales with any ill-formed fields cause
* <code>IllformedLocaleException</code> to be thrown, except for the
* {@code IllformedLocaleException} to be thrown, except for the
* following three cases which are accepted for compatibility
* reasons:<ul>
* <li>Locale("ja", "JP", "JP") is treated as "ja-JP-u-ca-japanese"
@ -2569,9 +2569,9 @@ public final class Locale implements Cloneable, Serializable {
*
* @param locale the locale
* @return This builder.
* @throws IllformedLocaleException if <code>locale</code> has
* @throws IllformedLocaleException if {@code locale} has
* any ill-formed fields.
* @throws NullPointerException if <code>locale</code> is null.
* @throws NullPointerException if {@code locale} is null.
*/
public Builder setLocale(Locale locale) {
try {
@ -2590,13 +2590,13 @@ public final class Locale implements Cloneable, Serializable {
* Locale#forLanguageTag}) are converted to their canonical
* form before being processed. Otherwise, the language tag
* must be well-formed (see {@link Locale}) or an exception is
* thrown (unlike <code>Locale.forLanguageTag</code>, which
* thrown (unlike {@code Locale.forLanguageTag}, which
* just discards ill-formed and following portions of the
* tag).
*
* @param languageTag the language tag
* @return This builder.
* @throws IllformedLocaleException if <code>languageTag</code> is ill-formed
* @throws IllformedLocaleException if {@code languageTag} is ill-formed
* @see Locale#forLanguageTag(String)
*/
public Builder setLanguageTag(String languageTag) {
@ -2610,8 +2610,8 @@ public final class Locale implements Cloneable, Serializable {
}
/**
* Sets the language. If <code>language</code> is the empty string or
* null, the language in this <code>Builder</code> is removed. Otherwise,
* Sets the language. If {@code language} is the empty string or
* null, the language in this {@code Builder} is removed. Otherwise,
* the language must be <a href="./Locale.html#def_language">well-formed</a>
* or an exception is thrown.
*
@ -2620,7 +2620,7 @@ public final class Locale implements Cloneable, Serializable {
*
* @param language the language
* @return This builder.
* @throws IllformedLocaleException if <code>language</code> is ill-formed
* @throws IllformedLocaleException if {@code language} is ill-formed
*/
public Builder setLanguage(String language) {
try {
@ -2632,8 +2632,8 @@ public final class Locale implements Cloneable, Serializable {
}
/**
* Sets the script. If <code>script</code> is null or the empty string,
* the script in this <code>Builder</code> is removed.
* Sets the script. If {@code script} is null or the empty string,
* the script in this {@code Builder} is removed.
* Otherwise, the script must be <a href="./Locale.html#def_script">well-formed</a> or an
* exception is thrown.
*
@ -2641,7 +2641,7 @@ public final class Locale implements Cloneable, Serializable {
*
* @param script the script
* @return This builder.
* @throws IllformedLocaleException if <code>script</code> is ill-formed
* @throws IllformedLocaleException if {@code script} is ill-formed
*/
public Builder setScript(String script) {
try {
@ -2654,19 +2654,19 @@ public final class Locale implements Cloneable, Serializable {
/**
* Sets the region. If region is null or the empty string, the region
* in this <code>Builder</code> is removed. Otherwise,
* in this {@code Builder} is removed. Otherwise,
* the region must be <a href="./Locale.html#def_region">well-formed</a> or an
* exception is thrown.
*
* <p>The typical region value is a two-letter ISO 3166 code or a
* three-digit UN M.49 area code.
*
* <p>The country value in the <code>Locale</code> created by the
* <code>Builder</code> is always normalized to upper case.
* <p>The country value in the {@code Locale} created by the
* {@code Builder} is always normalized to upper case.
*
* @param region the region
* @return This builder.
* @throws IllformedLocaleException if <code>region</code> is ill-formed
* @throws IllformedLocaleException if {@code region} is ill-formed
*/
public Builder setRegion(String region) {
try {
@ -2679,21 +2679,21 @@ public final class Locale implements Cloneable, Serializable {
/**
* Sets the variant. If variant is null or the empty string, the
* variant in this <code>Builder</code> is removed. Otherwise, it
* variant in this {@code Builder} is removed. Otherwise, it
* must consist of one or more <a href="./Locale.html#def_variant">well-formed</a>
* subtags, or an exception is thrown.
*
* <p><b>Note:</b> This method checks if <code>variant</code>
* <p><b>Note:</b> This method checks if {@code variant}
* satisfies the IETF BCP 47 variant subtag's syntax requirements,
* and normalizes the value to lowercase letters. However,
* the <code>Locale</code> class does not impose any syntactic
* the {@code Locale} class does not impose any syntactic
* restriction on variant, and the variant value in
* <code>Locale</code> is case sensitive. To set such a variant,
* {@code Locale} is case sensitive. To set such a variant,
* use a Locale constructor.
*
* @param variant the variant
* @return This builder.
* @throws IllformedLocaleException if <code>variant</code> is ill-formed
* @throws IllformedLocaleException if {@code variant} is ill-formed
*/
public Builder setVariant(String variant) {
try {
@ -2723,8 +2723,8 @@ public final class Locale implements Cloneable, Serializable {
* @param key the extension key
* @param value the extension value
* @return This builder.
* @throws IllformedLocaleException if <code>key</code> is illegal
* or <code>value</code> is ill-formed
* @throws IllformedLocaleException if {@code key} is illegal
* or {@code value} is ill-formed
* @see #setUnicodeLocaleKeyword(String, String)
*/
public Builder setExtension(char key, String value) {
@ -2752,9 +2752,9 @@ public final class Locale implements Cloneable, Serializable {
* @param key the Unicode locale key
* @param type the Unicode locale type
* @return This builder.
* @throws IllformedLocaleException if <code>key</code> or <code>type</code>
* @throws IllformedLocaleException if {@code key} or {@code type}
* is ill-formed
* @throws NullPointerException if <code>key</code> is null
* @throws NullPointerException if {@code key} is null
* @see #setExtension(char, String)
*/
public Builder setUnicodeLocaleKeyword(String key, String type) {
@ -2774,8 +2774,8 @@ public final class Locale implements Cloneable, Serializable {
*
* @param attribute the attribute
* @return This builder.
* @throws NullPointerException if <code>attribute</code> is null
* @throws IllformedLocaleException if <code>attribute</code> is ill-formed
* @throws NullPointerException if {@code attribute} is null
* @throws IllformedLocaleException if {@code attribute} is ill-formed
* @see #setExtension(char, String)
*/
public Builder addUnicodeLocaleAttribute(String attribute) {
@ -2797,8 +2797,8 @@ public final class Locale implements Cloneable, Serializable {
*
* @param attribute the attribute
* @return This builder.
* @throws NullPointerException if <code>attribute</code> is null
* @throws IllformedLocaleException if <code>attribute</code> is ill-formed
* @throws NullPointerException if {@code attribute} is null
* @throws IllformedLocaleException if {@code attribute} is ill-formed
* @see #setExtension(char, String)
*/
public Builder removeUnicodeLocaleAttribute(String attribute) {
@ -2834,7 +2834,7 @@ public final class Locale implements Cloneable, Serializable {
}
/**
* Returns an instance of <code>Locale</code> created from the fields set
* Returns an instance of {@code Locale} created from the fields set
* on this builder.
*
* <p>This applies the conversions listed in {@link Locale#forLanguageTag}
@ -3482,7 +3482,7 @@ public final class Locale implements Cloneable, Serializable {
* @param priorityList user's Language Priority List in which each language
* tag is sorted in descending order based on priority or weight
* @param locales {@code Locale} instances used for matching
* @return the best matching <code>Locale</code> instance chosen based on
* @return the best matching {@code Locale} instance chosen based on
* priority or weight, or {@code null} if nothing matches.
* @throws NullPointerException if {@code priorityList} or {@code tags} is
* {@code null}

View file

@ -54,10 +54,10 @@ import sun.security.util.SecurityConstants;
*
* <DL>
* <DT> read
* <DD> read permission. Allows <code>System.getProperty</code> to
* <DD> read permission. Allows {@code System.getProperty} to
* be called.
* <DT> write
* <DD> write permission. Allows <code>System.setProperty</code> to
* <DD> write permission. Allows {@code System.setProperty} to
* be called.
* </DL>
* <P>
@ -149,9 +149,9 @@ public final class PropertyPermission extends BasicPermission {
* @param name the name of the PropertyPermission.
* @param actions the actions string.
*
* @throws NullPointerException if <code>name</code> is <code>null</code>.
* @throws IllegalArgumentException if <code>name</code> is empty or if
* <code>actions</code> is invalid.
* @throws NullPointerException if {@code name} is {@code null}.
* @throws IllegalArgumentException if {@code name} is empty or if
* {@code actions} is invalid.
*/
public PropertyPermission(String name, String actions) {
super(name,actions);
@ -223,7 +223,7 @@ public final class PropertyPermission extends BasicPermission {
/**
* Returns the hash code value for this object.
* The hash code used is the hash code of this permissions name, that is,
* <code>getName().hashCode()</code>, where <code>getName</code> is
* {@code getName().hashCode()}, where {@code getName} is
* from the Permission superclass.
*
* @return a hash code value for this object.
@ -350,7 +350,7 @@ public final class PropertyPermission extends BasicPermission {
* Returns the "canonical string representation" of the actions.
* That is, this method always returns present actions in the following order:
* read, write. For example, if this PropertyPermission object
* allows both write and read actions, a call to <code>getActions</code>
* allows both write and read actions, a call to {@code getActions}
* will return the string "read,write".
*
* @return the canonical string representation of the actions.

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2016, 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
@ -51,18 +51,18 @@ import sun.util.PropertyResourceBundleCharset;
import sun.util.ResourceBundleEnumeration;
/**
* <code>PropertyResourceBundle</code> is a concrete subclass of
* <code>ResourceBundle</code> that manages resources for a locale
* {@code PropertyResourceBundle} is a concrete subclass of
* {@code ResourceBundle} that manages resources for a locale
* using a set of static strings from a property file. See
* {@link ResourceBundle ResourceBundle} for more information about resource
* bundles.
*
* <p>
* Unlike other types of resource bundle, you don't subclass
* <code>PropertyResourceBundle</code>. Instead, you supply properties
* files containing the resource data. <code>ResourceBundle.getBundle</code>
* {@code PropertyResourceBundle}. Instead, you supply properties
* files containing the resource data. {@code ResourceBundle.getBundle}
* will automatically look for the appropriate properties file and create a
* <code>PropertyResourceBundle</code> that refers to it. See
* {@code PropertyResourceBundle} that refers to it. See
* {@link ResourceBundle#getBundle(String, Locale, ClassLoader) ResourceBundle.getBundle}
* for a complete description of the search and instantiation strategy.
*
@ -71,11 +71,11 @@ import sun.util.ResourceBundleEnumeration;
* bundle family with the base name "MyResources".
* The text defines the bundle "MyResources_de",
* the German member of the bundle family.
* This member is based on <code>PropertyResourceBundle</code>, and the text
* This member is based on {@code PropertyResourceBundle}, and the text
* therefore is the content of the file "MyResources_de.properties"
* (a related <a href="ListResourceBundle.html#sample">example</a> shows
* how you can add bundles to this family that are implemented as subclasses
* of <code>ListResourceBundle</code>).
* of {@code ListResourceBundle}).
* The keys in this example are of the form "s1" etc. The actual
* keys are entirely up to your choice, so long as they are the same as
* the keys you use in your program to retrieve the objects from the bundle.
@ -162,7 +162,7 @@ public class PropertyResourceBundle extends ResourceBundle {
* @param stream an InputStream that represents a property file
* to read from.
* @throws IOException if an I/O error occurs
* @throws NullPointerException if <code>stream</code> is null
* @throws NullPointerException if {@code stream} is null
* @throws IllegalArgumentException if {@code stream} contains a
* malformed Unicode escape sequence.
* @throws MalformedInputException if the system property
@ -189,7 +189,7 @@ public class PropertyResourceBundle extends ResourceBundle {
* @param reader a Reader that represents a property file to
* read from.
* @throws IOException if an I/O error occurs
* @throws NullPointerException if <code>reader</code> is null
* @throws NullPointerException if {@code reader} is null
* @throws IllegalArgumentException if a malformed Unicode escape sequence appears
* from {@code reader}.
* @since 1.6
@ -210,11 +210,11 @@ public class PropertyResourceBundle extends ResourceBundle {
}
/**
* Returns an <code>Enumeration</code> of the keys contained in
* this <code>ResourceBundle</code> and its parent bundles.
* Returns an {@code Enumeration} of the keys contained in
* this {@code ResourceBundle} and its parent bundles.
*
* @return an <code>Enumeration</code> of the keys contained in
* this <code>ResourceBundle</code> and its parent bundles.
* @return an {@code Enumeration} of the keys contained in
* this {@code ResourceBundle} and its parent bundles.
* @see #keySet()
*/
public Enumeration<String> getKeys() {
@ -224,11 +224,11 @@ public class PropertyResourceBundle extends ResourceBundle {
}
/**
* Returns a <code>Set</code> of the keys contained
* <em>only</em> in this <code>ResourceBundle</code>.
* Returns a {@code Set} of the keys contained
* <em>only</em> in this {@code ResourceBundle}.
*
* @return a <code>Set</code> of the keys contained only in this
* <code>ResourceBundle</code>
* @return a {@code Set} of the keys contained only in this
* {@code ResourceBundle}
* @since 1.6
* @see #keySet()
*/

File diff suppressed because it is too large Load diff

View file

@ -48,7 +48,7 @@ import sun.util.calendar.BaseCalendar;
import sun.util.calendar.Gregorian;
/**
* <code>SimpleTimeZone</code> is a concrete subclass of <code>TimeZone</code>
* {@code SimpleTimeZone} is a concrete subclass of {@code TimeZone}
* that represents a time zone for use with a Gregorian calendar.
* The class holds an offset from GMT, called <em>raw offset</em>, and start
* and end rules for a daylight saving time schedule. Since it only holds
@ -57,7 +57,7 @@ import sun.util.calendar.Gregorian;
* #setStartYear setStartYear} method can specify the year when the daylight
* saving time schedule starts in effect.
* <p>
* To construct a <code>SimpleTimeZone</code> with a daylight saving time
* To construct a {@code SimpleTimeZone} with a daylight saving time
* schedule, the schedule can be described with a set of rules,
* <em>start-rule</em> and <em>end-rule</em>. A day when daylight saving time
* starts or ends is specified by a combination of <em>month</em>,
@ -81,7 +81,7 @@ import sun.util.calendar.Gregorian;
* or after which the rule is applied, and <em>day-of-week</em> to a negative {@link
* Calendar#DAY_OF_WEEK DAY_OF_WEEK} field value. For example, to specify the
* second Sunday of April, set <em>month</em> to {@link Calendar#APRIL APRIL},
* <em>day-of-month</em> to 8, and <em>day-of-week</em> to <code>-</code>{@link
* <em>day-of-month</em> to 8, and <em>day-of-week</em> to {@code -}{@link
* Calendar#SUNDAY SUNDAY}.</li>
*
* <li><b>Day of week on or before day of month</b><br>
@ -89,7 +89,7 @@ import sun.util.calendar.Gregorian;
* <em>day-of-month</em> and <em>day-of-week</em> to a negative value. For
* example, to specify the last Wednesday on or before the 21st of March, set
* <em>month</em> to {@link Calendar#MARCH MARCH}, <em>day-of-month</em> is -21
* and <em>day-of-week</em> is <code>-</code>{@link Calendar#WEDNESDAY WEDNESDAY}. </li>
* and <em>day-of-week</em> is {@code -}{@link Calendar#WEDNESDAY WEDNESDAY}. </li>
*
* <li><b>Last day-of-week of month</b><br>
* To specify, the last day-of-week of the month, set <em>day-of-week</em> to a
@ -139,7 +139,7 @@ import sun.util.calendar.Gregorian;
* 3600000)
* </code></pre>
* These parameter rules are also applicable to the set rule methods, such as
* <code>setStartRule</code>.
* {@code setStartRule}.
*
* @since 1.1
* @see Calendar
@ -167,7 +167,7 @@ public class SimpleTimeZone extends TimeZone {
* Constructs a SimpleTimeZone with the given base time zone offset from
* GMT, time zone ID, and rules for starting and ending the daylight
* time.
* Both <code>startTime</code> and <code>endTime</code> are specified to be
* Both {@code startTime} and {@code endTime} are specified to be
* represented in the wall clock time. The amount of daylight saving is
* assumed to be 3600000 milliseconds (i.e., one hour). This constructor is
* equivalent to:
@ -226,7 +226,7 @@ public class SimpleTimeZone extends TimeZone {
* Constructs a SimpleTimeZone with the given base time zone offset from
* GMT, time zone ID, and rules for starting and ending the daylight
* time.
* Both <code>startTime</code> and <code>endTime</code> are assumed to be
* Both {@code startTime} and {@code endTime} are assumed to be
* represented in the wall clock time. This constructor is equivalent to:
* <pre><code>
* SimpleTimeZone(rawOffset,
@ -286,8 +286,8 @@ public class SimpleTimeZone extends TimeZone {
* GMT, time zone ID, and rules for starting and ending the daylight
* time.
* This constructor takes the full set of the start and end rules
* parameters, including modes of <code>startTime</code> and
* <code>endTime</code>. The mode specifies either {@link #WALL_TIME wall
* parameters, including modes of {@code startTime} and
* {@code endTime}. The mode specifies either {@link #WALL_TIME wall
* time} or {@link #STANDARD_TIME standard time} or {@link #UTC_TIME UTC
* time}.
*
@ -301,7 +301,7 @@ public class SimpleTimeZone extends TimeZone {
* @param startDayOfWeek The daylight saving time starting day-of-week.
* See the class description for the special cases of this parameter.
* @param startTime The daylight saving time starting time in the time mode
* specified by <code>startTimeMode</code>.
* specified by {@code startTimeMode}.
* @param startTimeMode The mode of the start time specified by startTime.
* @param endMonth The daylight saving time ending month. Month is
* a {@link Calendar#MONTH MONTH} field
@ -311,7 +311,7 @@ public class SimpleTimeZone extends TimeZone {
* @param endDayOfWeek The daylight saving time ending day-of-week.
* See the class description for the special cases of this parameter.
* @param endTime The daylight saving ending time in time mode
* specified by <code>endTimeMode</code>.
* specified by {@code endTimeMode}.
* @param endTimeMode The mode of the end time specified by endTime
* @param dstSavings The amount of time in milliseconds saved during
* daylight saving time.
@ -369,7 +369,7 @@ public class SimpleTimeZone extends TimeZone {
* Sets the daylight saving time start rule. For example, if daylight saving
* time starts on the first Sunday in April at 2 am in local wall clock
* time, you can set the start rule by calling:
* <pre><code>setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 2*60*60*1000);</code></pre>
* <pre>{@code setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 2*60*60*1000);}</pre>
*
* @param startMonth The daylight saving time starting month. Month is
* a {@link Calendar#MONTH MONTH} field
@ -380,8 +380,8 @@ public class SimpleTimeZone extends TimeZone {
* See the class description for the special cases of this parameter.
* @param startTime The daylight saving time starting time in local wall clock
* time, which is local standard time in this case.
* @throws IllegalArgumentException if the <code>startMonth</code>, <code>startDay</code>,
* <code>startDayOfWeek</code>, or <code>startTime</code> parameters are out of range
* @throws IllegalArgumentException if the {@code startMonth}, {@code startDay},
* {@code startDayOfWeek}, or {@code startTime} parameters are out of range
*/
public void setStartRule(int startMonth, int startDay, int startDayOfWeek, int startTime)
{
@ -397,7 +397,7 @@ public class SimpleTimeZone extends TimeZone {
/**
* Sets the daylight saving time start rule to a fixed date within a month.
* This method is equivalent to:
* <pre><code>setStartRule(startMonth, startDay, 0, startTime)</code></pre>
* <pre>{@code setStartRule(startMonth, startDay, 0, startTime)}</pre>
*
* @param startMonth The daylight saving time starting month. Month is
* a {@link Calendar#MONTH MONTH} field
@ -406,8 +406,8 @@ public class SimpleTimeZone extends TimeZone {
* @param startTime The daylight saving time starting time in local wall clock
* time, which is local standard time in this case.
* See the class description for the special cases of this parameter.
* @throws IllegalArgumentException if the <code>startMonth</code>,
* <code>startDayOfMonth</code>, or <code>startTime</code> parameters are out of range
* @throws IllegalArgumentException if the {@code startMonth},
* {@code startDayOfMonth}, or {@code startTime} parameters are out of range
* @since 1.2
*/
public void setStartRule(int startMonth, int startDay, int startTime) {
@ -425,12 +425,12 @@ public class SimpleTimeZone extends TimeZone {
* @param startDayOfWeek The daylight saving time starting day-of-week.
* @param startTime The daylight saving time starting time in local wall clock
* time, which is local standard time in this case.
* @param after If true, this rule selects the first <code>dayOfWeek</code> on or
* <em>after</em> <code>dayOfMonth</code>. If false, this rule
* selects the last <code>dayOfWeek</code> on or <em>before</em>
* <code>dayOfMonth</code>.
* @throws IllegalArgumentException if the <code>startMonth</code>, <code>startDay</code>,
* <code>startDayOfWeek</code>, or <code>startTime</code> parameters are out of range
* @param after If true, this rule selects the first {@code dayOfWeek} on or
* <em>after</em> {@code dayOfMonth}. If false, this rule
* selects the last {@code dayOfWeek} on or <em>before</em>
* {@code dayOfMonth}.
* @throws IllegalArgumentException if the {@code startMonth}, {@code startDay},
* {@code startDayOfWeek}, or {@code startTime} parameters are out of range
* @since 1.2
*/
public void setStartRule(int startMonth, int startDay, int startDayOfWeek,
@ -448,7 +448,7 @@ public class SimpleTimeZone extends TimeZone {
* Sets the daylight saving time end rule. For example, if daylight saving time
* ends on the last Sunday in October at 2 am in wall clock time,
* you can set the end rule by calling:
* <code>setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 2*60*60*1000);</code>
* {@code setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 2*60*60*1000);}
*
* @param endMonth The daylight saving time ending month. Month is
* a {@link Calendar#MONTH MONTH} field
@ -460,8 +460,8 @@ public class SimpleTimeZone extends TimeZone {
* @param endTime The daylight saving ending time in local wall clock time,
* (in milliseconds within the day) which is local daylight
* time in this case.
* @throws IllegalArgumentException if the <code>endMonth</code>, <code>endDay</code>,
* <code>endDayOfWeek</code>, or <code>endTime</code> parameters are out of range
* @throws IllegalArgumentException if the {@code endMonth}, {@code endDay},
* {@code endDayOfWeek}, or {@code endTime} parameters are out of range
*/
public void setEndRule(int endMonth, int endDay, int endDayOfWeek,
int endTime)
@ -478,7 +478,7 @@ public class SimpleTimeZone extends TimeZone {
/**
* Sets the daylight saving time end rule to a fixed date within a month.
* This method is equivalent to:
* <pre><code>setEndRule(endMonth, endDay, 0, endTime)</code></pre>
* <pre>{@code setEndRule(endMonth, endDay, 0, endTime)}</pre>
*
* @param endMonth The daylight saving time ending month. Month is
* a {@link Calendar#MONTH MONTH} field
@ -487,8 +487,8 @@ public class SimpleTimeZone extends TimeZone {
* @param endTime The daylight saving ending time in local wall clock time,
* (in milliseconds within the day) which is local daylight
* time in this case.
* @throws IllegalArgumentException the <code>endMonth</code>, <code>endDay</code>,
* or <code>endTime</code> parameters are out of range
* @throws IllegalArgumentException the {@code endMonth}, {@code endDay},
* or {@code endTime} parameters are out of range
* @since 1.2
*/
public void setEndRule(int endMonth, int endDay, int endTime)
@ -508,12 +508,12 @@ public class SimpleTimeZone extends TimeZone {
* @param endTime The daylight saving ending time in local wall clock time,
* (in milliseconds within the day) which is local daylight
* time in this case.
* @param after If true, this rule selects the first <code>endDayOfWeek</code> on
* or <em>after</em> <code>endDay</code>. If false, this rule
* selects the last <code>endDayOfWeek</code> on or before
* <code>endDay</code> of the month.
* @throws IllegalArgumentException the <code>endMonth</code>, <code>endDay</code>,
* <code>endDayOfWeek</code>, or <code>endTime</code> parameters are out of range
* @param after If true, this rule selects the first {@code endDayOfWeek} on
* or <em>after</em> {@code endDay}. If false, this rule
* selects the last {@code endDayOfWeek} on or before
* {@code endDay} of the month.
* @throws IllegalArgumentException the {@code endMonth}, {@code endDay},
* {@code endDayOfWeek}, or {@code endTime} parameters are out of range
* @since 1.2
*/
public void setEndRule(int endMonth, int endDay, int endDayOfWeek, int endTime, boolean after)
@ -583,10 +583,10 @@ public class SimpleTimeZone extends TimeZone {
* uses a default {@link GregorianCalendar} object as its
* underlying calendar, such as for determining leap years. Do
* not use the result of this method with a calendar other than a
* default <code>GregorianCalendar</code>.
* default {@code GregorianCalendar}.
*
* <p><em>Note: In general, clients should use
* <code>Calendar.get(ZONE_OFFSET) + Calendar.get(DST_OFFSET)</code>
* {@code Calendar.get(ZONE_OFFSET) + Calendar.get(DST_OFFSET)}
* instead of calling this method.</em>
*
* @param era The era of the given date.
@ -597,9 +597,9 @@ public class SimpleTimeZone extends TimeZone {
* @param dayOfWeek The day-of-week of the given date.
* @param millis The milliseconds in day in <em>standard</em> local time.
* @return The milliseconds to add to UTC to get local time.
* @throws IllegalArgumentException the <code>era</code>,
* <code>month</code>, <code>day</code>, <code>dayOfWeek</code>,
* or <code>millis</code> parameters are out of range
* @throws IllegalArgumentException the {@code era},
* {@code month}, {@code day}, {@code dayOfWeek},
* or {@code millis} parameters are out of range
*/
public int getOffset(int era, int year, int month, int day, int dayOfWeek,
int millis)
@ -853,7 +853,7 @@ public class SimpleTimeZone extends TimeZone {
}
/**
* Returns a clone of this <code>SimpleTimeZone</code> instance.
* Returns a clone of this {@code SimpleTimeZone} instance.
* @return a clone of this instance.
*/
public Object clone()
@ -872,11 +872,11 @@ public class SimpleTimeZone extends TimeZone {
}
/**
* Compares the equality of two <code>SimpleTimeZone</code> objects.
* Compares the equality of two {@code SimpleTimeZone} objects.
*
* @param obj The <code>SimpleTimeZone</code> object to be compared with.
* @return True if the given <code>obj</code> is the same as this
* <code>SimpleTimeZone</code> object; false otherwise.
* @param obj The {@code SimpleTimeZone} object to be compared with.
* @return True if the given {@code obj} is the same as this
* {@code SimpleTimeZone} object; false otherwise.
*/
public boolean equals(Object obj)
{
@ -894,9 +894,9 @@ public class SimpleTimeZone extends TimeZone {
}
/**
* Returns <code>true</code> if this zone has the same rules and offset as another zone.
* Returns {@code true} if this zone has the same rules and offset as another zone.
* @param other the TimeZone object to be compared with
* @return <code>true</code> if the given zone is a SimpleTimeZone and has the
* @return {@code true} if the given zone is a SimpleTimeZone and has the
* same rules and offset as this one
* @since 1.2
*/
@ -957,10 +957,10 @@ public class SimpleTimeZone extends TimeZone {
/**
* The month in which daylight saving time starts. This value must be
* between <code>Calendar.JANUARY</code> and
* <code>Calendar.DECEMBER</code> inclusive. This value must not equal
* <code>endMonth</code>.
* <p>If <code>useDaylight</code> is false, this value is ignored.
* between {@code Calendar.JANUARY} and
* {@code Calendar.DECEMBER} inclusive. This value must not equal
* {@code endMonth}.
* <p>If {@code useDaylight} is false, this value is ignored.
* @serial
*/
private int startMonth;
@ -968,34 +968,34 @@ public class SimpleTimeZone extends TimeZone {
/**
* This field has two possible interpretations:
* <dl>
* <dt><code>startMode == DOW_IN_MONTH</code></dt>
* <dt>{@code startMode == DOW_IN_MONTH}</dt>
* <dd>
* <code>startDay</code> indicates the day of the month of
* <code>startMonth</code> on which daylight
* {@code startDay} indicates the day of the month of
* {@code startMonth} on which daylight
* saving time starts, from 1 to 28, 30, or 31, depending on the
* <code>startMonth</code>.
* {@code startMonth}.
* </dd>
* <dt><code>startMode != DOW_IN_MONTH</code></dt>
* <dt>{@code startMode != DOW_IN_MONTH}</dt>
* <dd>
* <code>startDay</code> indicates which <code>startDayOfWeek</code> in the
* month <code>startMonth</code> daylight
* {@code startDay} indicates which {@code startDayOfWeek} in the
* month {@code startMonth} daylight
* saving time starts on. For example, a value of +1 and a
* <code>startDayOfWeek</code> of <code>Calendar.SUNDAY</code> indicates the
* first Sunday of <code>startMonth</code>. Likewise, +2 would indicate the
* {@code startDayOfWeek} of {@code Calendar.SUNDAY} indicates the
* first Sunday of {@code startMonth}. Likewise, +2 would indicate the
* second Sunday, and -1 the last Sunday. A value of 0 is illegal.
* </dd>
* </dl>
* <p>If <code>useDaylight</code> is false, this value is ignored.
* <p>If {@code useDaylight} is false, this value is ignored.
* @serial
*/
private int startDay;
/**
* The day of the week on which daylight saving time starts. This value
* must be between <code>Calendar.SUNDAY</code> and
* <code>Calendar.SATURDAY</code> inclusive.
* <p>If <code>useDaylight</code> is false or
* <code>startMode == DAY_OF_MONTH</code>, this value is ignored.
* must be between {@code Calendar.SUNDAY} and
* {@code Calendar.SATURDAY} inclusive.
* <p>If {@code useDaylight} is false or
* {@code startMode == DAY_OF_MONTH}, this value is ignored.
* @serial
*/
private int startDayOfWeek;
@ -1003,8 +1003,8 @@ public class SimpleTimeZone extends TimeZone {
/**
* The time in milliseconds after midnight at which daylight saving
* time starts. This value is expressed as wall time, standard time,
* or UTC time, depending on the setting of <code>startTimeMode</code>.
* <p>If <code>useDaylight</code> is false, this value is ignored.
* or UTC time, depending on the setting of {@code startTimeMode}.
* <p>If {@code useDaylight} is false, this value is ignored.
* @serial
*/
private int startTime;
@ -1018,10 +1018,10 @@ public class SimpleTimeZone extends TimeZone {
/**
* The month in which daylight saving time ends. This value must be
* between <code>Calendar.JANUARY</code> and
* <code>Calendar.UNDECIMBER</code>. This value must not equal
* <code>startMonth</code>.
* <p>If <code>useDaylight</code> is false, this value is ignored.
* between {@code Calendar.JANUARY} and
* {@code Calendar.UNDECIMBER}. This value must not equal
* {@code startMonth}.
* <p>If {@code useDaylight} is false, this value is ignored.
* @serial
*/
private int endMonth;
@ -1029,34 +1029,34 @@ public class SimpleTimeZone extends TimeZone {
/**
* This field has two possible interpretations:
* <dl>
* <dt><code>endMode == DOW_IN_MONTH</code></dt>
* <dt>{@code endMode == DOW_IN_MONTH}</dt>
* <dd>
* <code>endDay</code> indicates the day of the month of
* <code>endMonth</code> on which daylight
* {@code endDay} indicates the day of the month of
* {@code endMonth} on which daylight
* saving time ends, from 1 to 28, 30, or 31, depending on the
* <code>endMonth</code>.
* {@code endMonth}.
* </dd>
* <dt><code>endMode != DOW_IN_MONTH</code></dt>
* <dt>{@code endMode != DOW_IN_MONTH}</dt>
* <dd>
* <code>endDay</code> indicates which <code>endDayOfWeek</code> in th
* month <code>endMonth</code> daylight
* {@code endDay} indicates which {@code endDayOfWeek} in th
* month {@code endMonth} daylight
* saving time ends on. For example, a value of +1 and a
* <code>endDayOfWeek</code> of <code>Calendar.SUNDAY</code> indicates the
* first Sunday of <code>endMonth</code>. Likewise, +2 would indicate the
* {@code endDayOfWeek} of {@code Calendar.SUNDAY} indicates the
* first Sunday of {@code endMonth}. Likewise, +2 would indicate the
* second Sunday, and -1 the last Sunday. A value of 0 is illegal.
* </dd>
* </dl>
* <p>If <code>useDaylight</code> is false, this value is ignored.
* <p>If {@code useDaylight} is false, this value is ignored.
* @serial
*/
private int endDay;
/**
* The day of the week on which daylight saving time ends. This value
* must be between <code>Calendar.SUNDAY</code> and
* <code>Calendar.SATURDAY</code> inclusive.
* <p>If <code>useDaylight</code> is false or
* <code>endMode == DAY_OF_MONTH</code>, this value is ignored.
* must be between {@code Calendar.SUNDAY} and
* {@code Calendar.SATURDAY} inclusive.
* <p>If {@code useDaylight} is false or
* {@code endMode == DAY_OF_MONTH}, this value is ignored.
* @serial
*/
private int endDayOfWeek;
@ -1064,15 +1064,15 @@ public class SimpleTimeZone extends TimeZone {
/**
* The time in milliseconds after midnight at which daylight saving
* time ends. This value is expressed as wall time, standard time,
* or UTC time, depending on the setting of <code>endTimeMode</code>.
* <p>If <code>useDaylight</code> is false, this value is ignored.
* or UTC time, depending on the setting of {@code endTimeMode}.
* <p>If {@code useDaylight} is false, this value is ignored.
* @serial
*/
private int endTime;
/**
* The format of endTime, either <code>WALL_TIME</code>,
* <code>STANDARD_TIME</code>, or <code>UTC_TIME</code>.
* The format of endTime, either {@code WALL_TIME},
* {@code STANDARD_TIME}, or {@code UTC_TIME}.
* @serial
* @since 1.3
*/
@ -1081,8 +1081,8 @@ public class SimpleTimeZone extends TimeZone {
/**
* The year in which daylight saving time is first observed. This is an {@link GregorianCalendar#AD AD}
* value. If this value is less than 1 then daylight saving time is observed
* for all <code>AD</code> years.
* <p>If <code>useDaylight</code> is false, this value is ignored.
* for all {@code AD} years.
* <p>If {@code useDaylight} is false, this value is ignored.
* @serial
*/
private int startYear;
@ -1091,7 +1091,7 @@ public class SimpleTimeZone extends TimeZone {
* The offset in milliseconds between this zone and GMT. Negative offsets
* are to the west of Greenwich. To obtain local <em>standard</em> time,
* add the offset to GMT time. To obtain local wall time it may also be
* necessary to add <code>dstSavings</code>.
* necessary to add {@code dstSavings}.
* @serial
*/
private int rawOffset;
@ -1122,26 +1122,26 @@ public class SimpleTimeZone extends TimeZone {
* Variables specifying the mode of the start rule. Takes the following
* values:
* <dl>
* <dt><code>DOM_MODE</code></dt>
* <dt>{@code DOM_MODE}</dt>
* <dd>
* Exact day of week; e.g., March 1.
* </dd>
* <dt><code>DOW_IN_MONTH_MODE</code></dt>
* <dt>{@code DOW_IN_MONTH_MODE}</dt>
* <dd>
* Day of week in month; e.g., last Sunday in March.
* </dd>
* <dt><code>DOW_GE_DOM_MODE</code></dt>
* <dt>{@code DOW_GE_DOM_MODE}</dt>
* <dd>
* Day of week after day of month; e.g., Sunday on or after March 15.
* </dd>
* <dt><code>DOW_LE_DOM_MODE</code></dt>
* <dt>{@code DOW_LE_DOM_MODE}</dt>
* <dd>
* Day of week before day of month; e.g., Sunday on or before March 15.
* </dd>
* </dl>
* The setting of this field affects the interpretation of the
* <code>startDay</code> field.
* <p>If <code>useDaylight</code> is false, this value is ignored.
* {@code startDay} field.
* <p>If {@code useDaylight} is false, this value is ignored.
* @serial
* @since 1.1.4
*/
@ -1151,26 +1151,26 @@ public class SimpleTimeZone extends TimeZone {
* Variables specifying the mode of the end rule. Takes the following
* values:
* <dl>
* <dt><code>DOM_MODE</code></dt>
* <dt>{@code DOM_MODE}</dt>
* <dd>
* Exact day of week; e.g., March 1.
* </dd>
* <dt><code>DOW_IN_MONTH_MODE</code></dt>
* <dt>{@code DOW_IN_MONTH_MODE}</dt>
* <dd>
* Day of week in month; e.g., last Sunday in March.
* </dd>
* <dt><code>DOW_GE_DOM_MODE</code></dt>
* <dt>{@code DOW_GE_DOM_MODE}</dt>
* <dd>
* Day of week after day of month; e.g., Sunday on or after March 15.
* </dd>
* <dt><code>DOW_LE_DOM_MODE</code></dt>
* <dt>{@code DOW_LE_DOM_MODE}</dt>
* <dd>
* Day of week before day of month; e.g., Sunday on or before March 15.
* </dd>
* </dl>
* The setting of this field affects the interpretation of the
* <code>endDay</code> field.
* <p>If <code>useDaylight</code> is false, this value is ignored.
* {@code endDay} field.
* <p>If {@code useDaylight} is false, this value is ignored.
* @serial
* @since 1.1.4
*/
@ -1180,7 +1180,7 @@ public class SimpleTimeZone extends TimeZone {
* A positive value indicating the amount of time saved during DST in
* milliseconds.
* Typically one hour (3600000); sometimes 30 minutes (1800000).
* <p>If <code>useDaylight</code> is false, this value is ignored.
* <p>If {@code useDaylight} is false, this value is ignored.
* @serial
* @since 1.1.4
*/
@ -1260,17 +1260,17 @@ public class SimpleTimeZone extends TimeZone {
* </dd>
* <dt><b>1</b></dt>
* <dd>
* JDK 1.1.4 or later. Includes three new fields: <code>startMode</code>,
* <code>endMode</code>, and <code>dstSavings</code>.
* JDK 1.1.4 or later. Includes three new fields: {@code startMode},
* {@code endMode}, and {@code dstSavings}.
* </dd>
* <dt><b>2</b></dt>
* <dd>
* JDK 1.3 or later. Includes two new fields: <code>startTimeMode</code>
* and <code>endTimeMode</code>.
* JDK 1.3 or later. Includes two new fields: {@code startTimeMode}
* and {@code endTimeMode}.
* </dd>
* </dl>
* When streaming out this class, the most recent format
* and the highest allowable <code>serialVersionOnStream</code>
* and the highest allowable {@code serialVersionOnStream}
* is written.
* @serial
* @since 1.1.4
@ -1625,16 +1625,16 @@ public class SimpleTimeZone extends TimeZone {
* Save the state of this object to a stream (i.e., serialize it).
*
* @serialData We write out two formats, a JDK 1.1 compatible format, using
* <code>DOW_IN_MONTH_MODE</code> rules, in the required section, followed
* {@code DOW_IN_MONTH_MODE} rules, in the required section, followed
* by the full rules, in packed format, in the optional section. The
* optional section will be ignored by JDK 1.1 code upon stream in.
* <p> Contents of the optional section: The length of a byte array is
* emitted (int); this is 4 as of this release. The byte array of the given
* length is emitted. The contents of the byte array are the true values of
* the fields <code>startDay</code>, <code>startDayOfWeek</code>,
* <code>endDay</code>, and <code>endDayOfWeek</code>. The values of these
* the fields {@code startDay}, {@code startDayOfWeek},
* {@code endDay}, and {@code endDayOfWeek}. The values of these
* fields in the required section are approximate values suited to the rule
* mode <code>DOW_IN_MONTH_MODE</code>, which is the only mode recognized by
* mode {@code DOW_IN_MONTH_MODE}, which is the only mode recognized by
* JDK 1.1.
*/
@java.io.Serial

View file

@ -48,44 +48,44 @@ import sun.util.calendar.ZoneInfoFile;
import sun.util.locale.provider.TimeZoneNameUtility;
/**
* <code>TimeZone</code> represents a time zone offset, and also figures out daylight
* {@code TimeZone} represents a time zone offset, and also figures out daylight
* savings.
*
* <p>
* Typically, you get a <code>TimeZone</code> using <code>getDefault</code>
* which creates a <code>TimeZone</code> based on the time zone where the program
* is running. For example, for a program running in Japan, <code>getDefault</code>
* creates a <code>TimeZone</code> object based on Japanese Standard Time.
* Typically, you get a {@code TimeZone} using {@code getDefault}
* which creates a {@code TimeZone} based on the time zone where the program
* is running. For example, for a program running in Japan, {@code getDefault}
* creates a {@code TimeZone} object based on Japanese Standard Time.
*
* <p>
* You can also get a <code>TimeZone</code> using <code>getTimeZone</code>
* You can also get a {@code TimeZone} using {@code getTimeZone}
* along with a time zone ID. For instance, the time zone ID for the
* U.S. Pacific Time zone is "America/Los_Angeles". So, you can get a
* U.S. Pacific Time <code>TimeZone</code> object with:
* U.S. Pacific Time {@code TimeZone} object with:
* <blockquote><pre>
* TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles");
* </pre></blockquote>
* You can use the <code>getAvailableIDs</code> method to iterate through
* You can use the {@code getAvailableIDs} method to iterate through
* all the supported time zone IDs. You can then choose a
* supported ID to get a <code>TimeZone</code>.
* supported ID to get a {@code TimeZone}.
* If the time zone you want is not represented by one of the
* supported IDs, then a custom time zone ID can be specified to
* produce a TimeZone. The syntax of a custom time zone ID is:
*
* <blockquote><pre>
* <a id="CustomID"><i>CustomID:</i></a>
* <code>GMT</code> <i>Sign</i> <i>Hours</i> <code>:</code> <i>Minutes</i>
* <code>GMT</code> <i>Sign</i> <i>Hours</i> <i>Minutes</i>
* <code>GMT</code> <i>Sign</i> <i>Hours</i>
* {@code GMT} <i>Sign</i> <i>Hours</i> {@code :} <i>Minutes</i>
* {@code GMT} <i>Sign</i> <i>Hours</i> <i>Minutes</i>
* {@code GMT} <i>Sign</i> <i>Hours</i>
* <i>Sign:</i> one of
* <code>+ -</code>
* {@code + -}
* <i>Hours:</i>
* <i>Digit</i>
* <i>Digit</i> <i>Digit</i>
* <i>Minutes:</i>
* <i>Digit</i> <i>Digit</i>
* <i>Digit:</i> one of
* <code>0 1 2 3 4 5 6 7 8 9</code>
* {@code 0 1 2 3 4 5 6 7 8 9}
* </pre></blockquote>
*
* <i>Hours</i> must be between 0 to 23 and <i>Minutes</i> must be
@ -95,22 +95,22 @@ import sun.util.locale.provider.TimeZoneNameUtility;
* The format is locale independent and digits must be taken from the
* Basic Latin block of the Unicode standard. No daylight saving time
* transition schedule can be specified with a custom time zone ID. If
* the specified string doesn't match the syntax, <code>"GMT"</code>
* the specified string doesn't match the syntax, {@code "GMT"}
* is used.
* <p>
* When creating a <code>TimeZone</code>, the specified custom time
* When creating a {@code TimeZone}, the specified custom time
* zone ID is normalized in the following syntax:
* <blockquote><pre>
* <a id="NormalizedCustomID"><i>NormalizedCustomID:</i></a>
* <code>GMT</code> <i>Sign</i> <i>TwoDigitHours</i> <code>:</code> <i>Minutes</i>
* {@code GMT} <i>Sign</i> <i>TwoDigitHours</i> {@code :} <i>Minutes</i>
* <i>Sign:</i> one of
* <code>+ -</code>
* {@code + -}
* <i>TwoDigitHours:</i>
* <i>Digit</i> <i>Digit</i>
* <i>Minutes:</i>
* <i>Digit</i> <i>Digit</i>
* <i>Digit:</i> one of
* <code>0 1 2 3 4 5 6 7 8 9</code>
* {@code 0 1 2 3 4 5 6 7 8 9}
* </pre></blockquote>
* For example, TimeZone.getTimeZone("GMT-8").getID() returns "GMT-08:00".
*
@ -139,7 +139,7 @@ public abstract class TimeZone implements Serializable, Cloneable {
}
/**
* A style specifier for <code>getDisplayName()</code> indicating
* A style specifier for {@code getDisplayName()} indicating
* a short name, such as "PST."
* @see #LONG
* @since 1.2
@ -147,7 +147,7 @@ public abstract class TimeZone implements Serializable, Cloneable {
public static final int SHORT = 0;
/**
* A style specifier for <code>getDisplayName()</code> indicating
* A style specifier for {@code getDisplayName()} indicating
* a long name, such as "Pacific Standard Time."
* @see #SHORT
* @since 1.2
@ -168,7 +168,7 @@ public abstract class TimeZone implements Serializable, Cloneable {
* daylight savings. This is the offset to add to UTC to get local time.
* <p>
* This method returns a historically correct offset if an
* underlying <code>TimeZone</code> implementation subclass
* underlying {@code TimeZone} implementation subclass
* supports historical Daylight Saving Time schedule and GMT
* offset changes.
*
@ -246,7 +246,7 @@ public abstract class TimeZone implements Serializable, Cloneable {
* Sets the base time zone offset to GMT.
* This is the offset to add to UTC to get local time.
* <p>
* If an underlying <code>TimeZone</code> implementation subclass
* If an underlying {@code TimeZone} implementation subclass
* supports historical GMT offset changes, the specified GMT
* offset is set as the latest GMT offset and the difference from
* the known latest GMT offset value is used to adjust all
@ -262,7 +262,7 @@ public abstract class TimeZone implements Serializable, Cloneable {
* affected by daylight saving time, it is called <I>raw
* offset</I>.
* <p>
* If an underlying <code>TimeZone</code> implementation subclass
* If an underlying {@code TimeZone} implementation subclass
* supports historical GMT offset changes, the method returns the
* raw offset value of the current date. In Honolulu, for example,
* its raw offset changed from GMT-10:30 to GMT-10:00 in 1947, and
@ -376,10 +376,10 @@ public abstract class TimeZone implements Serializable, Cloneable {
*
* <p>When looking up a time zone name, the {@linkplain
* ResourceBundle.Control#getCandidateLocales(String,Locale) default
* <code>Locale</code> search path of <code>ResourceBundle</code>} derived
* {@code Locale} search path of {@code ResourceBundle}} derived
* from the specified {@code locale} is used. (No {@linkplain
* ResourceBundle.Control#getFallbackLocale(String,Locale) fallback
* <code>Locale</code>} search is performed.) If a time zone name in any
* {@code Locale}} search is performed.) If a time zone name in any
* {@code Locale} of the search path, including {@link Locale#ROOT}, is
* found, the name is returned. Otherwise, a string in the
* <a href="#NormalizedCustomID">normalized custom ID format</a> is returned.
@ -504,14 +504,14 @@ public abstract class TimeZone implements Serializable, Cloneable {
public abstract boolean inDaylightTime(Date date);
/**
* Gets the <code>TimeZone</code> for the given ID.
* Gets the {@code TimeZone} for the given ID.
*
* @param ID the ID for a <code>TimeZone</code>, either an abbreviation
* @param ID the ID for a {@code TimeZone}, either an abbreviation
* such as "PST", a full name such as "America/Los_Angeles", or a custom
* ID such as "GMT-8:00". Note that the support of abbreviations is
* for JDK 1.1.x compatibility only and full names should be used.
*
* @return the specified <code>TimeZone</code>, or the GMT zone if the given ID
* @return the specified {@code TimeZone}, or the GMT zone if the given ID
* cannot be understood.
*/
public static synchronized TimeZone getTimeZone(String ID) {
@ -733,7 +733,7 @@ public abstract class TimeZone implements Serializable, Cloneable {
* Returns true if this zone has the same rule and offset as another zone.
* That is, if this zone differs only in ID, if at all. Returns false
* if the other zone is null.
* @param other the <code>TimeZone</code> object to be compared with
* @param other the {@code TimeZone} object to be compared with
* @return true if the other zone is not null and is the same as this one,
* with the possible exception of the ID
* @since 1.2
@ -744,9 +744,9 @@ public abstract class TimeZone implements Serializable, Cloneable {
}
/**
* Creates a copy of this <code>TimeZone</code>.
* Creates a copy of this {@code TimeZone}.
*
* @return a clone of this <code>TimeZone</code>
* @return a clone of this {@code TimeZone}
*/
public Object clone()
{
@ -765,10 +765,10 @@ public abstract class TimeZone implements Serializable, Cloneable {
// =======================privates===============================
/**
* The string identifier of this <code>TimeZone</code>. This is a
* programmatic identifier used internally to look up <code>TimeZone</code>
* The string identifier of this {@code TimeZone}. This is a
* programmatic identifier used internally to look up {@code TimeZone}
* objects from the system table and also to map them to their localized
* display names. <code>ID</code> values are unique in the system
* display names. {@code ID} values are unique in the system
* table but may not be for dynamically created zones.
* @serial
*/

View file

@ -27,7 +27,7 @@ package java.util;
/**
* <p>
* The <code> TooManyListenersException </code> Exception is used as part of
* The {@code TooManyListenersException } Exception is used as part of
* the Java Event model to annotate and implement a unicast special case of
* a multicast Event Source.
* </p>

View file

@ -42,11 +42,11 @@ class JarEntry extends ZipEntry {
CodeSigner[] signers;
/**
* Creates a new <code>JarEntry</code> for the specified JAR file
* Creates a new {@code JarEntry} for the specified JAR file
* entry name.
*
* @param name the JAR file entry name
* @throws NullPointerException if the entry name is <code>null</code>
* @throws NullPointerException if the entry name is {@code null}
* @throws IllegalArgumentException if the entry name is longer than
* 0xFFFF bytes.
*/
@ -55,20 +55,20 @@ class JarEntry extends ZipEntry {
}
/**
* Creates a new <code>JarEntry</code> with fields taken from the
* specified <code>ZipEntry</code> object.
* @param ze the <code>ZipEntry</code> object to create the
* <code>JarEntry</code> from
* Creates a new {@code JarEntry} with fields taken from the
* specified {@code ZipEntry} object.
* @param ze the {@code ZipEntry} object to create the
* {@code JarEntry} from
*/
public JarEntry(ZipEntry ze) {
super(ze);
}
/**
* Creates a new <code>JarEntry</code> with fields taken from the
* specified <code>JarEntry</code> object.
* Creates a new {@code JarEntry} with fields taken from the
* specified {@code JarEntry} object.
*
* @param je the <code>JarEntry</code> to copy
* @param je the {@code JarEntry} to copy
*/
public JarEntry(JarEntry je) {
this((ZipEntry)je);
@ -78,11 +78,11 @@ class JarEntry extends ZipEntry {
}
/**
* Returns the <code>Manifest</code> <code>Attributes</code> for this
* entry, or <code>null</code> if none.
* Returns the {@code Manifest} {@code Attributes} for this
* entry, or {@code null} if none.
*
* @return the <code>Manifest</code> <code>Attributes</code> for this
* entry, or <code>null</code> if none
* @return the {@code Manifest} {@code Attributes} for this
* entry, or {@code null} if none
* @throws IOException if an I/O error has occurred
*/
public Attributes getAttributes() throws IOException {
@ -90,11 +90,11 @@ class JarEntry extends ZipEntry {
}
/**
* Returns the <code>Certificate</code> objects for this entry, or
* <code>null</code> if none. This method can only be called once
* the <code>JarEntry</code> has been completely verified by reading
* Returns the {@code Certificate} objects for this entry, or
* {@code null} if none. This method can only be called once
* the {@code JarEntry} has been completely verified by reading
* from the entry input stream until the end of the stream has been
* reached. Otherwise, this method will return <code>null</code>.
* reached. Otherwise, this method will return {@code null}.
*
* <p>The returned certificate array comprises all the signer certificates
* that were used to verify this entry. Each signer certificate is
@ -103,25 +103,25 @@ class JarEntry extends ZipEntry {
* bottom-to-top (i.e., with the signer certificate first and the (root)
* certificate authority last).
*
* @return the <code>Certificate</code> objects for this entry, or
* <code>null</code> if none.
* @return the {@code Certificate} objects for this entry, or
* {@code null} if none.
*/
public Certificate[] getCertificates() {
return certs == null ? null : certs.clone();
}
/**
* Returns the <code>CodeSigner</code> objects for this entry, or
* <code>null</code> if none. This method can only be called once
* the <code>JarEntry</code> has been completely verified by reading
* Returns the {@code CodeSigner} objects for this entry, or
* {@code null} if none. This method can only be called once
* the {@code JarEntry} has been completely verified by reading
* from the entry input stream until the end of the stream has been
* reached. Otherwise, this method will return <code>null</code>.
* reached. Otherwise, this method will return {@code null}.
*
* <p>The returned array comprises all the code signers that have signed
* this entry.
*
* @return the <code>CodeSigner</code> objects for this entry, or
* <code>null</code> if none.
* @return the {@code CodeSigner} objects for this entry, or
* {@code null} if none.
*
* @since 1.5
*/

View file

@ -31,10 +31,10 @@ import sun.security.util.ManifestEntryVerifier;
import jdk.internal.util.jar.JarIndex;
/**
* The <code>JarInputStream</code> class is used to read the contents of
* The {@code JarInputStream} class is used to read the contents of
* a JAR file from any input stream. It extends the class
* <code>java.util.zip.ZipInputStream</code> with support for reading
* an optional <code>Manifest</code> entry. The <code>Manifest</code>
* {@code java.util.zip.ZipInputStream} with support for reading
* an optional {@code Manifest} entry. The {@code Manifest}
* can be used to store meta-information about the JAR file and its entries.
*
* @author David Connelly
@ -52,7 +52,7 @@ class JarInputStream extends ZipInputStream {
private boolean tryManifest;
/**
* Creates a new <code>JarInputStream</code> and reads the optional
* Creates a new {@code JarInputStream} and reads the optional
* manifest. If a manifest is present, also attempts to verify
* the signatures if the JarInputStream is signed.
* @param in the actual input stream
@ -63,7 +63,7 @@ class JarInputStream extends ZipInputStream {
}
/**
* Creates a new <code>JarInputStream</code> and reads the optional
* Creates a new {@code JarInputStream} and reads the optional
* manifest. If a manifest is present and verify is true, also attempts
* to verify the signatures if the JarInputStream is signed.
*
@ -116,11 +116,11 @@ class JarInputStream extends ZipInputStream {
}
/**
* Returns the <code>Manifest</code> for this JAR file, or
* <code>null</code> if none.
* Returns the {@code Manifest} for this JAR file, or
* {@code null} if none.
*
* @return the <code>Manifest</code> for this JAR file, or
* <code>null</code> if none.
* @return the {@code Manifest} for this JAR file, or
* {@code null} if none.
*/
public Manifest getManifest() {
return man;
@ -181,21 +181,21 @@ class JarInputStream extends ZipInputStream {
/**
* Reads from the current JAR file entry into an array of bytes.
* If <code>len</code> is not zero, the method
* If {@code len} is not zero, the method
* blocks until some input is available; otherwise, no
* bytes are read and <code>0</code> is returned.
* bytes are read and {@code 0} is returned.
* If verification has been enabled, any invalid signature
* on the current entry will be reported at some point before the
* end of the entry is reached.
* @param b the buffer into which the data is read
* @param off the start offset in the destination array <code>b</code>
* @param off the start offset in the destination array {@code b}
* @param len the maximum number of bytes to read
* @return the actual number of bytes read, or -1 if the end of the
* entry is reached
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @throws NullPointerException If {@code b} is {@code null}.
* @throws IndexOutOfBoundsException If {@code off} is negative,
* {@code len} is negative, or {@code len} is greater than
* {@code b.length - off}
* @throws ZipException if a ZIP file error has occurred
* @throws IOException if an I/O error has occurred
* @throws SecurityException if any of the jar file entries
@ -215,13 +215,13 @@ class JarInputStream extends ZipInputStream {
}
/**
* Creates a new <code>JarEntry</code> (<code>ZipEntry</code>) for the
* Creates a new {@code JarEntry} ({@code ZipEntry}) for the
* specified JAR file entry name. The manifest attributes of
* the specified JAR file entry name will be copied to the new
* <CODE>JarEntry</CODE>.
*
* @param name the name of the JAR/ZIP file entry
* @return the <code>JarEntry</code> object just created
* @return the {@code JarEntry} object just created
*/
protected ZipEntry createZipEntry(String name) {
JarEntry e = new JarEntry(name);

View file

@ -29,11 +29,11 @@ import java.util.zip.*;
import java.io.*;
/**
* The <code>JarOutputStream</code> class is used to write the contents
* The {@code JarOutputStream} class is used to write the contents
* of a JAR file to any output stream. It extends the class
* <code>java.util.zip.ZipOutputStream</code> with support
* for writing an optional <code>Manifest</code> entry. The
* <code>Manifest</code> can be used to specify meta-information about
* {@code java.util.zip.ZipOutputStream} with support
* for writing an optional {@code Manifest} entry. The
* {@code Manifest} can be used to specify meta-information about
* the JAR file and its entries.
*
* @author David Connelly
@ -46,12 +46,12 @@ class JarOutputStream extends ZipOutputStream {
private static final int JAR_MAGIC = 0xCAFE;
/**
* Creates a new <code>JarOutputStream</code> with the specified
* <code>Manifest</code>. The manifest is written as the first
* Creates a new {@code JarOutputStream} with the specified
* {@code Manifest}. The manifest is written as the first
* entry to the output stream.
*
* @param out the actual output stream
* @param man the optional <code>Manifest</code>
* @param man the optional {@code Manifest}
* @throws IOException if an I/O error has occurred
*/
public JarOutputStream(OutputStream out, Manifest man) throws IOException {
@ -66,7 +66,7 @@ class JarOutputStream extends ZipOutputStream {
}
/**
* Creates a new <code>JarOutputStream</code> with no manifest.
* Creates a new {@code JarOutputStream} with no manifest.
* @param out the actual output stream
* @throws IOException if an I/O error has occurred
*/

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 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
@ -31,7 +31,7 @@
*
* <h2>Package Specification</h2>
*
* The <code>java.util.jar</code> package is based on the following
* The {@code java.util.jar} package is based on the following
* specifications:
*
* <ul>

View file

@ -357,7 +357,7 @@ import jdk.internal.util.ArraysSupport;
* <a href="#UNIX_LINES">d</a> <a href="#MULTILINE">m</a> <a href="#DOTALL">s</a>
* <a href="#UNICODE_CASE">u</a> <a href="#COMMENTS">x</a> <a href="#UNICODE_CHARACTER_CLASS">U</a>
* on - off</td></tr>
* <tr><th style="vertical-align:top; font-weight:normal" id="non_capture_group_flags"><code>(?idmsuxU-idmsuxU:</code><i>X</i>{@code )}&nbsp;&nbsp;</th>
* <tr><th style="vertical-align:top; font-weight:normal" id="non_capture_group_flags">{@code (?idmsuxU-idmsuxU:}<i>X</i>{@code )}&nbsp;&nbsp;</th>
* <td headers="matches special non_capture_group_flags"><i>X</i>, as a <a href="#cg">non-capturing group</a> with the
* given flags <a href="#CASE_INSENSITIVE">i</a> <a href="#UNIX_LINES">d</a>
* <a href="#MULTILINE">m</a> <a href="#DOTALL">s</a> <a href="#UNICODE_CASE">u</a >

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 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
@ -37,7 +37,7 @@
* interface in order to support matching against characters from a
* wide variety of input sources. </p>
*
* <p> Unless otherwise noted, passing a <code>null</code> argument to a
* <p> Unless otherwise noted, passing a {@code null} argument to a
* method in any class or interface in this package will cause a
* {@link java.lang.NullPointerException NullPointerException} to be
* thrown.

View file

@ -190,9 +190,9 @@ public abstract class CalendarNameProvider extends LocaleServiceProvider {
/**
* Returns the string representation (display name) of the calendar
* <code>field value</code> in the given <code>style</code> and
* <code>locale</code>. If no string representation is
* applicable, <code>null</code> is returned.
* {@code field value} in the given {@code style} and
* {@code locale}. If no string representation is
* applicable, {@code null} is returned.
*
* <p>{@code field} is a {@code Calendar} field index, such as {@link
* Calendar#MONTH}. The time zone fields, {@link Calendar#ZONE_OFFSET} and

View file

@ -63,10 +63,10 @@ public abstract class CurrencyNameProvider extends LocaleServiceProvider {
* @param locale the desired locale
* @return the symbol of the given currency code for the specified locale, or null if
* the symbol is not available for the locale
* @throws NullPointerException if <code>currencyCode</code> or
* <code>locale</code> is null
* @throws IllegalArgumentException if <code>currencyCode</code> is not in
* the form of three upper-case letters, or <code>locale</code> isn't
* @throws NullPointerException if {@code currencyCode} or
* {@code locale} is null
* @throws IllegalArgumentException if {@code currencyCode} is not in
* the form of three upper-case letters, or {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@ -84,13 +84,13 @@ public abstract class CurrencyNameProvider extends LocaleServiceProvider {
* @param locale the desired locale
* @return the name for the currency that is appropriate for display to the
* user, or null if the name is not available for the locale
* @throws IllegalArgumentException if <code>currencyCode</code> is not in
* the form of three upper-case letters, or <code>locale</code> isn't
* @throws IllegalArgumentException if {@code currencyCode} is not in
* the form of three upper-case letters, or {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
* @throws NullPointerException if <code>currencyCode</code> or
* <code>locale</code> is <code>null</code>
* @throws NullPointerException if {@code currencyCode} or
* {@code locale} is {@code null}
* @since 1.7
*/
public String getDisplayName(String currencyCode, Locale locale) {

View file

@ -48,10 +48,10 @@ public abstract class LocaleNameProvider extends LocaleServiceProvider {
* Returns a localized name for the given <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">
* IETF BCP47</a> language code and the given locale that is appropriate for
* display to the user.
* For example, if <code>languageCode</code> is "fr" and <code>locale</code>
* is en_US, getDisplayLanguage() will return "French"; if <code>languageCode</code>
* is "en" and <code>locale</code> is fr_FR, getDisplayLanguage() will return "anglais".
* If the name returned cannot be localized according to <code>locale</code>,
* For example, if {@code languageCode} is "fr" and {@code locale}
* is en_US, getDisplayLanguage() will return "French"; if {@code languageCode}
* is "en" and {@code locale} is fr_FR, getDisplayLanguage() will return "anglais".
* If the name returned cannot be localized according to {@code locale},
* (say, the provider does not have a Japanese name for Croatian),
* this method returns null.
* @param languageCode the language code string in the form of two to eight
@ -59,9 +59,9 @@ public abstract class LocaleNameProvider extends LocaleServiceProvider {
* @param locale the desired locale
* @return the name of the given language code for the specified locale, or null if it's not
* available.
* @throws NullPointerException if <code>languageCode</code> or <code>locale</code> is null
* @throws IllegalArgumentException if <code>languageCode</code> is not in the form of
* two or three lower-case letters, or <code>locale</code> isn't
* @throws NullPointerException if {@code languageCode} or {@code locale} is null
* @throws IllegalArgumentException if {@code languageCode} is not in the form of
* two or three lower-case letters, or {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@ -73,10 +73,10 @@ public abstract class LocaleNameProvider extends LocaleServiceProvider {
* Returns a localized name for the given <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">
* IETF BCP47</a> script code and the given locale that is appropriate for
* display to the user.
* For example, if <code>scriptCode</code> is "Latn" and <code>locale</code>
* is en_US, getDisplayScript() will return "Latin"; if <code>scriptCode</code>
* is "Cyrl" and <code>locale</code> is fr_FR, getDisplayScript() will return "cyrillique".
* If the name returned cannot be localized according to <code>locale</code>,
* For example, if {@code scriptCode} is "Latn" and {@code locale}
* is en_US, getDisplayScript() will return "Latin"; if {@code scriptCode}
* is "Cyrl" and {@code locale} is fr_FR, getDisplayScript() will return "cyrillique".
* If the name returned cannot be localized according to {@code locale},
* (say, the provider does not have a Japanese name for Cyrillic),
* this method returns null. The default implementation returns null.
* @param scriptCode the four letter script code string in the form of title-case
@ -86,9 +86,9 @@ public abstract class LocaleNameProvider extends LocaleServiceProvider {
* @param locale the desired locale
* @return the name of the given script code for the specified locale, or null if it's not
* available.
* @throws NullPointerException if <code>scriptCode</code> or <code>locale</code> is null
* @throws IllegalArgumentException if <code>scriptCode</code> is not in the form of
* four title case letters, or <code>locale</code> isn't
* @throws NullPointerException if {@code scriptCode} or {@code locale} is null
* @throws IllegalArgumentException if {@code scriptCode} is not in the form of
* four title case letters, or {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@ -103,10 +103,10 @@ public abstract class LocaleNameProvider extends LocaleServiceProvider {
* Returns a localized name for the given <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt">
* IETF BCP47</a> region code (either ISO 3166 country code or UN M.49 area
* codes) and the given locale that is appropriate for display to the user.
* For example, if <code>countryCode</code> is "FR" and <code>locale</code>
* is en_US, getDisplayCountry() will return "France"; if <code>countryCode</code>
* is "US" and <code>locale</code> is fr_FR, getDisplayCountry() will return "Etats-Unis".
* If the name returned cannot be localized according to <code>locale</code>,
* For example, if {@code countryCode} is "FR" and {@code locale}
* is en_US, getDisplayCountry() will return "France"; if {@code countryCode}
* is "US" and {@code locale} is fr_FR, getDisplayCountry() will return "Etats-Unis".
* If the name returned cannot be localized according to {@code locale},
* (say, the provider does not have a Japanese name for Croatia),
* this method returns null.
* @param countryCode the country(region) code string in the form of two
@ -115,9 +115,9 @@ public abstract class LocaleNameProvider extends LocaleServiceProvider {
* @param locale the desired locale
* @return the name of the given country code for the specified locale, or null if it's not
* available.
* @throws NullPointerException if <code>countryCode</code> or <code>locale</code> is null
* @throws IllegalArgumentException if <code>countryCode</code> is not in the form of
* two upper-case letters or three digit letters, or <code>locale</code> isn't
* @throws NullPointerException if {@code countryCode} or {@code locale} is null
* @throws IllegalArgumentException if {@code countryCode} is not in the form of
* two upper-case letters or three digit letters, or {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
@ -128,14 +128,14 @@ public abstract class LocaleNameProvider extends LocaleServiceProvider {
/**
* Returns a localized name for the given variant code and the given locale that
* is appropriate for display to the user.
* If the name returned cannot be localized according to <code>locale</code>,
* If the name returned cannot be localized according to {@code locale},
* this method returns null.
* @param variant the variant string
* @param locale the desired locale
* @return the name of the given variant string for the specified locale, or null if it's not
* available.
* @throws NullPointerException if <code>variant</code> or <code>locale</code> is null
* @throws IllegalArgumentException if <code>locale</code> isn't
* @throws NullPointerException if {@code variant} or {@code locale} is null
* @throws IllegalArgumentException if {@code locale} isn't
* one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.

View file

@ -33,12 +33,12 @@ import java.util.Locale;
* interfaces (SPIs).
* <p>
* Locale sensitive service provider interfaces are interfaces that
* correspond to locale sensitive classes in the <code>java.text</code>
* and <code>java.util</code> packages. The interfaces enable the
* correspond to locale sensitive classes in the {@code java.text}
* and {@code java.util} packages. The interfaces enable the
* construction of locale sensitive objects and the retrieval of
* localized names for these packages. Locale sensitive factory methods
* and methods for name retrieval in the <code>java.text</code> and
* <code>java.util</code> packages use implementations of the provider
* and methods for name retrieval in the {@code java.text} and
* {@code java.util} packages use implementations of the provider
* interfaces to offer support for locales beyond the set of locales
* supported by the Java runtime environment itself.
*
@ -68,17 +68,17 @@ import java.util.Locale;
* <pre>
* META-INF/services/java.text.spi.DateFormatProvider
* </pre>
* And the file <code>java.text.spi.DateFormatProvider</code> should have
* And the file {@code java.text.spi.DateFormatProvider} should have
* a line such as:
* <pre>
* <code>com.foo.DateFormatProviderImpl</code>
* {@code com.foo.DateFormatProviderImpl}
* </pre>
* which is the fully qualified class name of the class implementing
* <code>DateFormatProvider</code>.
* {@code DateFormatProvider}.
* <h3>Invocation of Locale Sensitive Services</h3>
* <p>
* Locale sensitive factory methods and methods for name retrieval in the
* <code>java.text</code> and <code>java.util</code> packages invoke
* {@code java.text} and {@code java.util} packages invoke
* service provider methods when needed to support the requested locale.
* The methods first check whether the Java runtime environment itself
* supports the requested locale, and use its support if available.
@ -93,7 +93,7 @@ import java.util.Locale;
* supports the requested locale, the methods go through a list of candidate
* locales and repeat the availability check for each until a match is found.
* The algorithm used for creating a list of candidate locales is same as
* the one used by <code>ResourceBundle</code> by default (see
* the one used by {@code ResourceBundle} by default (see
* {@link java.util.ResourceBundle.Control#getCandidateLocales getCandidateLocales}
* for the details). Even if a locale is resolved from the candidate list,
* methods that return requested objects or names are invoked with the original
@ -104,7 +104,7 @@ import java.util.Locale;
* Providers of names (but not providers of other objects) are allowed to
* return null for some name requests even for locales that they claim to
* support by including them in their return value for
* <code>getAvailableLocales</code>. Similarly, the Java runtime
* {@code getAvailableLocales}. Similarly, the Java runtime
* environment itself may not have all names for all locales that it
* supports. This is because the sets of objects for which names are
* requested can be large and vary over time, so that it's not always

View file

@ -57,7 +57,7 @@ public abstract class TimeZoneNameProvider extends LocaleServiceProvider {
* "tzdata", and the specification of the data format is part of the zic.8
* man page, which is contained in a file whose name starts with "tzcode".
* <p>
* If <code>daylight</code> is true, the method should return a name
* If {@code daylight} is true, the method should return a name
* appropriate for daylight saving time even if the specified time zone
* has not observed daylight saving time in the past.
*
@ -68,11 +68,11 @@ public abstract class TimeZoneNameProvider extends LocaleServiceProvider {
* @param locale the desired locale
* @return the human-readable name of the given time zone in the
* given locale, or null if it's not available.
* @throws IllegalArgumentException if <code>style</code> is invalid,
* or <code>locale</code> isn't one of the locales returned from
* @throws IllegalArgumentException if {@code style} is invalid,
* or {@code locale} isn't one of the locales returned from
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
* @throws NullPointerException if <code>ID</code> or <code>locale</code>
* @throws NullPointerException if {@code ID} or {@code locale}
* is null
* @see java.util.TimeZone#getDisplayName(boolean, int, java.util.Locale)
*/
@ -96,11 +96,11 @@ public abstract class TimeZoneNameProvider extends LocaleServiceProvider {
* @param locale the desired locale
* @return the human-readable generic name of the given time zone in the
* given locale, or {@code null} if it's not available.
* @throws IllegalArgumentException if <code>style</code> is invalid,
* or <code>locale</code> isn't one of the locales returned from
* @throws IllegalArgumentException if {@code style} is invalid,
* or {@code locale} isn't one of the locales returned from
* {@link LocaleServiceProvider#getAvailableLocales()
* getAvailableLocales()}.
* @throws NullPointerException if <code>ID</code> or <code>locale</code>
* @throws NullPointerException if {@code ID} or {@code locale}
* is {@code null}
* @since 1.8
*/

View file

@ -65,18 +65,18 @@ class CheckedInputStream extends FilterInputStream {
}
/**
* Reads into an array of bytes. If <code>len</code> is not zero, the method
* Reads into an array of bytes. If {@code len} is not zero, the method
* blocks until some input is available; otherwise, no
* bytes are read and <code>0</code> is returned.
* bytes are read and {@code 0} is returned.
* @param buf the buffer into which the data is read
* @param off the start offset in the destination array <code>b</code>
* @param off the start offset in the destination array {@code b}
* @param len the maximum number of bytes read
* @return the actual number of bytes read, or -1 if the end
* of the stream is reached.
* @throws NullPointerException If <code>buf</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>buf.length - off</code>
* @throws NullPointerException If {@code buf} is {@code null}.
* @throws IndexOutOfBoundsException If {@code off} is negative,
* {@code len} is negative, or {@code len} is greater than
* {@code buf.length - off}
* @throws IOException if an I/O error has occurred
*/
public int read(byte[] buf, int off, int len) throws IOException {

View file

@ -93,19 +93,19 @@ class GZIPInputStream extends InflaterInputStream {
}
/**
* Reads uncompressed data into an array of bytes. If <code>len</code> is not
* Reads uncompressed data into an array of bytes. If {@code len} is not
* zero, the method will block until some input can be decompressed; otherwise,
* no bytes are read and <code>0</code> is returned.
* no bytes are read and {@code 0} is returned.
* @param buf the buffer into which the data is read
* @param off the start offset in the destination array <code>b</code>
* @param off the start offset in the destination array {@code b}
* @param len the maximum number of bytes read
* @return the actual number of bytes read, or -1 if the end of the
* compressed input stream is reached
*
* @throws NullPointerException If <code>buf</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>buf.length - off</code>
* @throws NullPointerException If {@code buf} is {@code null}.
* @throws IndexOutOfBoundsException If {@code off} is negative,
* {@code len} is negative, or {@code len} is greater than
* {@code buf.length - off}
* @throws ZipException if the compressed input data is corrupt.
* @throws IOException if an I/O error has occurred.
*

View file

@ -124,18 +124,18 @@ class InflaterInputStream extends FilterInputStream {
}
/**
* Reads uncompressed data into an array of bytes. If <code>len</code> is not
* Reads uncompressed data into an array of bytes. If {@code len} is not
* zero, the method will block until some input can be decompressed; otherwise,
* no bytes are read and <code>0</code> is returned.
* no bytes are read and {@code 0} is returned.
* @param b the buffer into which the data is read
* @param off the start offset in the destination array <code>b</code>
* @param off the start offset in the destination array {@code b}
* @param len the maximum number of bytes read
* @return the actual number of bytes read, or -1 if the end of the
* compressed input is reached or a preset dictionary is needed
* @throws NullPointerException If <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @throws NullPointerException If {@code b} is {@code null}.
* @throws IndexOutOfBoundsException If {@code off} is negative,
* {@code len} is negative, or {@code len} is greater than
* {@code b.length - off}
* @throws ZipException if a ZIP format error has occurred
* @throws IOException if an I/O error has occurred
*/
@ -248,13 +248,13 @@ class InflaterInputStream extends FilterInputStream {
}
/**
* Tests if this input stream supports the <code>mark</code> and
* <code>reset</code> methods. The <code>markSupported</code>
* method of <code>InflaterInputStream</code> returns
* <code>false</code>.
* Tests if this input stream supports the {@code mark} and
* {@code reset} methods. The {@code markSupported}
* method of {@code InflaterInputStream} returns
* {@code false}.
*
* @return a <code>boolean</code> indicating if this stream type supports
* the <code>mark</code> and <code>reset</code> methods.
* @return a {@code boolean} indicating if this stream type supports
* the {@code mark} and {@code reset} methods.
* @see java.io.InputStream#mark(int)
* @see java.io.InputStream#reset()
*/
@ -265,7 +265,7 @@ class InflaterInputStream extends FilterInputStream {
/**
* Marks the current position in this input stream.
*
* <p> The <code>mark</code> method of <code>InflaterInputStream</code>
* <p> The {@code mark} method of {@code InflaterInputStream}
* does nothing.
*
* @param readlimit the maximum limit of bytes that can be read before
@ -277,11 +277,11 @@ class InflaterInputStream extends FilterInputStream {
/**
* Repositions this stream to the position at the time the
* <code>mark</code> method was last called on this input stream.
* {@code mark} method was last called on this input stream.
*
* <p> The method <code>reset</code> for class
* <code>InflaterInputStream</code> does nothing except throw an
* <code>IOException</code>.
* <p> The method {@code reset} for class
* {@code InflaterInputStream} does nothing except throw an
* {@code IOException}.
*
* @throws IOException if this method is invoked.
* @see java.io.InputStream#mark(int)

View file

@ -41,7 +41,7 @@ class ZipException extends IOException {
private static final long serialVersionUID = 8000196834066748623L;
/**
* Constructs a <code>ZipException</code> with <code>null</code>
* Constructs a {@code ZipException} with {@code null}
* as its error detail message.
*/
public ZipException() {
@ -49,7 +49,7 @@ class ZipException extends IOException {
}
/**
* Constructs a <code>ZipException</code> with the specified detail
* Constructs a {@code ZipException} with the specified detail
* message.
*
* @param s the detail message.

View file

@ -164,18 +164,18 @@ class ZipInputStream extends InflaterInputStream implements ZipConstants {
/**
* Reads from the current ZIP entry into an array of bytes.
* If <code>len</code> is not zero, the method
* If {@code len} is not zero, the method
* blocks until some input is available; otherwise, no
* bytes are read and <code>0</code> is returned.
* bytes are read and {@code 0} is returned.
* @param b the buffer into which the data is read
* @param off the start offset in the destination array <code>b</code>
* @param off the start offset in the destination array {@code b}
* @param len the maximum number of bytes read
* @return the actual number of bytes read, or -1 if the end of the
* entry is reached
* @throws NullPointerException if <code>b</code> is <code>null</code>.
* @throws IndexOutOfBoundsException if <code>off</code> is negative,
* <code>len</code> is negative, or <code>len</code> is greater than
* <code>b.length - off</code>
* @throws NullPointerException if {@code b} is {@code null}.
* @throws IndexOutOfBoundsException if {@code off} is negative,
* {@code len} is negative, or {@code len} is greater than
* {@code b.length - off}
* @throws ZipException if a ZIP file error has occurred
* @throws IOException if an I/O error has occurred
*/
@ -327,7 +327,7 @@ class ZipInputStream extends InflaterInputStream implements ZipConstants {
}
/**
* Creates a new <code>ZipEntry</code> object for the specified
* Creates a new {@code ZipEntry} object for the specified
* entry name.
*
* @param name the ZIP file entry name