Trait

refuel.lang.period

FromTo

Related Doc: package period

Permalink

trait FromTo extends AnyRef

Interface representing period.

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

Abstract Value Members

  1. abstract val from: EpochDateTime

    Permalink
  2. abstract val to: EpochDateTime

    Permalink

Concrete 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. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def contains(arg: EpochDateTime): Boolean

    Permalink

    Check if this time is included in this period.

    Check if this time is included in this period.

    case class MyPeriod(from: EpochDateTime, to: EpochDateTime) extends FromTo
    
    val period = MyPeriod("2019-08-01 00:00:00", "2019-08-01 11:59:59")
    
    period.contains("2019-07-31 23:59:59") // be false
    period.contains("2019-08-01 00:00:00") // be true
    period.contains("2019-08-01 11:59:59") // be true
    period.contains("2019-08-01 12:00:00") // be false
    arg

    特定の時間

  7. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  16. def overlap[T <: FromTo](arg: T): Boolean

    Permalink

    Determine if two periods overlap.

    Determine if two periods overlap.

    case class MyPeriod(from: EpochDateTime, to: EpochDateTime) extends FromTo
    
    val period = MyPeriod("2019-08-01 00:00:00", "2019-08-01 11:59:59")
    
    period.overlap(MyPeriod("2019-07-31 00:00:00", "2019-07-31 23:59:59")) // be false
    period.overlap(MyPeriod("2019-07-31 00:00:00", "2019-08-01 00:00:00")) // be true
    arg

    Another period.

  17. def slice[X <: TimeAxis, T <: FromTo](sliceAt: Long, time: X = HOUR)(applyment: (EpochDateTime, EpochDateTime) ⇒ T): Seq[T]

    Permalink

    Breaks down the period in arbitrary units.

    Breaks down the period in arbitrary units.

    case class MyPeriod(from: EpochDateTime, to: EpochDateTime) extends FromTo
    
    MyPeriod("2019-08-01".datetime.epoch, "2019-08-03 23:59:59".datetime.epoch).slice(12, HOUR)(MyPeriod)
     == Seq(
       MyPeriod("2019-08-01 00:00:00", "2019-08-01 11:59:59"),
       MyPeriod("2019-08-01 12:00:00", "2019-08-01 23:59:59"),
       MyPeriod("2019-08-02 00:00:00", "2019-08-02 11:59:59"),
       MyPeriod("2019-08-02 12:00:00", "2019-08-02 23:59:59"),
       MyPeriod("2019-08-03 00:00:00", "2019-08-03 11:59:59"),
       MyPeriod("2019-08-03 12:00:00", "2019-08-03 23:59:59")
     )
    X

    Unit to increments

    T

    period type

    sliceAt

    Size to slice

    time

    Unit to slice

    applyment

    Recursively decomposed period

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

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped