Java - equals method

1 - About

The equals method is used in implementation such as set implementation in order to be sure that there will be no duplicate objects.

If two objects are equal, they must have the same hashCode()


3 - Utility

3.1 - org.apache.commons.lang.builder

package org.apache.commons.lang.builder;
EqualsBuilder comparator = new EqualsBuilder();
// Note that this compares case sensitive
comparator.append(..., other....);
return comparator.isEquals();

Data Science
Data Analysis
Data Science
Linear Algebra Mathematics

Powered by ComboStrap