Interface Cardinality
- All Known Implementing Classes:
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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe fixed (non-rule-relative) cardinality kinds.static final recordThe whole-document match count equalsrule's whole-document match count. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic CardinalitySAME_COUNT_AS(ContractRule rule) Creates aCardinality.SameCountAsRulecardinality relative torule.
-
Method Details
-
SAME_COUNT_AS
Creates aCardinality.SameCountAsRulecardinality relative torule.- Parameters:
rule- the rule to compare against- Returns:
- the cardinality
-