BranchPattern.flat

Pattern[] flat(TypeInfo[] types...)

Returns a flat array of all leaf patterns of the specified types.

Parameters

typesThe TypeInfo of pattern types to include. If empty, all patterns are included.

Returns

An array of patterns matching the specified types.