return false;
}
- final SkillableJobPosition jobPosition = (SkillableJobPosition) object;
+ // Cast to wanted type
+ final SkillableJobPosition position = (SkillableJobPosition) object;
- if (!Objects.equals(this.getSkillImportance(), jobPosition.getSkillImportance())) {
+ // Check all false conditions
+ if (!Objects.equals(this.getSkillImportance(), position.getSkillImportance())) {
return false;
- } else if (!Objects.equals(this.getJobPosition(), jobPosition.getJobPosition())) {
+ } else if (!Objects.equals(this.getJobPosition(), position.getJobPosition())) {
return false;
- } else if (!Objects.equals(this.getJobSkill(), jobPosition.getJobSkill())) {
+ } else if (!Objects.equals(this.getJobSkill(), position.getJobSkill())) {
return false;
- } else if (!Objects.equals(this.getJobPositionSkillId(), jobPosition.getJobPositionSkillId())) {
+ } else if (!Objects.equals(this.getJobPositionSkillId(), position.getJobPositionSkillId())) {
return false;
}
+ // Okay, entities are matching (not objects)
return true;
}