lazy val hashCode

hashCode needs to be calculated at most once for immutable objects