Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package threeten
    Definition Classes
    org
  • package bp

    The main API for dates, times, instants, and durations.

    The main API for dates, times, instants, and durations.

    The classes defined here represent the principal date-time concepts, including instants, durations, dates, times, time-zones and periods. They are based on the ISO calendar system, which is the de facto world calendar following the proleptic Gregorian rules. All the classes are immutable and thread-safe.

    Each date time instance is composed of fields that are conveniently made available by the APIs. For lower level access to the fields refer to the org.threeten.bp.temporal package. Each class includes support for printing and parsing all manner of dates and times. Refer to the org.threeten.bp.format package for customization options.

    The org.threeten.bp.chrono package contains the calendar neutral API. This is intended for use by applications that need to use localized calendars. It is recommended that applications use the ISO-8601 dates and time classes from this package across system boundaries, such as to the database or across the network. The calendar neutral API should be reserved for interactions with users.

    Dates and Times

    org.threeten.bp.Instant is essentially a numeric timestamp. The current Instant can be retrieved from a org.threeten.bp.Clock. This is useful for logging and persistence of a point in time and has in the past been associated with storing the result from java.lang.System#currentTimeMillis().

    org.threeten.bp.LocalDate stores a date without a time. This stores a date like '2010-12-03' and could be used to store a birthday.

    org.threeten.bp.LocalTime stores a time without a date. This stores a time like '11:30' and could be used to store an opening or closing time.

    org.threeten.bp.LocalDateTime stores a date and time. This stores a date-time like '2010-12-03T11:30'.

    org.threeten.bp.OffsetTime stores a time and offset from UTC without a date. This stores a date like '11:30+01:00'. The ZoneOffset is of the form '+01:00'.

    org.threeten.bp.OffsetDateTime stores a date and time and offset from UTC. This stores a date-time like '2010-12-03T11:30+01:00'. This is sometimes found in XML messages and other forms of persistence, but contains less information than a full time-zone.

    org.threeten.bp.ZonedDateTime stores a date and time with a time-zone. This is useful if you want to perform accurate calculations of dates and times taking into account the org.threeten.bp.ZoneId, such as 'Europe/Paris'. Where possible, it is recommended to use a simpler class. The widespread use of time-zones tends to add considerable complexity to an application.

    Duration and Period

    Beyond dates and times, the API also allows the storage of period and durations of time. A org.threeten.bp.Duration is a simple measure of time along the time-line in nanoseconds. A org.threeten.bp.Period expresses an amount of time in units meaningful to humans, such as years or hours.

    Additional value types

    org.threeten.bp.Year stores a year on its own. This stores a single year in isolation, such as '2010'.

    org.threeten.bp.YearMonth stores a year and month without a day or time. This stores a year and month, such as '2010-12' and could be used for a credit card expiry.

    org.threeten.bp.MonthDay stores a month and day without a year or time. This stores a month and day-of-month, such as '--12-03' and could be used to store an annual event like a birthday without storing the year.

    org.threeten.bp.Month stores a month on its own. This stores a single month-of-year in isolation, such as 'DECEMBER'.

    org.threeten.bp.DayOfWeek stores a day-of-week on its own. This stores a single day-of-week in isolation, such as 'TUESDAY'.

    Definition Classes
    threeten
  • package zone

    Support for time-zones and their rules.

    Support for time-zones and their rules.

    Daylight Saving Time and Time-Zones are concepts used by Governments to alter local time. This package provides support for time-zones, their rules and the resulting gaps and overlaps in the local time-line typically caused by Daylight Saving Time.

    Definition Classes
    bp
  • DefaultTzdbZoneRulesProvider
  • Ser
  • ServiceLoaderZoneRulesInitializer
  • StandardZoneRules
  • ZoneMap
  • ZoneOffsetTransition
  • ZoneOffsetTransitionRule
  • ZoneRules
  • ZoneRulesBuilder
  • ZoneRulesException
  • ZoneRulesInitializer
  • ZoneRulesProvider

final class ZoneOffsetTransition extends Ordered[ZoneOffsetTransition] with Serializable

Creates an instance defining a transition between two offsets.

Annotations
@SerialVersionUID()
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZoneOffsetTransition
  2. Serializable
  3. Ordered
  4. Comparable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def <(that: ZoneOffsetTransition): Boolean
    Definition Classes
    Ordered
  4. def <=(that: ZoneOffsetTransition): Boolean
    Definition Classes
    Ordered
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def >(that: ZoneOffsetTransition): Boolean
    Definition Classes
    Ordered
  7. def >=(that: ZoneOffsetTransition): Boolean
    Definition Classes
    Ordered
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  10. def compare(transition: ZoneOffsetTransition): Int

    Compares this transition to another based on the transition instant.

    Compares this transition to another based on the transition instant.

    This compares the instants of each transition. The offsets are ignored, making this order inconsistent with equals.

    transition

    the transition to compare to, not null

    returns

    the comparator value, negative if less, positive if greater

    Definition Classes
    ZoneOffsetTransition → Ordered
  11. def compareTo(other: ZoneOffsetTransition): Int
    Definition Classes
    ZoneOffsetTransition → Ordered → Comparable
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(other: Any): Boolean

    Checks if this object equals another.

    Checks if this object equals another.

    The entire state of the object is compared.

    other

    the other object to compare to, null returns false

    returns

    true if equal

    Definition Classes
    ZoneOffsetTransition → AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def getDateTimeAfter: LocalDateTime

    Gets the local transition date-time, as would be expressed with the 'after' offset.

    Gets the local transition date-time, as would be expressed with the 'after' offset.

    This is the first date-time after the discontinuity, when the new offset applies.

    The combination of the 'before' date-time and offset represents the same instant as the 'after' date-time and offset.

    returns

    the transition date-time expressed with the after offset, not null

  17. def getDateTimeBefore: LocalDateTime

    Gets the local transition date-time, as would be expressed with the 'before' offset.

    Gets the local transition date-time, as would be expressed with the 'before' offset.

    This is the date-time where the discontinuity begins expressed with the 'before' offset. At this instant, the 'after' offset is actually used, therefore the combination of this date-time and the 'before' offset will never occur.

    The combination of the 'before' date-time and offset represents the same instant as the 'after' date-time and offset.

    returns

    the transition date-time expressed with the before offset, not null

  18. def getDuration: Duration

    Gets the duration of the transition.

    Gets the duration of the transition.

    In most cases, the transition duration is one hour, however this is not always the case. The duration will be positive for a gap and negative for an overlap. Time-zones are second-based, so the nanosecond part of the duration will be zero.

    returns

    the duration of the transition, positive for gaps, negative for overlaps

  19. def getInstant: Instant

    Gets the transition instant.

    Gets the transition instant.

    This is the instant of the discontinuity, which is defined as the first instant that the 'after' offset applies.

    The methods #getInstant(), #getDateTimeBefore() and #getDateTimeAfter() all represent the same instant.

    returns

    the transition instant, not null

  20. def getOffsetAfter: ZoneOffset

    Gets the offset after the transition.

    Gets the offset after the transition.

    This is the offset in use on and after the instant of the transition.

    returns

    the offset after the transition, not null

  21. def getOffsetBefore: ZoneOffset

    Gets the offset before the transition.

    Gets the offset before the transition.

    This is the offset in use before the instant of the transition.

    returns

    the offset before the transition, not null

  22. def hashCode(): Int

    Returns a suitable hash code.

    Returns a suitable hash code.

    returns

    the hash code

    Definition Classes
    ZoneOffsetTransition → AnyRef → Any
  23. def isGap: Boolean

    Does this transition represent a gap in the local time-line.

    Does this transition represent a gap in the local time-line.

    Gaps occur where there are local date-times that simply do not not exist. An example would be when the offset changes from +01:00 to +02:00. This might be described as 'the clocks will move forward one hour tonight at 1am'.

    returns

    true if this transition is a gap, false if it is an overlap

  24. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  25. def isOverlap: Boolean

    Does this transition represent a gap in the local time-line.

    Does this transition represent a gap in the local time-line.

    Overlaps occur where there are local date-times that exist twice. An example would be when the offset changes from +02:00 to +01:00. This might be described as 'the clocks will move back one hour tonight at 2am'.

    returns

    true if this transition is an overlap, false if it is a gap

  26. def isValidOffset(offset: ZoneOffset): Boolean

    Checks if the specified offset is valid during this transition.

    Checks if the specified offset is valid during this transition.

    This checks to see if the given offset will be valid at some point in the transition. A gap will always return false. An overlap will return true if the offset is either the before or after offset.

    offset

    the offset to check, null returns false

    returns

    true if the offset is valid during the transition

  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  31. def toEpochSecond: Long

    Gets the transition instant as an epoch second.

    Gets the transition instant as an epoch second.

    returns

    the transition epoch second

  32. def toString(): String

    Returns a string describing this object.

    Returns a string describing this object.

    returns

    a string for debugging, not null

    Definition Classes
    ZoneOffsetTransition → AnyRef → Any
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Serializable

Inherited from Ordered[ZoneOffsetTransition]

Inherited from Comparable[ZoneOffsetTransition]

Inherited from AnyRef

Inherited from Any

Ungrouped