AffixDecorator
data class AffixDecorator(var enabled: Boolean = DEFAULT_ENABLED, var descriptor: String = DEFAULT_DESCRIPTOR) : DecoratorScheme(source)
Decorates a string by adding a prefix and suffix.
Constructors
Properties
Link copied to clipboard
Additional logic that determines how strings are generated.
Link copied to clipboard
The description of the affix. Here, '\'
is the escape character (which also escapes itself), and each unescaped '@'
is replaced with the original string. If the descriptor does not contain an unescaped '@'
, then the entire descriptor is placed both in front of and after the original string. For example, affixing "word"
with descriptor "(@)"
gives "(word)"
, and affixing "word"
with descriptor "()"
gives "()word()"
.
Functions
Link copied to clipboard
Returns a deep copy, retaining the uuid if and only if retainUuid is true
.
Link copied to clipboard
Validates the state, and indicates whether and why it is invalid.