def next()

in core/src/main/scala/org/apache/pekko/persistence/cassandra/journal/TimeBucket.scala [55:76]


  def next(): TimeBucket =
    new TimeBucket(key + bucketSize.durationMillis, bucketSize)

  def previous(steps: Int): TimeBucket =
    if (steps == 0) this
    else new TimeBucket(key - steps * bucketSize.durationMillis, bucketSize)

  def >(other: TimeBucket): Boolean =
    key > other.key

  def <(other: TimeBucket): Boolean =
    key < other.key

  def <=(other: TimeBucket): Boolean =
    key <= other.key

  override def equals(other: Any): Boolean = other match {
    case that: TimeBucket =>
      key == that.key &&
      bucketSize == that.bucketSize
    case _ => false
  }