Skip to content

Commit a520887

Browse files
committed
8318487: Specification of the ListFormat.equals() method can be improved
Reviewed-by: joehw, rriggs, lancea, iris
1 parent cf4ede0 commit a520887

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/java.base/share/classes/java/text/ListFormat.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -500,11 +500,12 @@ public AttributedCharacterIterator formatToCharacterIterator(Object arguments) {
500500
}
501501

502502
/**
503-
* Checks if this {@code ListFormat} is equal to another {@code ListFormat}.
504-
* The comparison is based on the {@code Locale} and formatting patterns, given or
505-
* generated with {@code Locale}, {@code Type}, and {@code Style}.
506-
* @param obj the object to check, {@code null} returns {@code false}
507-
* @return {@code true} if this is equals to the other {@code ListFormat}
503+
* Compares the specified object with this {@code ListFormat} for equality.
504+
* Returns {@code true} if the specified object is also a {@code ListFormat}, and
505+
* {@code locale} and {@code patterns}, returned from {@link #getLocale()}
506+
* and {@link #getPatterns()} respectively, are equal.
507+
* @param obj the object to be compared for equality.
508+
* @return {@code true} if the specified object is equal to this {@code ListFormat}
508509
*/
509510
@Override
510511
public boolean equals(Object obj) {

0 commit comments

Comments
 (0)