mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8318569: Add getter methods for Locale and Patterns in ListFormat
Reviewed-by: joehw, rriggs, iris, mli
This commit is contained in:
parent
6f352740cb
commit
116503754c
2 changed files with 60 additions and 1 deletions
|
@ -322,6 +322,26 @@ public final class ListFormat extends Format {
|
|||
return new ListFormat(Locale.ROOT, Arrays.copyOf(patterns, PATTERN_ARRAY_LENGTH));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@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 locale;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@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() {
|
||||
return Arrays.copyOf(patterns, patterns.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@return the string that consists of the input strings, concatenated with the
|
||||
* patterns of this {@code ListFormat}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue