Last active
September 21, 2022 15:39
-
-
Save mohamed-gara/c19dca1a9117ac164c1cce83c9511b49 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface QuantityOverDateRange { | |
val dateRange: DateRange | |
val quantity: Quantity | |
val groupId: String? | |
fun startBefore(period: DateRange): Boolean | |
fun endAfter(period: DateRange): Boolean | |
fun withDateRange(dateRange: DateRange): QuantityOverDateRange | |
fun add(value: QuantityOverDateRange): List<QuantityOverDateRange> | |
fun subtract(subtrahend: QuantityOverDateRange): SubtractionResult | |
fun subtract(subtrahends: List<QuantityOverDateRange>): SubtractionResult | |
fun subtractQuantity(subtrahend: QuantityOverDateRange): QuantitySubtractionResult | |
fun hasMoreQuantityThan(other: QuantityOverDateRange): Boolean | |
fun periodIntersectionWith(other: QuantityOverDateRange): DateRange | |
fun hasSamePeriodAndQuantityAs(other: QuantityOverDateRange): Boolean | |
fun hasSamePeriodAs(other: QuantityOverDateRange): Boolean | |
fun hasIntersectionWith(other: QuantityOverDateRange): Boolean | |
fun hasNoIntersectionWith(other: QuantityOverDateRange): Boolean | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment