Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Operation of includes() operation
Operation of includes() operation [message #574774] Mon, 24 August 2009 15:19
Eclipse UserFriend
Originally posted by:

I have a class containing an attribute of type String, when instantiated
I expect the attribute to take any (one) of the values 'A', 'B', or
'C'. I wrote a simple helper operation to check the value against the
set of allowable values, however the include() operation doesn't appear
to return the expected result, see simple example below:

operation MyClass anOp() : Boolean {
var allowableItems : Set(String) := Set{'A', 'B', 'C'};
var item : String := 'B';
return allowableItems.includes(item);

It doesn't appear to be an address pointer issue as I can set item to
allowableItems.first() and still anOp() returns false. I think the
operation is running the following query:
Set{'A', 'B', 'C'}.includes('B')
Hence I expected the result 'true'. What am I doing incorrectly?

Best Wishes
Previous Topic:ANT Script for ETL
Next Topic:Operation of includes() operation
Goto Forum:

Current Time: Sat Apr 21 19:32:05 GMT 2018

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

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