Interface Cardinality

All Known Implementing Classes:
Cardinality.Fixed, Cardinality.SameCountAsRule

public sealed interface Cardinality permits Cardinality.Fixed, Cardinality.SameCountAsRule
How many times a ContractRule's selector is allowed or required to match in a generated dashboard.

Cardinality.Fixed covers whole-document counts (Cardinality.Fixed.EXACTLY_ONE, Cardinality.Fixed.AT_LEAST_ONE, Cardinality.Fixed.AT_MOST_ONE), per-tracker counts (Cardinality.Fixed.AT_LEAST_ONE_PER_TRACKER, Cardinality.Fixed.AT_MOST_ONE_PER_TRACKER), and the whole-document count matching the number of discovered tracker sections (Cardinality.Fixed.SAME_COUNT_AS_TRACKERS). SAME_COUNT_AS(ContractRule) covers a whole-document count matching another rule's whole-document count, e.g. every metric card also carrying the --percent styling hook.