Created
December 19, 2014 10:46
-
-
Save highsource/facf68ce12a4eca50d5c to your computer and use it in GitHub Desktop.
Example of the hashCode() method generated by the JAXB2 SimpleHashCode Plugin
This file contains 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
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment