java.time

OffsetTime

object OffsetTime extends Serializable

Annotations
@SerialVersionUID( 7264499704384272492L )
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. OffsetTime
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val MAX: OffsetTime

    The maximum supported OffsetTime, '23:59:59.

    The maximum supported OffsetTime, '23:59:59.999999999-18:00'. This is the time just before midnight at the end of the day in the minimum offset (larger negative offsets are later on the time-line). This combines LocalTime#MAX and ZoneOffset#MIN. This could be used by an application as a "far future" date.

  7. val MIN: OffsetTime

    The minimum supported OffsetTime, '00:00:00+18:00'.

    The minimum supported OffsetTime, '00:00:00+18:00'. This is the time of midnight at the start of the day in the maximum offset (larger offsets are earlier on the time-line). This combines LocalTime#MIN and ZoneOffset#MAX. This could be used by an application as a "far past" date.

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def from(temporal: TemporalAccessor): OffsetTime

    Obtains an instance of OffsetTime from a temporal object.

    Obtains an instance of OffsetTime from a temporal object.

    A TemporalAccessor represents some form of date and time information. This factory converts the arbitrary temporal object to an instance of OffsetTime.

    The conversion extracts and combines LocalTime and ZoneOffset.

    This method matches the signature of the functional interface TemporalQuery allowing it to be used in queries via method reference, OffsetTime::from.

    temporal

    the temporal object to convert, not null

    returns

    the offset time, not null

    Exceptions thrown
    DateTimeException

    if unable to convert to an { @code OffsetTime}

  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  20. def now(clock: Clock): OffsetTime

    Obtains the current time from the specified clock.

    Obtains the current time from the specified clock.

    This will query the specified clock to obtain the current time. The offset will be calculated from the time-zone in the clock.

    Using this method allows the use of an alternate clock for testing. The alternate clock may be introduced using Clock dependency injection.

    clock

    the clock to use, not null

    returns

    the current time, not null

  21. def now(zone: ZoneId): OffsetTime

    Obtains the current time from the system clock in the specified time-zone.

    Obtains the current time from the system clock in the specified time-zone.

    This will query the Clock#system(ZoneId) system clock to obtain the current time. Specifying the time-zone avoids dependence on the default time-zone. The offset will be calculated from the specified time-zone.

    Using this method will prevent the ability to use an alternate clock for testing because the clock is hard-coded.

    zone

    the zone ID to use, not null

    returns

    the current time using the system clock, not null

  22. def now: OffsetTime

    Obtains the current time from the system clock in the default time-zone.

    Obtains the current time from the system clock in the default time-zone.

    This will query the Clock#systemDefaultZone() system clock in the default time-zone to obtain the current time. The offset will be calculated from the time-zone in the clock.

    Using this method will prevent the ability to use an alternate clock for testing because the clock is hard-coded.

    returns

    the current time using the system clock, not null

  23. def of(hour: Int, minute: Int, second: Int, nanoOfSecond: Int, offset: ZoneOffset): OffsetTime

    Obtains an instance of OffsetTime from an hour, minute, second and nanosecond.

    Obtains an instance of OffsetTime from an hour, minute, second and nanosecond.

    This creates an offset time with the four specified fields.

    This method exists primarily for writing test cases. Non test-code will typically use other methods to create an offset time. LocalTime has two additional convenience variants of the equivalent factory method taking fewer arguments. They are not provided here to reduce the footprint of the API.

    hour

    the hour-of-day to represent, from 0 to 23

    minute

    the minute-of-hour to represent, from 0 to 59

    second

    the second-of-minute to represent, from 0 to 59

    nanoOfSecond

    the nano-of-second to represent, from 0 to 999,999,999

    offset

    the zone offset, not null

    returns

    the offset time, not null

    Exceptions thrown
    DateTimeException

    if the value of any field is out of range

  24. def of(time: LocalTime, offset: ZoneOffset): OffsetTime

    Obtains an instance of OffsetTime from a local time and an offset.

    Obtains an instance of OffsetTime from a local time and an offset.

    time

    the local time, not null

    offset

    the zone offset, not null

    returns

    the offset time, not null

  25. def ofInstant(instant: Instant, zone: ZoneId): OffsetTime

    Obtains an instance of OffsetTime from an Instant and zone ID.

    Obtains an instance of OffsetTime from an Instant and zone ID.

    This creates an offset time with the same instant as that specified. Finding the offset from UTC/Greenwich is simple as there is only one valid offset for each instant.

    The date component of the instant is dropped during the conversion. This means that the conversion can never fail due to the instant being out of the valid range of dates.

    instant

    the instant to create the time from, not null

    zone

    the time-zone, which may be an offset, not null

    returns

    the offset time, not null

  26. def parse(text: CharSequence, formatter: DateTimeFormatter): OffsetTime

    Obtains an instance of OffsetTime from a text string using a specific formatter.

    Obtains an instance of OffsetTime from a text string using a specific formatter.

    The text is parsed using the formatter, returning a time.

    text

    the text to parse, not null

    formatter

    the formatter to use, not null

    returns

    the parsed offset time, not null

    Exceptions thrown
    DateTimeParseException

    if the text cannot be parsed

  27. def parse(text: CharSequence): OffsetTime

    Obtains an instance of OffsetTime from a text string such as 10:15:30+01:00.

    Obtains an instance of OffsetTime from a text string such as 10:15:30+01:00.

    The string must represent a valid time and is parsed using org.threeten.bp.format.DateTimeFormatter#ISO_OFFSET_TIME.

    text

    the text to parse such as "10:15:30+01:00", not null

    returns

    the parsed local time, not null

    Exceptions thrown
    DateTimeParseException

    if the text cannot be parsed

  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  29. def toString(): String

    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped