Use enums instead of integer constants
Before the introduction of enums, it was common practice to use integer constant values to indicate different variations of domain constants.
The composite design pattern is intended for structuring data classes with a relationship to each other. It categorizes the data as either a composite- or and leaf class, which determines whether other classes can be stored within the class. For this reason, it should come as no shock that it is a structural design pattern.