--- old/src/share/classes/java/time/DayOfWeek.java 2013-02-08 10:47:46.000000000 -0800 +++ new/src/share/classes/java/time/DayOfWeek.java 2013-02-08 10:47:46.000000000 -0800 @@ -170,8 +170,9 @@ /** * Obtains an instance of {@code DayOfWeek} from a temporal object. *

- * A {@code TemporalAccessor} represents some form of date and time information. - * This factory converts the arbitrary temporal object to an instance of {@code DayOfWeek}. + * This obtains a day-of-week based on the specified temporal. + * A {@code TemporalAccessor} represents an arbitrary set of date and time information, + * which this factory converts to an instance of {@code DayOfWeek}. *

* The conversion extracts the {@link ChronoField#DAY_OF_WEEK DAY_OF_WEEK} field. *

@@ -206,8 +207,9 @@ /** * Gets the textual representation, such as 'Mon' or 'Friday'. *

- * This returns the textual name used to identify the day-of-week. - * The parameters control the length of the returned text and the locale. + * This returns the textual name used to identify the day-of-week, + * suitable for presentation to the user. + * The parameters control the style of the returned text and the locale. *

* If no textual mapping is found then the {@link #getValue() numeric value} is returned. * @@ -215,8 +217,8 @@ * @param locale the locale to use, not null * @return the text value of the day-of-week, not null */ - public String getText(TextStyle style, Locale locale) { - return new DateTimeFormatterBuilder().appendText(DAY_OF_WEEK, style).toFormatter(locale).print(this); + public String getDisplayName(TextStyle style, Locale locale) { + return new DateTimeFormatterBuilder().appendText(DAY_OF_WEEK, style).toFormatter(locale).format(this); } //----------------------------------------------------------------------- @@ -232,7 +234,7 @@ * All other {@code ChronoField} instances will return false. *

* If the field is not a {@code ChronoField}, then the result of this method - * is obtained by invoking {@code TemporalField.doIsSupported(TemporalAccessor)} + * is obtained by invoking {@code TemporalField.isSupportedBy(TemporalAccessor)} * passing {@code this} as the argument. * Whether the field is supported is determined by the field. * @@ -244,7 +246,7 @@ if (field instanceof ChronoField) { return field == DAY_OF_WEEK; } - return field != null && field.doIsSupported(this); + return field != null && field.isSupportedBy(this); } /** @@ -260,7 +262,7 @@ * All other {@code ChronoField} instances will throw a {@code DateTimeException}. *

* If the field is not a {@code ChronoField}, then the result of this method - * is obtained by invoking {@code TemporalField.doRange(TemporalAccessor)} + * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessor)} * passing {@code this} as the argument. * Whether the range can be obtained is determined by the field. * @@ -289,15 +291,13 @@ * All other {@code ChronoField} instances will throw a {@code DateTimeException}. *

* If the field is not a {@code ChronoField}, then the result of this method - * is obtained by invoking {@code TemporalField.doGet(TemporalAccessor)} + * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)} * passing {@code this} as the argument. Whether the value can be obtained, * and what the value represents, is determined by the field. * * @param field the field to get, not null * @return the value for the field, within the valid range of values * @throws DateTimeException if a value for the field cannot be obtained - * @throws DateTimeException if the range of valid values for the field exceeds an {@code int} - * @throws DateTimeException if the value is outside the range of valid values for the field * @throws ArithmeticException if numeric overflow occurs */ @Override @@ -320,7 +320,7 @@ * All other {@code ChronoField} instances will throw a {@code DateTimeException}. *

* If the field is not a {@code ChronoField}, then the result of this method - * is obtained by invoking {@code TemporalField.doGet(TemporalAccessor)} + * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)} * passing {@code this} as the argument. Whether the value can be obtained, * and what the value represents, is determined by the field. * @@ -336,7 +336,7 @@ } else if (field instanceof ChronoField) { throw new DateTimeException("Unsupported field: " + field.getName()); } - return field.doGet(this); + return field.getFrom(this); } //-----------------------------------------------------------------------