ogatatsu
12/7/2011 - 8:26 AM

ProxyT

ProxyT

abstract class ProxyT[T <: ProxyT[T]](implicit cm: ClassManifest[T]) {
  val underlying: Any

  override def hashCode: Int = underlying.hashCode

  override def equals(other: Any): Boolean = other match {
    case that: T if(cm.erasure.isInstance(that)) => underlying.equals(that.underlying)
    case _ => false
  }
}