what does this symbol mean?
UML 2.5.1 A line between two class boxes ending in a filled diamond at one box

Composition

A line with a filled (black) diamond at one end is composition: the strong whole-part relationship in a UML class diagram. Each part belongs to one whole at a time, and is deleted when the whole is.

Easily confused with

How to read it

The filled diamond sits against the composite, the whole, and the plain end of the line goes to the part. UML 2.5.1 calls composite aggregation "a strong form of aggregation": a part object can be included in at most one composite object at a time, and if a composite object is deleted, the part objects in it are deleted with it. A part can be removed from the composite before that happens, and then it isn't deleted with it. Robert C. Martin's example is a Circle composed of a Point, its centre, whose lifetime depends on the Circle's. Course notes use a car that owns its engine (Virginia Tech's OpenDSA) and a dog made up of a tongue, ears, legs and a tail (Kansas State University's CIS 400 textbook).

Also searched as: composition symbol, composition vs aggregation, filled diamond uml, uml composition.

Composition or aggregation?

The fill is the only visual difference from the hollow Aggregation diamond. The meaning differs more: UML 2.5.1 gives composition two rules, one owner at a time and deletion with the whole, and gives aggregation none. Martin Fowler named the one-owner rule as the main thing composition adds: windows and panels might both hold menu bars, but each menu bar is held by only one whole. The University of Washington's software engineering course uses a cinema: if the cinema goes, so does its box office (composition), but the films it showed still exist (aggregation).

What the standard leaves open

The specification says the precise lifecycle semantics of composite aggregation is intentionally not specified, and neither is the order in which the parts are created. It does fix the Multiplicity at the composite's end: its upper bound can't be more than 1, since a part can't belong to two wholes.

Look-alikes

A small filled dot where an association line meets a class is not a diamond. It shows which class owns that end of the association, and the specification limits it to half the diamond's height so the two aren't mistaken for each other. A large diamond with three or more lines is an Association between three or more classes.

More UML diagram symbols

The same shape elsewhere

Sources

Researched, edited and approved by Rory Hansen before publishing. Last reviewed October 9, 2026. How we research

Added .

Report a problem

Please don’t include personal details.