55 * <a href="https://www.iana.org/time-zones">https://www.iana.org/time-zones</a>. |
55 * <a href="https://www.iana.org/time-zones">https://www.iana.org/time-zones</a>. |
56 * The data of this database is contained in a file whose name starts with |
56 * The data of this database is contained in a file whose name starts with |
57 * "tzdata", and the specification of the data format is part of the zic.8 |
57 * "tzdata", and the specification of the data format is part of the zic.8 |
58 * man page, which is contained in a file whose name starts with "tzcode". |
58 * man page, which is contained in a file whose name starts with "tzcode". |
59 * <p> |
59 * <p> |
60 * If <code>daylight</code> is true, the method should return a name |
60 * If {@code daylight} is true, the method should return a name |
61 * appropriate for daylight saving time even if the specified time zone |
61 * appropriate for daylight saving time even if the specified time zone |
62 * has not observed daylight saving time in the past. |
62 * has not observed daylight saving time in the past. |
63 * |
63 * |
64 * @param ID a time zone ID string |
64 * @param ID a time zone ID string |
65 * @param daylight if true, return the daylight saving name. |
65 * @param daylight if true, return the daylight saving name. |
66 * @param style either {@link java.util.TimeZone#LONG TimeZone.LONG} or |
66 * @param style either {@link java.util.TimeZone#LONG TimeZone.LONG} or |
67 * {@link java.util.TimeZone#SHORT TimeZone.SHORT} |
67 * {@link java.util.TimeZone#SHORT TimeZone.SHORT} |
68 * @param locale the desired locale |
68 * @param locale the desired locale |
69 * @return the human-readable name of the given time zone in the |
69 * @return the human-readable name of the given time zone in the |
70 * given locale, or null if it's not available. |
70 * given locale, or null if it's not available. |
71 * @throws IllegalArgumentException if <code>style</code> is invalid, |
71 * @throws IllegalArgumentException if {@code style} is invalid, |
72 * or <code>locale</code> isn't one of the locales returned from |
72 * or {@code locale} isn't one of the locales returned from |
73 * {@link java.util.spi.LocaleServiceProvider#getAvailableLocales() |
73 * {@link java.util.spi.LocaleServiceProvider#getAvailableLocales() |
74 * getAvailableLocales()}. |
74 * getAvailableLocales()}. |
75 * @throws NullPointerException if <code>ID</code> or <code>locale</code> |
75 * @throws NullPointerException if {@code ID} or {@code locale} |
76 * is null |
76 * is null |
77 * @see java.util.TimeZone#getDisplayName(boolean, int, java.util.Locale) |
77 * @see java.util.TimeZone#getDisplayName(boolean, int, java.util.Locale) |
78 */ |
78 */ |
79 public abstract String getDisplayName(String ID, boolean daylight, int style, Locale locale); |
79 public abstract String getDisplayName(String ID, boolean daylight, int style, Locale locale); |
80 |
80 |
94 * @param style either {@link java.util.TimeZone#LONG TimeZone.LONG} or |
94 * @param style either {@link java.util.TimeZone#LONG TimeZone.LONG} or |
95 * {@link java.util.TimeZone#SHORT TimeZone.SHORT} |
95 * {@link java.util.TimeZone#SHORT TimeZone.SHORT} |
96 * @param locale the desired locale |
96 * @param locale the desired locale |
97 * @return the human-readable generic name of the given time zone in the |
97 * @return the human-readable generic name of the given time zone in the |
98 * given locale, or {@code null} if it's not available. |
98 * given locale, or {@code null} if it's not available. |
99 * @throws IllegalArgumentException if <code>style</code> is invalid, |
99 * @throws IllegalArgumentException if {@code style} is invalid, |
100 * or <code>locale</code> isn't one of the locales returned from |
100 * or {@code locale} isn't one of the locales returned from |
101 * {@link LocaleServiceProvider#getAvailableLocales() |
101 * {@link LocaleServiceProvider#getAvailableLocales() |
102 * getAvailableLocales()}. |
102 * getAvailableLocales()}. |
103 * @throws NullPointerException if <code>ID</code> or <code>locale</code> |
103 * @throws NullPointerException if {@code ID} or {@code locale} |
104 * is {@code null} |
104 * is {@code null} |
105 * @since 1.8 |
105 * @since 1.8 |
106 */ |
106 */ |
107 public String getGenericDisplayName(String ID, int style, Locale locale) { |
107 public String getGenericDisplayName(String ID, int style, Locale locale) { |
108 return null; |
108 return null; |