Hi all.
is there anyone who can tell me 1. what the following code is good for and 2. give me some hints about what the code is actually does [ small java course]. I found this code snippet in some other java programs.
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof AdabasEmployeesTypeIncome)) return false;
AdabasEmployeesTypeIncome other = (AdabasEmployeesTypeIncome) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
((this.currencyCode==null && other.getCurrencyCode()==null) ||
(this.currencyCode!=null &&
this.currencyCode.equals(other.getCurrencyCode()))) &&
((this.annualSalary==null && other.getAnnualSalary()==null) ||
(this.annualSalary!=null &&
java.util.Arrays.equals(this.annualSalary, other.getAnnualSalary()))) &&
((this.annualBonus==null && other.getAnnualBonus()==null) ||
(this.annualBonus!=null &&
java.util.Arrays.equals(this.annualBonus, other.getAnnualBonus())));
__equalsCalc = null;
return _equals;
}
Best Regards
Dago