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

io.shiftleft.Util.scala Maven / Gradle / Ivy

package io.shiftleft

case class IdentityHashWrapper[T <: AnyRef](value: T) {
  override def hashCode(): Int = {
    System.identityHashCode(value)
  }

  override def equals(other: Any): Boolean = {
    if (other == null) {
      false
    } else if (!other.isInstanceOf[IdentityHashWrapper[T]]) {
      false
    } else {
      this.value eq other.asInstanceOf[IdentityHashWrapper[T]].value
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy