Package cdc.issues.rules
Class RuleDescription
java.lang.Object
cdc.issues.StructuredDescription
cdc.issues.rules.RuleDescription
Specialization of
StructuredDescription that can be used to describe a Rule.
It supports the following sections:
- Remarks that can be used to add remarks.
- Sources that can be used to refer to related sources.
- Applies to that can be used to designate things to which the rule can be applied.
- Exceptions that can be used to designate exceptions to the rule.
- Related to that can be used to create link with other rules.
- Author:
- Damien Carbonne
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRuleDescription.Builder<B extends RuleDescription.Builder<B>> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class cdc.issues.StructuredDescription
getHeader, getSectionContent, getSectionItems, getSections, getText, hasSection, toString
-
Field Details
-
SECTION_APPLIES_TO
- See Also:
-
SECTION_EXCEPTIONS
- See Also:
-
SECTION_REMARKS
- See Also:
-
SECTION_RELATED_TO
- See Also:
-
SECTION_SOURCES
- See Also:
-
A
- See Also:
-
AN
- See Also:
-
ANY
- See Also:
-
SOME
- See Also:
-
THE
- See Also:
-
ALL
- See Also:
-
-
Constructor Details
-
RuleDescription
-
-
Method Details
-
format
Formats a list of arguments with a format.The following format specifiers are supported:
- wrap: the passed argument is wrapped with '[' and ']'.
- lower: if the passed argument is null, nothing is inserted, otherwise a space followed by the passed argument converted to lower case is inserted.
- capital: if the passed argument is null, nothing is inserted, otherwise a space followed by the passed argument converted to capital case is inserted.
format("Foo{%lower}Bar", null) = "FooBar"format("Foo{%lower}Bar", "AA") = "Foo aaBar"format("Foo{%wrap}Bar", "AA") = "Foo[AA]Bar"
- Parameters:
format- The format string.args- The arguments.- Returns:
- A string formatted for
formatandargs.
-
wrap
-
wrap
-
builder
-