I need to merge 2 object lists (from the same class) together in the one ocl
operation. It appears that I can do this using the union operation. However,
all the documentation that I've been able to find is somewhat vague.
Can anyone help with a practical example of some ocl?
Niles
> I need to merge 2 object lists (from the same class) together in the
> one ocl operation. It appears that I can do this using the union
> operation.
> Can anyone help with a practical example of some ocl?
>
Try something like this:
self.LeftWheels->union(self.RightWheels)->(self.TruckTrailer.AllTrailerWheels)
I also often apply ->asSet operation at the end to make sure there are no
2 the same wheels :-)
Cheers,
Dmitriy Nagirnyak
http://dcportal.argocomputing.com.au
http://dnagir.blogspot.com
Your example gave me something to compare my interpretation with and thereby
helped identify my error.
Thank you.
Niles
"Niles Ludlum" <n.lu...@gmail.com> wrote in message
news:47575aeb$1...@newsgroups.borland.com...
> Your example gave me something to compare my interpretation with and
> thereby helped identify my error.
>
Write a unit test for that :-)
> Thank you.
>
You are welcome.