MDrivenWiki
Log in

OCLOperators Sequence

From MDrivenWiki

Creates a sequence (collection) of your choosing.

Integers

If you need a sequence of numbers for iteration or numbering, use Sequence

Sequence{0..20}

Will create an collection of integers.

Strings
Sequence{'String', 'EmailAddress'}

It's not really needed to use Sequence for this, Set or Bag works equally well.

If you want to create a list of arbitrary numbers you can use the Set operator

(might also be called an array or list)