BUG-3641: cache hashCode value 41/22241/4
authorRobert Varga <rovarga@cisco.com>
Tue, 9 Jun 2015 23:09:51 +0000 (01:09 +0200)
committerRobert Varga <rovarga@cisco.com>
Wed, 10 Jun 2015 18:15:00 +0000 (20:15 +0200)
commit0158f45b9078cdb867d3ce3c44a4ed4746f311fe
tree79a5f422ef603e0a694666d2662684ba1b29926e
parent9c0ee0a61221d6b00e032286123491a09a099dcb
BUG-3641: cache hashCode value

Builder-derived classes can be used as HashMap keys, which means they
can see their hashcode computed multiple times. Since this is a
recursive operation, the cost of it can be quite high, so dedicate two
fields for caching the hashcode result.

Change-Id: I0d95fd94187a421e4018b2f6992dfeaf2e126732
Signed-off-by: Robert Varga <rovarga@cisco.com>
code-generator/binding-java-api-generator/src/main/java/org/opendaylight/yangtools/sal/java/api/generator/BuilderTemplate.xtend