Top "Equals" questions

Refers to Java equals method, indicating whether some object is "equal to" this one.

double equals vs is in python

I run the following in the Python interpreter: >>> foo = 10 >>> dir(foo) == dir(10) True >&…

python comparison boolean equals equality
Is there a Java reflection utility to do a deep comparison of two objects?

I'm trying to write unit tests for a variety of clone() operations inside a large project and I'm wondering if …

java comparison equals
Java comparison with == of two strings is false?

String parts is String[6]: ["231", "CA-California", "Sacramento-155328", "aleee", "Customer Service Clerk", "Alegra Keith.doc.txt"] But when I compare parts[0] with "231": "231" == …

java string equals
Apache Commons equals/hashCode builder

I'm curious to know, what people here think about using org.apache.commons.lang.builder EqualsBuilder/HashCodeBuilder for implementing the …

java hibernate equals apache-commons hashcode
What's the difference between IEquatable and just overriding Object.Equals()?

I want my Food class to be able to test whenever it is equal to another instance of Food. I …

c# .net equals equality iequatable
How default .equals and .hashCode will work for my classes?

Say I have my own class public class MyObj { /* ... */ } It has some attributes and methods. It DOES NOT implement equals, …

java object equals hashcode equality
Is there a "not equal" in a linq join

I am trying accomplish the LINQ query below but I need a "not equal" instead of equal, so that filteredEmployees …

linq join equals
Implementing GetHashCode correctly

I'd like to hear from the community on how I should go about implementing GetHashCode (or override it) for my …

c# .net equals
.Contains() method not calling Overridden equals method

I am having an issue where I make an ArrayList of Foo objects, I override the equals method, and I …

java equals contains
Overriding equals() & hashCode() in sub classes ... considering super fields

Is there a specific rule on how Overriding equals() & hashCode() in sub classes considering super fields ?? knowing that there …

java inheritance overriding equals hashcode