Example of the hashCode() method generated by the JAXB2 SimpleHashCode 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 int hashCode() {
int currentHashCode = 1;
{
currentHashCode = (currentHashCode* 31);
USAddress theShipTo;
theShipTo = this.getShipTo();
if (theShipTo!= null) {
currentHashCode += theShipTo.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
USAddress theBillTo;
theBillTo = this.getBillTo();
if (theBillTo!= null) {
currentHashCode += theBillTo.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
String theComment;
theComment = this.getComment();
if (theComment!= null) {
currentHashCode += theComment.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
Items theItems;
theItems = this.getItems();
if (theItems!= null) {
currentHashCode += theItems.hashCode();
}
}
{
currentHashCode = (currentHashCode* 31);
XMLGregorianCalendar theOrderDate;
theOrderDate = this.getOrderDate();
if (theOrderDate!= null) {
currentHashCode += theOrderDate.hashCode();
}
}
return currentHashCode;
}