Templates

Types

Classifiers such as class, interface, use case, etc. can all be regarded as types (i.e., things that have instances). Data types are values— stateless objects such as money, temperature, and date that are identified with their attributes:

Standard UML primitive types:

·       Boolean

·       Integer

·       UnlimitedNatural

·       String

·       Real

 

Templates

Template parameters can be added to classes and interfaces:

While there is special UML notation for binding a template parameter to a value, not all CASE tools support it. In UML we can use tags, constraints, and stereotypes to customize UML. In the diagram above we repurpose the generalization arrow stereotyped as a binding for this purpose. We Use a tag to indicate the binding of the template parameter.