update equals of Psychomatrix

This commit is contained in:
InsanusMokrassar 2018-09-07 21:30:59 +08:00
parent c40a4de99d
commit fdfd55cdb7
2 changed files with 13 additions and 0 deletions

View File

@ -1,4 +1,13 @@
package com.github.insanusmokrassar.PsychomatrixBase
import com.github.insanusmokrassar.PsychomatrixBase.domain.entities.MutablePsychomatrix
import com.github.insanusmokrassar.PsychomatrixBase.domain.entities.operations.TwoGrowFour
import kotlinx.coroutines.experimental.runBlocking
import org.joda.time.DateTime
fun main(args: Array<String>) {
val psychomatrix = MutablePsychomatrix(DateTime.now().withDate(2022, 12, 22))
runBlocking {
println(psychomatrix.availableOperations.await())
}
}

View File

@ -186,4 +186,8 @@ open class Psychomatrix(val date: DateTime) {
getDownDiagSum()
)
}
override fun equals(other: Any?): Boolean {
return super.equals(other) || (other as? Psychomatrix) ?.date == date
}
}