Is it possible to have EMF objects implement hashCode and equals? I would like to be able to use a model object as a key in a HashMap.
Is it possible to have EMF objects implement hashCode and equals ? I would
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
EObject’s javadoc is clear about that. An EObject may not specialize
hashCodeorequals. However, you can use them in maps as long as you are aware of the identity semantics ofObject#equals(..)and#hashCode.