All Downloads are FREE. Search and download functionalities are using the official Maven repository.

encrywm.backend.env.ESValue.scala Maven / Gradle / Ivy

There is a newer version: 0.3.2
Show newest version
package encrywm.backend.env

import encrywm.lib.Types.ESType

sealed trait ESValue extends ESEnvComponent {

  val name: String
  val tpe: ESType
  val value: tpe.Underlying

  override def equals(obj: scala.Any): Boolean = obj match {
    case that: ESValue => that.value == this.value
    case _ => false
  }
}

object ESValue {

  val typeId: Byte = 2.toByte

  def apply(n: String, t: ESType)(v: Any): ESValue = new ESValue {
    override val name: String = n
    override val tpe: ESType = t
    override val value: tpe.Underlying = v.asInstanceOf[tpe.Underlying]
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy