Skip to content

Commit f9b101f

Browse files
committed
Make Bounds a case class
This will provide equality and a better toString.
1 parent ffb6fd8 commit f9b101f

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

core/src/main/scala/latis/util/Bounds.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package latis.util
66
* It enforces that the upper bound is strictly greater than
77
* the lower bound.
88
*/
9-
final class Bounds[T] private (val lower: T, val upper: T)(ord: Ordering[T]) {
9+
final case class Bounds[T] private (val lower: T, val upper: T)(ord: Ordering[T]) {
1010

1111
/**
1212
* Tests whether the given value falls within this [[Bounds]].
@@ -37,7 +37,4 @@ object Bounds {
3737
case _ => None
3838
}
3939

40-
/** Extracts the lower and upper bounds. */
41-
def unapplySeq[T](bounds: Bounds[T]): Option[Seq[T]] =
42-
Some(Seq(bounds.lower, bounds.upper))
4340
}

0 commit comments

Comments
 (0)