javax.time.calendar.zone
Enum ZoneOffsetTransitionRule.TimeDefinition

java.lang.Object
  extended by java.lang.Enum<ZoneOffsetTransitionRule.TimeDefinition>
      extended by javax.time.calendar.zone.ZoneOffsetTransitionRule.TimeDefinition
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ZoneOffsetTransitionRule.TimeDefinition>
Enclosing class:
ZoneOffsetTransitionRule

public static enum ZoneOffsetTransitionRule.TimeDefinition
extends java.lang.Enum<ZoneOffsetTransitionRule.TimeDefinition>

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:


Enum Constant Summary
STANDARD
          The local date-time is expressed in terms of the standard offset.
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.
 
Method Summary
 OffsetDateTime createDateTime(LocalDateTime dateTime, ZoneOffset standardOffset, ZoneOffset wallOffset)
          Creates the offset date-time from the specified local date-time.
static ZoneOffsetTransitionRule.TimeDefinition valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ZoneOffsetTransitionRule.TimeDefinition[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UTC

public static final ZoneOffsetTransitionRule.TimeDefinition UTC
The local date-time is expressed in terms of the UTC offset.


WALL

public static final ZoneOffsetTransitionRule.TimeDefinition WALL
The local date-time is expressed in terms of the wall offset.


STANDARD

public static final ZoneOffsetTransitionRule.TimeDefinition STANDARD
The local date-time is expressed in terms of the standard offset.

Method Detail

values

public static ZoneOffsetTransitionRule.TimeDefinition[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ZoneOffsetTransitionRule.TimeDefinition c : ZoneOffsetTransitionRule.TimeDefinition.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ZoneOffsetTransitionRule.TimeDefinition valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - 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 null
standardOffset - the standard offset, not null
wallOffset - the wall offset, not null
Returns:
the created offset date-time in the wall offset, not null