Top "Equals" questions

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

Comparing object used as Key in Dictionary

my class: public class myClass { public int A { get; set; } public int B { get; set; } public int C { get; set; } …

c# dictionary comparison equals contains
Arrays Equals Ignoring Order

Possible Duplicate: Java: Checking equality of arrays (order doesnt matter) I have two arrays : String[] a1 = {"a", "b", "c"}; String[] …

java arrays equals
Is there a way to check if two Collections contain the same elements, independent of order?

I've been looking for a method that operates like Arrays.equals(a1, a2), but ignoring the element order. I haven't …

java collections equals
What does the .= operator mean in PHP?

I have a variable that is being defined as $var .= "value"; How does the use of the dot equal function?

php operators equals
Equals method for data class in Kotlin

I have the following data class data class PuzzleBoard(val board: IntArray) { val dimension by lazy { Math.sqrt(board.size.…

arrays equals kotlin data-class
String.Equals() not working as intended

I am using LINQ to search through one of my Entity Framework tables and find a "group" based on the …

c# linq entity-framework-4 equals
Should I write equals() and hashCode() methods in JPA entities?

I want to check if entity is in a Collection member (@OneToMany or @ManyToMany) of another entity: if (entity2.getEntities1().…

java jpa entity equals hashcode
Why BigDecimal("5.50") not equals to BigDecimal("5.5") and how to work around this issue?

Actually, I've found possible solution //returns true new BigDecimal("5.50").doubleValue() == new BigDecimal("5.5").doubleValue() Of course, it can be improved with …

java equals bigdecimal
Java: to use contains in a ArrayList full of custom object should I override equals or implement Comparable/Comparator?

I have an ArrayList full of these: class TransitionState { Position positionA; Position positionB; int counter; public boolean equals (Object o){ …

java collections equals comparator comparable
c# enum equals() vs ==

In the case of using enums, is it better to use: if (enumInstance.Equals(MyEnum.SomeValue)) or to use if (…

c# enums equals