Object/Class

java.time

LocalTime

Related Docs: class LocalTime | package time

Permalink

object LocalTime extends Serializable

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LocalTime
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. lazy val MAX: LocalTime

    Permalink

    The maximum supported LocalTime, '23:59:59.999999999'.

    The maximum supported LocalTime, '23:59:59.999999999'. This is the time just before midnight at the end of the day.

  5. lazy val MIDNIGHT: LocalTime

    Permalink

    The time of midnight at the start of the day, '00:00'.

  6. lazy val MIN: LocalTime

    Permalink

    The minimum supported LocalTime, '00:00'.

    The minimum supported LocalTime, '00:00'. This is the time of midnight at the start of the day.

  7. lazy val NOON: LocalTime

    Permalink

    The time of noon in the middle of the day, '12:00'.

  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def clone(): AnyRef

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

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

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

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

    Permalink

    Obtains an instance of LocalTime from a temporal object.

    Obtains an instance of LocalTime 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 LocalTime.

    The conversion uses the TemporalQueries#localTime() query, which relies on extracting the NANO_OF_DAY field.

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

    temporal

    the temporal object to convert, not null

    returns

    the local time, not null

    Exceptions thrown

    DateTimeException if unable to convert to a { @code LocalTime}

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

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

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

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

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

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

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

    Permalink

    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. Using this method allows the use of an alternate clock for testing. The alternate clock may be introduced using dependency injection.

    clock

    the clock to use, not null

    returns

    the current time, not null

  21. def now(zone: ZoneId): LocalTime

    Permalink

    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 system clock to obtain the current time. Specifying the time-zone avoids dependence on the default 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: LocalTime

    Permalink

    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 system clock in the default time-zone to obtain the current time.

    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 and default time-zone, not null

  23. def of(hour: Int, minute: Int, second: Int, nanoOfSecond: Int): LocalTime

    Permalink

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

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

    This factory may return a cached value, but applications must not rely on this.

    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

    returns

    the local time, not null

    Exceptions thrown

    DateTimeException if the value of any field is out of range

  24. def of(hour: Int, minute: Int, second: Int): LocalTime

    Permalink

    Obtains an instance of LocalTime from an hour, minute and second.

    Obtains an instance of LocalTime from an hour, minute and second.

    The nanosecond field will be set to zero by this factory method.

    This factory may return a cached value, but applications must not rely on this.

    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

    returns

    the local time, not null

    Exceptions thrown

    DateTimeException if the value of any field is out of range

  25. def of(hour: Int, minute: Int): LocalTime

    Permalink

    Obtains an instance of LocalTime from an hour and minute.

    Obtains an instance of LocalTime from an hour and minute.

    The second and nanosecond fields will be set to zero by this factory method.

    This factory may return a cached value, but applications must not rely on this.

    hour

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

    minute

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

    returns

    the local time, not null

    Exceptions thrown

    DateTimeException if the value of any field is out of range

  26. def ofNanoOfDay(nanoOfDay: Long): LocalTime

    Permalink

    Obtains an instance of LocalTime from a nanos-of-day value.

    Obtains an instance of LocalTime from a nanos-of-day value.

    This factory may return a cached value, but applications must not rely on this.

    nanoOfDay

    the nano of day, from { @code 0} to { @code 24 * 60 * 60 * 1,000,000,000 - 1}

    returns

    the local time, not null

    Exceptions thrown

    DateTimeException if the nanos of day value is invalid

  27. def ofSecondOfDay(secondOfDay: Long): LocalTime

    Permalink

    Obtains an instance of LocalTime from a second-of-day value.

    Obtains an instance of LocalTime from a second-of-day value.

    This factory may return a cached value, but applications must not rely on this.

    secondOfDay

    the second-of-day, from { @code 0} to { @code 24 * 60 * 60 - 1}

    returns

    the local time, not null

    Exceptions thrown

    DateTimeException if the second-of-day value is invalid

  28. def parse(text: CharSequence, formatter: DateTimeFormatter): LocalTime

    Permalink

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

    Obtains an instance of LocalTime 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 local time, not null

    Exceptions thrown

    DateTimeParseException if the text cannot be parsed

  29. def parse(text: CharSequence): LocalTime

    Permalink

    Obtains an instance of LocalTime from a text string such as 10:15.

    Obtains an instance of LocalTime from a text string such as 10:15.

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

    text

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

    returns

    the parsed local time, not null

    Exceptions thrown

    DateTimeParseException if the text cannot be parsed

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

    Permalink
    Definition Classes
    AnyRef
  31. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped