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

eu.shiftforward.apso.collection.HMapKey.scala Maven / Gradle / Ivy

There is a newer version: 0.13.11
Show newest version
package eu.shiftforward.apso.collection

/**
 * A key of an `HMap`.
 * @constructor the default constructor.
 * @tparam V the type of the value associated with this key
 */
class HMapKey[V] {

  /**
   * The type of the value associated with this key. Useful in cases where the
   * type parameter of this key is lost because of type erasure.
   */
  type Value = V

  /**
   * Returns this key, typed as a key associated with values of type `Value`.
   * @return this key, typed as a key associated with values of type `Value`.
   */
  def toKey: HMapKey[Value] = this

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy