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

japgolly.microlibs.utils.EqualsByRef.scala Maven / Gradle / Ivy

The newest version!
package japgolly.microlibs.utils

import japgolly.univeq.UnivEq

/** Implements .equals using reference equality */
trait EqualsByRef { self: AnyRef =>

  final override def equals(obj: Any): Boolean =
    obj match {
      case o: AnyRef => this eq o
      case _ => false
    }
}

object EqualsByRef {
  implicit def univEq[A <: EqualsByRef]: UnivEq[A] =
    UnivEq.force
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy