Top "Hashcode" questions

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

Remove duplicate objects from a ArrayList in Android

I know this has be discussed over and over again here, but none of the examples I've tried worked for …

java android arraylist hashcode treeset
Creating a hash from several Java string objects

What would be the fastest and more robust (in terms of uniqueness) way for implementing a method like public abstract …

java hash md5 hashcode sha
Why are hashCode() and getClass() native methods?

I checked the source code of Object class where I found that method declaration of getClass() was public final native …

java c++ c methods hashcode
What's a good recipe for overriding hashcode in Dart?

I find myself wanting to override hashcode and == for an object, and I'm wondering if there are best practices for …

dart hashcode
Creating the GetHashCode method in C#

What is the best way to create your own GetHashCode method for a class in C#? Suppose I have a …

c# .net hashcode gethashcode
Java hashCode for a Point class

I have a simple custom Point class as follows and I would like to know if my hashCode implemention could …

java hashcode hash-code-uniqueness
What is an appropriate `GetHashCode()` algorithm for a 2D point struct (avoiding clashes)

Consider the following code: struct Vec2 : IEquatable<Vec2> { double X,Y; public bool Equals(Vec2 other) { return X.…

c# hashcode point
Why doesn't String's hashCode() cache 0?

I noticed in the Java 6 source code for String that hashCode only caches values other than 0. The difference in performance …

java string hashcode
How to teach eclipse to generate compact equals() and hashCode() from the jdk 7 Objects class?

Some days ago we switched to Java 7 within my Company - finally! Jay \o/ So I found out about the …

java eclipse equals hashcode