Packages

c

o1.time

Moment

class Moment extends AnyRef

Each instance of the class Moment represents a "moment" on a time scale, identified by an integer number.

Different time scales may be used in different contexts. Moment objects could be used to represent different years, months, dates, hours, etc., depending on what is desired.

A Moment object is immutable after it has been created. That is, its state can not be changed in any way.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Moment
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Moment(time: Int)

    time

    an integer indicating which moment the object should represent (2021, for instance)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. def distance(another: Moment): Int

    Determines the length of time between this moment and another given moment.

    Determines the length of time between this moment and another given moment. For instance, if this moment represents the year 2000 and another the year 2021, returns 21. The distance is always either positive or zero.

  7. def earlier(another: Moment): Moment

    Returns the earlier of two moments, either this one or the moment provided as a parameter.

    Returns the earlier of two moments, either this one or the moment provided as a parameter. If there is no difference, one of the two is returned arbitrarily.

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. def isIn(interval: Interval): Boolean

    Determines whether this moment is in the given time interval, that is, whether the given time interval contains this moment.

    Determines whether this moment is in the given time interval, that is, whether the given time interval contains this moment. A time interval is inclusive; its start and end moments are also contained in the interval.

  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def isLaterThan(interval: Interval): Boolean

    Determines whether this moment is later than the given time interval.

    Determines whether this moment is later than the given time interval. This is only deemed to be the case if the entire interval comes before this moment on the time scale.

  15. def isLaterThan(another: Moment): Boolean

    Determines whether this moment is later than another given moment.

  16. def later(another: Moment): Moment

    Returns the later of two moments, either this one or the moment provided as a parameter.

    Returns the later of two moments, either this one or the moment provided as a parameter. If there is no difference, one of the two is returned arbitrarily.

  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString: String

    Produces a string representation of this moment.

    Produces a string representation of this moment. (It consists of just the digits.)

    Definition Classes
    Moment → AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

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

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped