object Time
- Alphabetic
- By Inheritance
- Time
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(str: String): Time
The argument is composed of a sequence of values each followed by a time unit: "d" for days, "h" for hours, "m" for minutes, "s" for seconds and "ms" for milliseconds.
The argument is composed of a sequence of values each followed by a time unit: "d" for days, "h" for hours, "m" for minutes, "s" for seconds and "ms" for milliseconds. The general format is: "xdxhxmxsxms", where "x" denotes a number (a sequence of digits). Each number/unit part is optional. The unit identifiers are case sensitive (lower case is mandatory). No whitespace is allowed.
- str
the string to be converted
- returns
a new time converted from the string
- Annotations
- @throws(classOf[IllegalArgumentException])
Time("3d25m") //3 days and 25 minutes
, Time("5m12s125ms") //5 minutes, 12 seconds and 125 milliseconds
- Exceptions thrown
IllegalArgumentException
if the string cannot be converted toTime
Examples: - def apply(ms: Long): Time
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final val d: Long(86400000L)
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final val h: Long(3600000L)
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final val m: Long(60000L)
- final val ms: Long(1L)
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final val ns: Double(1.0E-6)
- final val s: Long(1000L)
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unapply(t: Time): Option[Long]
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final val μs: Double(0.001)