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 tarek
Messages: 20
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 Willink
Messages: 4110
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: Thu Oct 30 16:50:12 GMT 2014

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

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