public boolean equals(final Object obj) {
boolean result = false;
if (!(obj instanceof ModelItem)) {
return false;
}
IModelItem otherModelItem = (IModelItem) obj;
boolean identifiersEqual = this.getIdentifier().equals(otherModelItem
.getIdentifier());
boolean typesEqual = this.type.equals(otherModelItem.getType());
// Lists
boolean modifiersContainsEqual = this.modifiers
.containsAll(otherModelItem.getModifiers());
boolean modifiersSizeEqual = (this.modifiers.size() == otherModelItem
.getModifiers().size());
boolean modifiersEqual = (modifiersContainsEqual && modifiersSizeEqual);
boolean extendeesContainsEqual = this.extendees
.containsAll(otherModelItem.getExtendees());
boolean extendeesSizeEqual = (this.extendees.size() == otherModelItem
.getExtendees().size());
boolean extendeesEqual = (extendeesContainsEqual && extendeesSizeEqual);
boolean membersContainsEqual = this.members.equals(otherModelItem
.getMembers());
boolean membersSizeEqual = (this.members.size() == otherModelItem
.getMembers().size());
boolean membersEqual = (membersContainsEqual && membersSizeEqual);
result = (identifiersEqual && typesEqual && modifiersEqual
&& extendeesEqual && membersEqual);