Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Using Collection.excluding(item)
Using Collection.excluding(item) [message #566149] Fri, 27 March 2009 13:01
No real name is currently offline No real nameFriend
Messages: 92
Registered: July 2009
Member
Hi there,

In Epsilon, I had wanted to use the Collection.excluding(someObj)
operation to do some bits and bobs, but am not sure if I fully understand
how it is meant to work, or if it works as intended.

In the book pdf it says the operation, excluding, will return a new
Collection minus the specified object (someObj above). Does this mean the
operation does not modify the original Collection? I had assumed this was
the case. However, in the EGL at the end of this message, I find that
'excluding' seems to modify the original Collection:

Could anyone confirm whether or not this is in fact a problem? Any
clarification would be much appreciated.

Thanks!

Edd

---- BEGIN EGL ----
[%
-- make some collection and add 6 elements to it
var os : OrderedSet;
os.add('a1');
os.add('a2');
os.add('a3');
os.add('a4');
os.add('a5');
os.add('a6');
%]

---------------------------------------------------------
In the following, I thought E1 and E2 would produce
the same output if the set, os, is not modified during
evaluation of the 'excluding' operation:
---------------------------------------------------------
[%os.excluding(os.at(0));%]
[%='E1 : os = '+os%]
[%os.excluding(os.at(0));%]
[%='E2 : os = '+os%]
---- END EGL ----
Previous Topic:propertyGetter.invoke
Next Topic:Using Collection.excluding(item)
Goto Forum:
  


Current Time: Tue Apr 16 04:39:54 GMT 2024

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

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

Back to the top