diff --git a/infra/config-store/src/main/java/com/simprints/infra/config/store/models/AgeGroup.kt b/infra/config-store/src/main/java/com/simprints/infra/config/store/models/AgeGroup.kt index 874b8a57d2..ff904feb31 100644 --- a/infra/config-store/src/main/java/com/simprints/infra/config/store/models/AgeGroup.kt +++ b/infra/config-store/src/main/java/com/simprints/infra/config/store/models/AgeGroup.kt @@ -1,11 +1,12 @@ package com.simprints.infra.config.store.models +import java.io.Serializable + data class AgeGroup( val startInclusive: Int, val endExclusive: Int?, -) { - fun isEmpty(): Boolean = - startInclusive == 0 && (endExclusive == null || endExclusive == 0) +) : Serializable { + fun isEmpty() = startInclusive == 0 && (endExclusive == null || endExclusive == 0) fun includes(age: Int): Boolean { val endExclusive = endExclusive ?: Int.MAX_VALUE @@ -17,4 +18,4 @@ data class AgeGroup( val otherEndExclusive = otherRange.endExclusive ?: Int.MAX_VALUE return startInclusive <= otherRange.startInclusive && otherEndExclusive <= thisEndExclusive } -} \ No newline at end of file +}