Repeated

class props.Repeated

Prop that is a repeated number of another type of prop

This is a type of props.Prop that can be used when a props.HasProps class needs a property that can be multiple values of one types. PROPS.REPEATED stores the repeated values in a cell array; each value is validated.

Attributes (in addition to those inherited from props.Prop):

PropType:
A struct that defines another valid prop type. This struct requires Type handle but not Name or Doc - those are inherited from the PROPS.REPEATED values.

Example:

...
class HasRepeatedProp < props.HasProps
    properties (Hidden, SetAccess = immutable)
        RepeatedPropStruct = {                                  ...
            struct(                                             ...
                'Name', 'MultipleColors',                       ...
                'Type', @props.Repeated,                        ...
                'Doc', 'This propery can hold multiple colors', ...
                'PropType', struct(                             ...
                    'Type', @props.Color                        ...
                )                                               ...
            )                                                   ...
        }
    end
    ...
end

See also props.Prop, props.HasProps, props.Union, props.Array, props.Color