Unit Price Text Builder

Defined in package com.scandit.datacapture.label

UnitPriceTextBuilder
class UnitPriceTextBuilder : TextFieldBuilder

Added in version 6.21.0

Builder class for creating UnitPriceText field definitions. Provides a fluent interface for configuring unit price text field properties including validation regexes and anchor regexes.

setAnchorRegexes(anchorRegexes)
@NonNull UnitPriceTextBuilder setAnchorRegexes(@NonNull String anchorRegexes)

Added in version 8.0.0

Sets the identifying anchor regexes from a single string.

setAnchorRegexes(anchorRegexes)
@NonNull UnitPriceTextBuilder setAnchorRegexes(@NonNull Iterable<@NonNull String> anchorRegexes)

Added in version 8.0.0

Sets the identifying anchor regexes from a list of strings.

setAnchorRegex(anchorRegex)
@NonNull UnitPriceTextBuilder 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 UnitPriceTextBuilder 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.

build(name)
@NonNull UnitPriceText build(@NonNull String name)

Added in version 6.21.0

Creates a UnitPriceText field definition with the specified name and all configured properties.

getThis()
@NonNull UnitPriceTextBuilder getThis()

Added in version 6.21.0

Returns this builder instance for method chaining.