Skip to content

Commit

Permalink
Endret 'Harikke' fra 'Opplysning' til 'Condition'
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsmsa committed Sep 6, 2024
1 parent 6a51676 commit af6905f
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ import no.nav.paw.arbeidssokerregisteret.application.opplysninger.Opplysning
interface Regler {
val regler: List<Regel>
val standardRegel: Regel
operator fun Opplysning.not(): Opplysning = HarIkke(this)
operator fun Opplysning.not(): Condition = HarIkke(this)
}

data class HarIkke( val value: Opplysning) : Opplysning {
override val id: String get() = "IKKE_${value.id}"
override val beskrivelse: String get() = "IKKE_${value.beskrivelse}"
data class HarIkke( val value: Opplysning) : Condition {
override fun eval(opplysninger: Iterable<Opplysning>): Boolean = value !in opplysninger
}

Expand Down

0 comments on commit af6905f

Please sign in to comment.