All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.org.hisp.dhis.rules.models.Rule.kt Maven / Gradle / Ivy

package org.hisp.dhis.rules.models

data class Rule(
    val condition: String,
    val actions: List,
    val uid: String = "",
    val name: String? = null,
    val programStage: String? = null,
    val priority: Int? = 0
):Comparable{
    override fun compareTo(other: Rule): Int {
        return if (this.priority != null && other.priority != null) {
            this.priority.compareTo(other.priority)
        } else if (this.priority != null) {
            -1
        } else if (other.priority != null) {
            1
        } else {
            0
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy