elements vs sets



Date view Thread view Subject view Author view

Leonor Barroca (l.barroca@open.ac.uk)
Fri, 25 Feb 2000 10:50:03 +0000


Can anyone help on this one? In OCL a navigation expression that results in a set with a single element can also be treated as resulting in a single object...which I find not very orthodox (not a very pc term). Does this mean that I can always treat a set with a single element as the element itself. I have something of the form let x = set1 -> intersection (set2) in x.attribute = bla If I know that the result of the intersection is always a set with a single element can I treat the result of the intersection as the element itself and talk about the properties of the element (as above)?...otherwise I would like to have some operator such as the : Set(X) -> X which gives me an element of a set with a single element Thanks Leonor


Date view Thread view Subject view Author view