Package javax.time.calendar.zone
Enum Class ZoneRulesBuilder.TimeDefinition
java.lang.Object
java.lang.Enum<ZoneRulesBuilder.TimeDefinition>
javax.time.calendar.zone.ZoneRulesBuilder.TimeDefinition
- All Implemented Interfaces:
Serializable
,Comparable<ZoneRulesBuilder.TimeDefinition>
,Constable
- Enclosing class:
- ZoneRulesBuilder
A definition of the way a local time can be converted to an offset time.
Time zone rules are expressed in one of three ways:
- Relative to UTC
- Relative to the standard offset in force
- Relative to the wall offset (what you would see on a clock on the wall)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateDateTime
(LocalDateTime dateTime, ZoneOffset standardOffset, ZoneOffset wallOffset) Creates the offset date-time from the specified local date-time.Returns the enum constant of this class with the specified name.static ZoneRulesBuilder.TimeDefinition[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UTC
The local date-time is expressed in terms of the UTC offset. -
WALL
The local date-time is expressed in terms of the wall offset. -
STANDARD
The local date-time is expressed in terms of the standard offset.
-
-
Constructor Details
-
TimeDefinition
private TimeDefinition()
-
-
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
-
createDateTime
public OffsetDateTime createDateTime(LocalDateTime dateTime, ZoneOffset standardOffset, ZoneOffset wallOffset) Creates the offset date-time from the specified local date-time.This method converts a local date-time to an offset date-time using an algorithm based on the definition type. The UTC type builds the offset date-time using the UTC offset. The STANDARD type builds the offset date-time using the standard offset. The WALL type builds the offset date-time using the wall offset. The result always uses the wall-offset, thus a conversion may occur.
- Parameters:
dateTime
- the local date-time, not nullstandardOffset
- the standard offset, not nullwallOffset
- the wall offset, not null- Returns:
- the created offset date-time in the wall offset, never null
-