O'Reilly logo

Object Constraint Language, The: Getting Your Models Ready for MDA, Second Edition by Anneke Kleppe, Jos Warmer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Collection Types

This chapter describes the collection types that are part of the OCL standard library, and the way they can be used in expressions.

The Collection Types

In object-oriented systems, the manipulation of collections (of objects) is very common. Because one-to-one associations are rare, most associations define a relationship between one object and a collection of other objects. To enable you to manipulate these collections, OCL predefines a number of types for dealing with collections, sets, and so on.

Within OCL, there are five collection types. Four of them—the Set, OrderedSet, Bag, and Sequence types—are concrete types and can be used in expressions. The fifth, the Collection type, is the abstract supertype of the other ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required