scala.class_impls_hashcode.ssp Maven / Gradle / Ivy
The newest version!
<%
// Copyright 2013 Foursquare Labs Inc. All Rights Reserved.
import com.foursquare.spindle.codegen.runtime.StructLike
%>
<%-- We use a fixed seed, for consistency. --%>\
<%@ val cls: StructLike %>
override def hashCode(): Int = {
// We use a fixed seed, for consistency.
val hasher = new com.foursquare.spindle.runtime.MurmurHash[AnyRef](0)
#for (field <- cls.fields)
if (${field.isSetName}) hasher.append(${field.varName}.##)
#end
hasher.hash
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy