Package net.time4j.tz
Enum Class NameStyle
- All Implemented Interfaces:
Serializable
,Comparable<NameStyle>
,java.lang.constant.Constable
Defines the style of a timezone name.
- Author:
- Meno Hochschild
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionLong name in summer time (daylight saving).Long name without making a difference between winter or summer time.Long name in winter time (usually standard time, Ireland is an exception however).Abbreviation in summer time (daylight saving).Abbreviation without making a difference between winter or summer time.Abbreviation in winter time (usually standard time, Ireland is an exception however). -
Method Summary
Modifier and TypeMethodDescriptionboolean
Does this style denote an abbreviation?boolean
Does this style denote a daylight saving time?static NameStyle
Returns the enum constant of this class with the specified name.static NameStyle[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
SHORT_STANDARD_TIME
Abbreviation in winter time (usually standard time, Ireland is an exception however).
Example: CET
-
LONG_STANDARD_TIME
Long name in winter time (usually standard time, Ireland is an exception however).
Example: Central European Time
-
SHORT_DAYLIGHT_TIME
Abbreviation in summer time (daylight saving).
Example: CEST
-
LONG_DAYLIGHT_TIME
Long name in summer time (daylight saving).
Example: Central European Summer Time
-
SHORT_GENERIC_TIME
Abbreviation without making a difference between winter or summer time.
- Since:
- 4.23
-
LONG_GENERIC_TIME
Long name without making a difference between winter or summer time.
- Since:
- 4.23
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isAbbreviation
public boolean isAbbreviation()Does this style denote an abbreviation?
- Returns:
- boolean
-
isDaylightSaving
public boolean isDaylightSaving()Does this style denote a daylight saving time?
- Returns:
- boolean
- See Also:
SHORT_DAYLIGHT_TIME
,LONG_DAYLIGHT_TIME
-