Top "Hashcode" questions

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

ConcurrentHashMap constructor parameters?

I am wondering about the parameters for constructing a ConcurrentHashMap: initialCapacity is 16 by default (understood). loadFactor is 0.75 by default. concurrencyLevel …

java hashcode concurrenthashmap
Why does C# not implement GetHashCode for Collections?

I am porting something from Java to C#. In Java the hashcode of a ArrayList depends on the items in …

c# java collections hashcode gethashcode
How to generate a hash code from three longs

I have a HashMap with coordinates as keys. Coordinates have 3 longs holding the x, y and z coordinate. (Coordinate is …

java hashcode hash-code-uniqueness
Implementing hashcode and equals for custom classes

So I have many custom classes are also have custom clases inside of them using composition. My custom classes have …

java equals hashcode abstract-data-type custom-object
Mutable objects and hashCode

Have the following class: public class Member { private int x; private long y; private double d; public Member(int x, …

java immutability hashcode hashset
How calculate hashCode of a Pojo by combining hashCodes of it's keys

Consider i have one POJO having String class members : class POJO { String name, address, emailId; equals() { } hashCode() { // How? } } How can …

java hashcode pojo
What is the standard idiom for implementing equals and hashCode in Scala?

What is the standard idiom for implementing the equals and hashCode methods in Scala? I know the preferred approach is …

scala equals hashcode
How to customize hashCode() and equals() generated by Eclipse?

It is recommended and sometimes necessary, classes that represent values (value classes) to override hashCode(), equals() [and optionally toString()] methods. …

java eclipse hashcode eclipse-jdt
Google App Engine, JDO, and equals/hashCode

I've got an app in Google App Engine that was working fine. I realized that one on of my JDO-enhanced …

java google-app-engine equals jdo hashcode
Object.hashCode() algorithm

I'm looking for the algorithm of Object.hashCode(). This code is native in Object.java. Is this because (a) the …

java hashcode pseudocode