Skip to main content



      Home
Home » Modeling » EMF » Compare two arraylist of EMF objects
Compare two arraylist of EMF objects [message #1199623] Wed, 20 November 2013 18:14 Go to next message
Eclipse UserFriend
Hi,

I've got two ArrayList which contains of objects from type Hardware. This class has got an Enumeration "ElementType", which should be used to compare different objects of hardware to each other.

I'm wonder now how I can make use of helper methods like java.util.AbstractCollection.containsAll to compare my ArrayLists. As the objects are different, equals method gave a false back. Is there a way to customize the equals method or solve this in another way?

Cheers,
Phil
Re: Compare two arraylist of EMF objects [message #1200585 is a reply to message #1199623] Thu, 21 November 2013 05:01 Go to previous message
Eclipse UserFriend
Phil,

Comments below.

On 21/11/2013 12:14 AM, Phil H wrote:
> Hi,
>
> I've got two ArrayList which contains of objects from type Hardware.
> This class has got an Enumeration "ElementType", which should be used
> to compare different objects of hardware to each other.
>
> I'm wonder now how I can make use of helper methods like
> java.util.AbstractCollection.containsAll to compare my ArrayLists.
It sounds like you should do this external to the list implementation.
> As the objects are different, equals method gave a false back. Is
> there a way to customize the equals method or solve this in another way?
It's not clear what you're hoping to achieve. Doesn't
org.eclipse.emf.ecore.util.EcoreUtil.equals(List<? extends EObject>,
List<? extends EObject>) help?
>
> Cheers,
> Phil
Previous Topic:EMF/Xtext resource handling
Next Topic:How to define a predefined sequence attributes?
Goto Forum:
  


Current Time: Fri Jul 25 15:04:32 EDT 2025

Powered by FUDForum. Page generated in 0.13523 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top