mdedetrich commented on code in PR #67: URL: https://github.com/apache/incubator-pekko-persistence-jdbc/pull/67#discussion_r1258024333
########## core/src/main/scala/org/apache/pekko/persistence/jdbc/MissingElements.scala: ########## @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * license agreements; and to You under the Apache License, version 2.0: + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * This file is part of the Apache Pekko project, which was derived from Akka. + */ + +package org.apache.pekko.persistence.jdbc + +import scala.collection.immutable.NumericRange + +/** + * Efficient representation of missing elements using NumericRanges. + * It can be seen as a collection of OrderingIds + */ +final case class MissingElements[A](elements: Seq[NumericRange[A]])(implicit num: Integral[A]) { + def addRange(from: A, until: A): MissingElements[A] = { + val newRange = NumericRange(from, until, num.one) Review Comment: this is the same as `from.until(until)`, i.e. ```scala def until(end: T): NumericRange.Exclusive[T] = NumericRange(self, end, num.one) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
