Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » IndexOf()!!
IndexOf()!! [message #1079393] Sun, 04 August 2013 14:05 Go to next message
Archevo tarek is currently offline Archevo tarekFriend
Messages: 21
Registered: July 2013
Junior Member
Hi,
Any help please with this request:

self->closure(oclContents()->select(oclIsKindOf(model::AAA) or oclIsKindOf(model::BBB)))
->select(a| a.oclIsKindOf(model::CCC) and a.oclAsType(model::CCC).name='XXX')
->collect(a| a.oclContainer())->asOrderedSet()

This request gets the container element of the 'XXX' element. I want to get the position or index of XXX in the container.
How to do this with indexOf().

Thanks in advance.
Re: IndexOf()!! [message #1079579 is a reply to message #1079393] Sun, 04 August 2013 20:38 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

It's Sunday.

Regards

Ed Willink


On 04/08/2013 15:05, Archevo tarek wrote:
> Hi, Any help please with this request:
>
> self->closure(oclContents()->select(oclIsKindOf(model::AAA) or
> oclIsKindOf(model::BBB)))
> ->select(a| a.oclIsKindOf(model::CCC) and
> a.oclAsType(model::CCC).name='XXX')
> ->collect(a| a.oclContainer())->asOrderedSet()
>
> This request gets the container element of the 'XXX' element. I want
> to get the position or index of XXX in the container. How to do this
> with indexOf().
>
> Thanks in advance.
Previous Topic:Classic OCL evaluation does not recognize additions in Standard OCL Library
Next Topic:Simple Question about OCL indexOf operation
Goto Forum:
  


Current Time: Sat Apr 27 03:23:16 GMT 2024

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

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

Back to the top