Is it possible to implement EMF objects hashCodeand equals? I would like to be able to use the model object as a key in HashMap.
hashCode
equals
HashMap
EObject javadoc about this is clear. EObject may not specialize in hashCodeor equals. However, you can use them on maps if you know about the semantics of identity Object#equals(..)and #hashCode.
Object#equals(..)
#hashCode
EMF, - EObject equals hashCode EO, . - , , .
, . , - , , .
EcoreUtil.equals(), , , .
EcoreUtil.equals()
() equals/hashCode EMF-*Impl. @generated not .
EMF-*Impl
@generated not