Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » using Set classes for unique reference lists
using Set classes for unique reference lists [message #418894] Thu, 01 May 2008 10:15 Go to next message
gary s thompson is currently offline gary s thompsonFriend
Messages: 92
Registered: July 2009
Member
Dear All

I have some references in my model which for reasons of compatability need
to accept sets and returns sets in their get and set methods. Now this
fits with setting multiplicity to many 0..* and setting the unique
attribute. However, emf uses a UniqueElist instead of a Set class so is
there a way to get a Set instead

my thoughts were either
1. wrapping a EUnique list in the JET output scripts
2. replacing EUnique list and its subclasses by a Set implimentation'

any thoughts and suggestions re welcome

regards
gary
Re: using Set classes for unique reference lists [message #418899 is a reply to message #418894] Thu, 01 May 2008 11:39 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33218
Registered: July 2009
Senior Member
Gary,

Comments below.

gary wrote:
> Dear All
>
> I have some references in my model which for reasons of compatability
> need to accept sets and returns sets in their get and set methods. Now
> this fits with setting multiplicity to many 0..* and setting the
> unique attribute. However, emf uses a UniqueElist instead of a Set
> class so is there a way to get a Set instead
> my thoughts were either 1. wrapping a EUnique list in the JET output
> scripts
> 2. replacing EUnique list and its subclasses by a Set implimentation'
This is https://bugs.eclipse.org/bugs/show_bug.cgi?id=75931. It would
be easy to extend the list to implement set (as you can see in the
bugzilla's discussion) but the equality implementation would be odd.
Perhaps no one would notice and you could certainly override that as well...
>
> any thoughts and suggestions re welcome
>
> regards
> gary
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:can't find set method but got a get
Next Topic:Resources and ResourceSets again..
Goto Forum:
  


Current Time: Thu Sep 26 01:44:00 GMT 2024

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

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

Back to the top