Created
February 4, 2009 18:17
-
-
Save okomok/58249 to your computer and use it in GitHub Desktop.
rejected triple key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private[mada] case class TripleKey[A](v: Vector[A], start: Int, end: Int) { | |
override def equals(that: Any) = that match { | |
case that: TripleKey[_] => (v eq that.v) && (start == that.start) && (end == that.end) | |
case _ => false | |
} | |
override def hashCode = { | |
HashCode.ofRef(v) + HashCode.ofInt(start) * 7 + HashCode.ofInt(end) * 41 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment