OCLOperators asSequence
No edit summary
(Replacing message template with parser tag)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<message>Write the content here to display this box</message>
Returns a Sequence containing all elements of ''self''. Element ordering is preserved when possible.  
Returns a Sequence containing all elements of ''self''. Element ordering is preserved when possible.  
{| class="wikitable"
{| class="wikitable"
Line 16: Line 17:
|Sequence{'3', 1, 2.0}
|Sequence{'3', 1, 2.0}
|}
|}
[[Category:OCLOperators]]
[[Category:OCL Collection Operators]]
[[Category:OCL Collection Operators]]
{{Edited|July|12|2024}}

Latest revision as of 07:50, 17 June 2024

Returns a Sequence containing all elements of self. Element ordering is preserved when possible.

Expression Result
Sequence{1, 2.0, '3'}->asSequence() Sequence{1, 2.0, '3'}
Bag{1, 2.0, '3'}->asSequence() Sequence{2.0, 1, '3'}
OrderedSet{1, 2.0, '3'}->asSequence() Sequence{1, 2.0, '3'}
Set{1, 2.0, '3'}->asSequence() Sequence{'3', 1, 2.0}
This page was edited 95 days ago on 06/17/2024. What links here