Packages

  • package root
    Definition Classes
    root
  • package scalation

    The scalation package specifies system-wide constants for directory paths.

    The scalation package specifies system-wide constants for directory paths. Sub-packages may wish to define 'BASE-DIR = DATA_DIR + ⁄ + <package>' in their own 'package.scala' files. For maintainability, directory paths should only be specified in 'package.scala' files.

    Definition Classes
    root
  • package math

    The math package contains classes, traits and objects for common mathematical operations.

    The math package contains classes, traits and objects for common mathematical operations. Its package object defines exponentiation, logarithmic, trigonometric, etc. operators and functions.

    Definition Classes
    scalation
  • object TimeO

    The TimeO object is used to represent and operate on date-time values.

    The TimeO object is used to represent and operate on date-time values. It contains an implicit class definition for TimeNum, which extends Instant with Numeric operations that can be used in VectorT. The java.time.Instant class stores nano-seconds since the UNIX Epoch using a long for seconds and int for nano-seconds (12 bytes or 96 bits). The java.time.ZonedDateTime class is used with it to handle various date-time formats.

    Definition Classes
    math
  • TimeNum

implicit class TimeNum extends Numeric[TimeNum] with Ordered[TimeNum] with Serializable

The TimeNum implicit class is used to represent and operate on date-time numbers. Internally, a date-time number is represented as Instant. ---------------------------------------------------------------------

Linear Supertypes
Ordered[TimeNum], Comparable[TimeNum], Numeric[TimeNum], Ordering[TimeNum], PartialOrdering[TimeNum], Equiv[TimeNum], Serializable, Comparator[TimeNum], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TimeNum
  2. Ordered
  3. Comparable
  4. Numeric
  5. Ordering
  6. PartialOrdering
  7. Equiv
  8. Serializable
  9. Comparator
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new TimeNum(dt: String, dtPattern: String = DEFAULT_DATETIME_FORMAT)

    Construct a TimeNum object from the given date-time by creating a ZonedDateTime from the string and converting it to the corresponding Instant, the underlying type of TimeNum class.

    Construct a TimeNum object from the given date-time by creating a ZonedDateTime from the string and converting it to the corresponding Instant, the underlying type of TimeNum class. Format it using 'dtPattern'.

    dt

    the given date-time as a string

    dtPattern

    the given date-time pattern/format

  2. new TimeNum(dt: ZonedDateTime)

    Construct a TimeNum object from the given date-time by taking a ZonedDateTime and converting it to the corresponding Instant, the underlying type of TimeNum class.

    Construct a TimeNum object from the given date-time by taking a ZonedDateTime and converting it to the corresponding Instant, the underlying type of TimeNum class.

    dt

    the given date-time

  3. new TimeNum(inst: Instant)

    inst

    the underlying Instant of time

Type Members

  1. class NumericOps extends AnyRef
    Definition Classes
    Numeric
  2. class OrderingOps extends AnyRef
    Definition Classes
    Ordering

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. def !=~(t: TimeNum): Boolean

    Return whether two TimeNum numbers not are nearly equal.

    Return whether two TimeNum numbers not are nearly equal.

    t

    compare this with t

  3. final def ##: Int
    Definition Classes
    AnyRef → Any
  4. def *(t: TimeNum): TimeNum

    Multiply 'this' TimeNum and TimeNum 't'.

    Multiply 'this' TimeNum and TimeNum 't'.

    t

    the TimeNum that multiplies this

  5. def +(t: TimeNum): TimeNum

    Add 'this' TimeNum and TimeNum 't'.

    Add 'this' TimeNum and TimeNum 't'. The seconds and nanoseconds are added separately, with carry from nanoseconds handled.

    t

    the TimeNum to add to this

  6. def -(t: TimeNum): TimeNum

    Subtract TimeNum 't' from 'this' TimeNum.

    Subtract TimeNum 't' from 'this' TimeNum.

    t

    the TimeNum to subtract from this

  7. def /(t: TimeNum): TimeNum

    Divide 'this' TimeNum by TimeNum 't'.

    Divide 'this' TimeNum by TimeNum 't'.

    t

    the TimeNum that divides this

  8. def <(that: TimeNum): Boolean
    Definition Classes
    Ordered
  9. def <=(that: TimeNum): Boolean
    Definition Classes
    Ordered
  10. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def =~(t: TimeNum): Boolean

    Return whether two TimeNum numbers are nearly equal.

    Return whether two TimeNum numbers are nearly equal.

    t

    the TimeNum to compare with this

  12. def >(that: TimeNum): Boolean
    Definition Classes
    Ordered
  13. def >=(that: TimeNum): Boolean
    Definition Classes
    Ordered
  14. def abs(x: TimeNum): TimeNum
    Definition Classes
    Numeric
  15. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  16. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  17. def compare(s: TimeNum, t: TimeNum): Int

    Compare two 'TimeNum numbers (negative for <, zero for ==, positive for >).

    Compare two 'TimeNum numbers (negative for <, zero for ==, positive for >).

    s

    the first TimeNum number

    t

    the second TimeNum number

    Definition Classes
    TimeNum → Ordering → Comparator
  18. def compare(t: TimeNum): Int

    Compare two TimeNum numbers (negative for <, zero for ==, positive for >).

    Compare two TimeNum numbers (negative for <, zero for ==, positive for >).

    t

    the TimeNum number to compare with this

    Definition Classes
    TimeNum → Ordered
  19. def compareTo(that: TimeNum): Int
    Definition Classes
    Ordered → Comparable
  20. def divide(s: TimeNum, t: TimeNum): TimeNum
  21. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def equals(t: Any): Boolean

    Override equals to determine whether 'this' date-time number equals date-time 't'.

    Override equals to determine whether 'this' date-time number equals date-time 't'.

    t

    the date-time number to compare with this

    Definition Classes
    TimeNum → Comparator → AnyRef → Any
  23. def equiv(x: TimeNum, y: TimeNum): Boolean
    Definition Classes
    Ordering → PartialOrdering → Equiv
  24. def fromDouble(d: Double): TimeNum

    Create a TimeNum number from a Double, where the seconds are extracted from the whole number part and the nanoseconds from the fractional part.

    Create a TimeNum number from a Double, where the seconds are extracted from the whole number part and the nanoseconds from the fractional part.

    d

    the source double

  25. def fromInt(n: Int): TimeNum

    Create a TimeNum number from an Int.

    Create a TimeNum number from an Int.

    n

    the source integer

    Definition Classes
    TimeNum → Numeric
  26. def getChrono(chrono: ChronoField, zone: ZoneId = ZoneOffset.UTC): Long

    Get a temporal aspect (e.g., month, week, day, hour, ...)

    Get a temporal aspect (e.g., month, week, day, hour, ...)

    chrono

    the enumeration type specifying the aspect to return

    See also

    docs.oracle.com/javase/8/docs/api/java/time/temporal/ChronoField.html Currently only four (INSTANT_SECONDS, MICRO_OF_SECOND, MILLI_OF_SECOND, NANO_OF_SECOND) of the enumeration values are implemented, but ScalaTion adds five more (see below).

  27. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  28. def gt(x: TimeNum, y: TimeNum): Boolean
    Definition Classes
    Ordering → PartialOrdering
  29. def gteq(x: TimeNum, y: TimeNum): Boolean
    Definition Classes
    Ordering → PartialOrdering
  30. def hashCode(): Int

    Must also override hashCode to be compatible with equals.

    Must also override hashCode to be compatible with equals.

    Definition Classes
    TimeNum → AnyRef → Any
  31. def in(set: Set[TimeNum]): Boolean

    Determine whether 'this' is in the given set.

  32. def in(lim: (TimeNum, TimeNum)): Boolean

    Determine whether 'this' is within the given bounds

    Determine whether 'this' is within the given bounds

    lim

    the given (lower, upper) bounds

  33. val inst: Instant
  34. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  35. def isReverseOf(other: Ordering[_]): Boolean
    Definition Classes
    Ordering
  36. def lt(x: TimeNum, y: TimeNum): Boolean
    Definition Classes
    Ordering → PartialOrdering
  37. def lteq(x: TimeNum, y: TimeNum): Boolean
    Definition Classes
    Ordering → PartialOrdering
  38. def max(t: TimeNum): TimeNum

    Return the maximum of 'this' and 't' TimeNum numbers.

    Return the maximum of 'this' and 't' TimeNum numbers.

    t

    the TimeNum number to compare with this

  39. def max[U <: TimeNum](x: U, y: U): U
    Definition Classes
    Ordering
  40. def min(t: TimeNum): TimeNum

    Return the minimum of 'this' and 't' TimeNum numbers.

    Return the minimum of 'this' and 't' TimeNum numbers.

    t

    the TimeNum number to compare with this

  41. def min[U <: TimeNum](x: U, y: U): U
    Definition Classes
    Ordering
  42. def minus(s: TimeNum, t: TimeNum): TimeNum
    Definition Classes
    TimeNum → Numeric
  43. implicit def mkNumericOps(lhs: TimeNum): NumericOps
    Definition Classes
    Numeric
  44. implicit def mkOrderingOps(lhs: TimeNum): OrderingOps
    Definition Classes
    Ordering
  45. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  46. def negate(s: TimeNum): TimeNum
    Definition Classes
    TimeNum → Numeric
  47. def not_in(set: Set[TimeNum]): Boolean

    Determine whether 'this' is not in the given set.

  48. def not_in(lim: (TimeNum, TimeNum)): Boolean

    Determine whether 'this' is not within the given bounds

    Determine whether 'this' is not within the given bounds

    lim

    the given (lower, upper) bounds

  49. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  50. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  51. def on[U](f: (U) => TimeNum): Ordering[U]
    Definition Classes
    Ordering
  52. def one: TimeNum
    Definition Classes
    Numeric
  53. def orElse(other: Ordering[TimeNum]): Ordering[TimeNum]
    Definition Classes
    Ordering
  54. def orElseBy[S](f: (TimeNum) => S)(implicit ord: Ordering[S]): Ordering[TimeNum]
    Definition Classes
    Ordering
  55. def parseString(str: String): Option[TimeNum]

    Parse the string to create a time number.

    Parse the string to create a time number.

    Definition Classes
    TimeNum → Numeric
  56. def plus(s: TimeNum, t: TimeNum): TimeNum
    Definition Classes
    TimeNum → Numeric
  57. def reverse: Ordering[TimeNum]
    Definition Classes
    Ordering → PartialOrdering
  58. def reversed(): Comparator[TimeNum]
    Definition Classes
    Comparator
  59. def sign(x: TimeNum): TimeNum
    Definition Classes
    Numeric
  60. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  61. def thenComparing[U <: Comparable[_ >: U <: AnyRef]](arg0: Function[_ >: TimeNum <: AnyRef, _ <: U]): Comparator[TimeNum]
    Definition Classes
    Comparator
  62. def thenComparing[U <: AnyRef](arg0: Function[_ >: TimeNum <: AnyRef, _ <: U], arg1: Comparator[_ >: U <: AnyRef]): Comparator[TimeNum]
    Definition Classes
    Comparator
  63. def thenComparing(arg0: Comparator[_ >: TimeNum <: AnyRef]): Comparator[TimeNum]
    Definition Classes
    Comparator
  64. def thenComparingDouble(arg0: ToDoubleFunction[_ >: TimeNum <: AnyRef]): Comparator[TimeNum]
    Definition Classes
    Comparator
  65. def thenComparingInt(arg0: ToIntFunction[_ >: TimeNum <: AnyRef]): Comparator[TimeNum]
    Definition Classes
    Comparator
  66. def thenComparingLong(arg0: ToLongFunction[_ >: TimeNum <: AnyRef]): Comparator[TimeNum]
    Definition Classes
    Comparator
  67. def times(s: TimeNum, t: TimeNum): TimeNum
    Definition Classes
    TimeNum → Numeric
  68. def toDouble: Double
  69. def toDouble(t: TimeNum): Double

    Convert the given TimeNum number to a Double.

    Convert the given TimeNum number to a Double.

    t

    that date-time number to convert

    Definition Classes
    TimeNum → Numeric
  70. def toFloat: Float
  71. def toFloat(t: TimeNum): Float

    Convert 'this' TimeNum number to a Float.

    Convert 'this' TimeNum number to a Float.

    t

    that date-time number to convert

    Definition Classes
    TimeNum → Numeric
  72. def toInt: Int
  73. def toInt(t: TimeNum): Int

    Convert 'this' TimeNum number to an Int.

    Convert 'this' TimeNum number to an Int.

    t

    that date-time number to convert

    Definition Classes
    TimeNum → Numeric
  74. def toLong: Long
  75. def toLong(t: TimeNum): Long

    Convert 'this' TimeNum number to a Long.

    Convert 'this' TimeNum number to a Long.

    t

    that date-time number to convert

    Definition Classes
    TimeNum → Numeric
  76. def toString(): String

    Convert 'this' date-time number to a String.

    Convert 'this' date-time number to a String.

    Definition Classes
    TimeNum → AnyRef → Any
  77. def toString2(format: String = DEFAULT_DATETIME_FORMAT): String

    Convert 'this' date time number to a String in the format specified by the user, use 'DEFAULT_DATETIME_FORMAT' if user does not specify any format.

    Convert 'this' date time number to a String in the format specified by the user, use 'DEFAULT_DATETIME_FORMAT' if user does not specify any format.

    format

    the format to be used

  78. def toTimeNum: TimeNum

    Convert 'this' date-time number to a TimeNum.

  79. def tryCompare(x: TimeNum, y: TimeNum): Some[Int]
    Definition Classes
    Ordering → PartialOrdering
  80. def unary_-: TimeNum

    Compute the unary minus (-).

  81. lazy val val1: Long

    General alias for the parts of a time number

  82. lazy val val2: Int

    General alias for the parts of a time number

  83. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  84. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  85. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  86. def zero: TimeNum
    Definition Classes
    Numeric
  87. def ~^(t: TimeNum): TimeNum

    Raise 'this' TimeNum to power TimeNum 't'.

    Raise 'this' TimeNum to power TimeNum 't'.

    t

    the TimeNum that raises this

  88. def (t: TimeNum): TimeNum
  89. def (set: Set[TimeNum]): Boolean
  90. def (lim: (TimeNum, TimeNum)): Boolean
  91. def (set: Set[TimeNum]): Boolean
  92. def (lim: (TimeNum, TimeNum)): Boolean
  93. def (t: TimeNum): Boolean
  94. def (t: TimeNum): Boolean
  95. def (t: TimeNum): Boolean

    Compare 'this' TimeNum number with that date-time number 't' for inequality.

    Compare 'this' TimeNum number with that date-time number 't' for inequality.

    t

    that TimeNum number

  96. def (t: TimeNum): Boolean

    Compare 'this' TimeNum number with that date-time number 't' for less than or equal to.

    Compare 'this' TimeNum number with that date-time number 't' for less than or equal to.

    t

    that TimeNum number

  97. def (t: TimeNum): Boolean

    Compare 'this' TimeNum number with that date-time number 't' for greater than or equal to.

    Compare 'this' TimeNum number with that date-time number 't' for greater than or equal to.

    t

    that TimeNum number

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  2. def signum(x: TimeNum): Int
    Definition Classes
    Numeric
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) use sign method instead

Inherited from Ordered[TimeNum]

Inherited from Comparable[TimeNum]

Inherited from Numeric[TimeNum]

Inherited from Ordering[TimeNum]

Inherited from PartialOrdering[TimeNum]

Inherited from Equiv[TimeNum]

Inherited from Serializable

Inherited from Comparator[TimeNum]

Inherited from AnyRef

Inherited from Any

Ungrouped