add Java hashCode() implementation