commonMain.it.unibo.tuprolog.datalog.exception.DatalogViolationException.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datalog-js Show documentation
Show all versions of datalog-js Show documentation
Datalog-compliant utilities for knowledge representation
package it.unibo.tuprolog.datalog.exception
import it.unibo.tuprolog.core.exception.TuPrologException
@Suppress("MemberVisibilityCanBePrivate")
class DatalogViolationException(prefix: String = "", val culprit: Any, suffix: String = "", cause: Throwable? = null) :
TuPrologException(
message = "Datalog restriction violation: $prefix$culprit$suffix",
cause = cause
) {
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as DatalogViolationException
if (culprit != other.culprit) return false
if (message != other.message) return false
if (cause != other.cause) return false
return true
}
override fun hashCode(): Int {
var result = culprit.hashCode()
result = 31 * result + (message?.hashCode() ?: 0)
result = 31 * result + (cause?.hashCode() ?: 0)
return result
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy