Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Problem with collection
Problem with collection [message #1755527] Sat, 04 March 2017 20:40 Go to next message
Banafsheh A is currently offline Banafsheh AFriend
Messages: 262
Registered: July 2016
Senior Member
Hi,

the below code returns e.g. [Node]. I want this returns Node instead of [Node]. What should I do?

e.refImmediateComposite().refImmediateComposite().targets -> select (t|t.name.name=e.lhs.target.name) -> collect (s|s.resolvedType.elementName)
Re: Problem with collection [message #1755662 is a reply to message #1755527] Mon, 06 March 2017 16:23 Go to previous messageGo to next message
louis andia. is currently offline louis andia.Friend
Messages: 46
Registered: November 2016
Member
I don't really understand but if you know your collection has only one element and want to return it outside a collection, just add ->first() at the end.
Re: Problem with collection [message #1755696 is a reply to message #1755662] Mon, 06 March 2017 20:30 Go to previous message
Banafsheh A is currently offline Banafsheh AFriend
Messages: 262
Registered: July 2016
Senior Member
Thank you very much indeed. My problem was solved.
Previous Topic:BPMN2UML transformation
Next Topic:Problem with comparison
Goto Forum:
  


Current Time: Fri Jan 19 01:48:28 GMT 2018

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

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