commonMain.com.sunnychung.lib.multiplatform.kotlite.model.DoubleValue.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlite-interpreter-jvm Show documentation
Show all versions of kotlite-interpreter-jvm Show documentation
A Kotlin Multiplatform library to interpret Kotlite code, which is a subset of Kotlin language, in runtime in a safe way.
The newest version!
package com.sunnychung.lib.multiplatform.kotlite.model
class DoubleValue(override val value: Double, symbolTable: SymbolTable) : NumberValue, PrimitiveValue(symbolTable) {
override fun primitiveType(rootSymbolTable: SymbolTable) = rootSymbolTable.DoubleType
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other !is DoubleValue) return false
if (value != other.value) return false
return true
}
override fun hashCode(): Int {
return value.hashCode()
}
}