Example of the equals(...) method generated by the JAXB2 SimpleEquals Plugin (original) (raw)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
public boolean equals(Object object) { |
---|
if (!(object instanceof PurchaseOrderType)) { |
return false; |
} |
if (this == object) { |
return true; |
} |
final PurchaseOrderType that = ((PurchaseOrderType) object); |
{ |
USAddress leftShipTo; |
leftShipTo = this.getShipTo(); |
USAddress rightShipTo; |
rightShipTo = that.getShipTo(); |
if (leftShipTo!= null) { |
if (rightShipTo!= null) { |
if (!leftShipTo.equals(rightShipTo)) { |
return false; |
} |
} else { |
return false; |
} |
} else { |
if (rightShipTo!= null) { |
return false; |
} |
} |
} |
{ |
USAddress leftBillTo; |
leftBillTo = this.getBillTo(); |
USAddress rightBillTo; |
rightBillTo = that.getBillTo(); |
if (leftBillTo!= null) { |
if (rightBillTo!= null) { |
if (!leftBillTo.equals(rightBillTo)) { |
return false; |
} |
} else { |
return false; |
} |
} else { |
if (rightBillTo!= null) { |
return false; |
} |
} |
} |
{ |
String leftComment; |
leftComment = this.getComment(); |
String rightComment; |
rightComment = that.getComment(); |
if (leftComment!= null) { |
if (rightComment!= null) { |
if (!leftComment.equals(rightComment)) { |
return false; |
} |
} else { |
return false; |
} |
} else { |
if (rightComment!= null) { |
return false; |
} |
} |
} |
{ |
Items leftItems; |
leftItems = this.getItems(); |
Items rightItems; |
rightItems = that.getItems(); |
if (leftItems!= null) { |
if (rightItems!= null) { |
if (!leftItems.equals(rightItems)) { |
return false; |
} |
} else { |
return false; |
} |
} else { |
if (rightItems!= null) { |
return false; |
} |
} |
} |
{ |
XMLGregorianCalendar leftOrderDate; |
leftOrderDate = this.getOrderDate(); |
XMLGregorianCalendar rightOrderDate; |
rightOrderDate = that.getOrderDate(); |
if (leftOrderDate!= null) { |
if (rightOrderDate!= null) { |
if (!leftOrderDate.equals(rightOrderDate)) { |
return false; |
} |
} else { |
return false; |
} |
} else { |
if (rightOrderDate!= null) { |
return false; |
} |
} |
} |
return true; |
} |