Top "Hashcode" questions

A hash code is a result of applying a hash function to data, usually resulting in an integer.

how caching hashcode works in Java as suggested by Joshua Bloch in effective java?

I have the following piece of code from effective java by Joshua Bloch (Item 9, chapter 3, page 49) If a class is …

java caching hashcode effective-java
How to ensure hashCode() is consistent with equals()?

When overriding the equals() function of java.lang.Object, the javadocs suggest that, it is generally necessary to override the …

java object equals hashcode
Persistent hashcode for strings

I want to generate an integer hashcode for strings, that will stay constant forever; i.e. the same string should …

c# string hash hashcode gethashcode
How do I generate equals and hashCode with the CXF xjcplugin

I am trying to generate a Java class containing the methods toString, equals and hashCode from an XSD file. I …

java xsd equals hashcode cxf-xjc-plugin