Expiry Date Text Builder
Defined in package com.scandit.datacapture.label.capture
- ExpiryDateTextBuilder
class ExpiryDateTextBuilder : TextFieldBuilder
Added in version 6.21.0
This class is used to define an expiry date field for a LabelDefinition in a fluent way.
- setAnchorRegexes(anchorRegexes)
@NonNull ExpiryDateTextBuilder setAnchorRegexes(@NonNull String anchorRegexes)
Added in version 8.0.0
Used to specify keywords or phrases that help identify the context of the field. This is particularly useful when the label contains multiple fields that could match the same regex (e.g., when both packaging and expiry dates are present).
- setAnchorRegexes(anchorRegexes)
@NonNull ExpiryDateTextBuilder setAnchorRegexes(@NonNull Iterable<@NonNull String> anchorRegexes)
Added in version 8.0.0
Used to specify keywords or phrases that help identify the context of the field. This is particularly useful when the label contains multiple fields that could match the same regex (e.g., when both packaging and expiry dates are present).
- setAnchorRegex(anchorRegex)
@NonNull ExpiryDateTextBuilder setAnchorRegex(@NonNull Regex anchorRegex)
Added in version 8.0.0
Used to specify keywords or phrases that help identify the context of the field. This is particularly useful when the label contains multiple fields that could match the same regex (e.g., when both packaging and expiry dates are present).
- resetAnchorRegexes()
@NonNull ExpiryDateTextBuilder resetAnchorRegexes()
Added in version 8.0.0
All pre-built fields come with default valueRegexes and anchorRegexes that are suitable for most use cases. Using either method is optional and will override the defaults.
This method can be used to remove the default anchorRegex, allowing you to rely solely on the valueRegexes for detection.
- setLabelDateFormat(labelDateFormat)
@NonNull ExpiryDateTextBuilder setLabelDateFormat(@NonNull LabelDateFormat labelDateFormat)
Added in version 7.2.0
Sets a LabelDateFormat to use when recognising this date.
- build(name)
@NonNull ExpiryDateText build(@NonNull String name)
Added in version 6.21.0
Builds the ExpiryDateText using the properties provided previously with other methods.
- getThis()
@NonNull ExpiryDateTextBuilder getThis()
Added in version 6.21.0
Returns the Builder itself.