You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
454 B
Kotlin

package me.eater.hefbrug.enforcer
import me.eater.hefbrug.executor.ExecutionContext
import me.eater.hefbrug.state.AbstractState
import kotlin.reflect.KProperty
abstract class AbstractEnforcer<S: AbstractState>(val context: ExecutionContext) {
operator fun Set<String>.contains(property: KProperty<*>): Boolean {
return property.name in this
}
abstract suspend fun enforce(currentState: S, desiredState: S, changeSet: Set<String>)
}