Summary
Add public getter methods to obtain the fields that are used for equality.
Problem
There are descriptions for the instance's locale
and patterns
, but there is no way to obtain them, other than parsing the String from toString()
.
Solution
Add two public methods, getLocale()
and getPatterns()
.
Specification
Add the following two methods in ListFormat
class:
/**
* {@return the {@code Locale} of this ListFormat}
*
* The {@code locale} is defined by {@link #getInstance(Locale, Type, Style)} or
* {@link #getInstance(String[])}.
*/
public Locale getLocale()
/**
* {@return the patterns used in this ListFormat}
*
* The {@code patterns} are defined by {@link #getInstance(Locale, Type, Style)} or
* {@link #getInstance(String[])}.
*/
public String[] getPatterns()
- csr of
-
JDK-8318569 Add getter methods for Locale and Patterns in ListFormat
-
- Resolved
-