[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmt] Re: [Epsilon] EVL 'one' operator

Hi Andrew,

I see. I'm afraid there is no such operation currently in EOL. Could you please open an enhancement feature in the bugzilla? As a temporary workaround you can use the select() operation and check the size of the returned result: e.g. Sequence{1,2,3}.select(i|i=1).size() = 1

Cheers,
Dimitrios

Andrew Lawson wrote:
Hi Dimitrios,

Is want to say that something exists, but only once? I want to test that in a collection an attribute is set to true but only for one member of the collection. In OCL you would replace 'exists' with 'one', is there anything like this in EVL?

Cheers,
Andrew


"Dimitrios Kolovos" <dskolovos@xxxxxxxxx> wrote in message news:fsm9ou$hkf$1@xxxxxxxxxxxxxxxxxxxx
Hi Andrew,

There is the 'exists' operation: e.g. Sequence{1,2,4}.exists(i|i=1) returns true.

Please remember to prefix message subjects with [Epsilon] in the future :)

Cheers,
Dimitrios


Andrew Lawson wrote:
Does EVL have the 'one' operator to act on collections when you are interested in a condition appearing only once?