1
0

diplomacy: Pretty Print for TransferSizes

This commit is contained in:
Megan Wachs 2017-08-02 11:40:50 -07:00
parent f988b91575
commit 85bdae0fa8

View File

@ -92,6 +92,9 @@ case class TransferSizes(min: Int, max: Int)
def intersect(x: TransferSizes) = def intersect(x: TransferSizes) =
if (x.max < min || max < x.min) TransferSizes.none if (x.max < min || max < x.min) TransferSizes.none
else TransferSizes(scala.math.max(min, x.min), scala.math.min(max, x.max)) else TransferSizes(scala.math.max(min, x.min), scala.math.min(max, x.max))
override def toString() = "TransferSizes[%d, %d]".format(min, max)
} }
object TransferSizes { object TransferSizes {