Label Field Definition Builder
Defined in package com.scandit.datacapture.label.capture
- LabelFieldDefinitionBuilder
class LabelFieldDefinitionBuilder<BuilderType, FieldType>
Added in version 6.21.0
Generic base class for field definition builders. Provides common functionality for configuring field properties such as regexes, optional status, and hidden properties.
- isOptional
booleanisOptional()voidsetOptional(booleanvalue)Added in version 6.21.0
Whether the field is optional or mandatory. This is helpful when certain fields may not be present on every scan.
- valueRegexes
@NonNull Iterable<@NonNull String> getValueRegexes()
voidsetValueRegexes(@NonNull Iterable<@NonNull String> value)Added in version 8.0.0
The regexes used for content validation of this field.
- isOptional(optional)
@NonNull
BuilderTypeisOptional(booleanoptional)Added in version 6.21.0
Sets whether the field is optional or mandatory.
- numberOfMandatoryInstances
@Nullable Integer getNumberOfMandatoryInstances()
voidsetNumberOfMandatoryInstances(@Nullable Integer value)Added in version 7.6.0
The minimum number of instances of this field that must be captured for the label to be considered complete. This is useful for fields that may appear multiple times on a label, such as multiple serial numbers or repeated information.
- setNumberOfMandatoryInstances(numberOfMandatoryInstances)
@NonNull
BuilderTypesetNumberOfMandatoryInstances( @Nullable Integer numberOfMandatoryInstances)Added in version 7.6.0
The minimum number of instances of this field that must be captured for the label to be considered complete. This is useful for fields that may appear multiple times on a label, such as multiple serial numbers or repeated information.
- setValueRegexes(valueRegexes)
@NonNull
BuilderTypesetValueRegexes(@NonNull String valueRegexes)Added in version 8.0.0
Sets the regexes used for content validation from a single string.
- setValueRegexes(valueRegexes)
@NonNull
BuilderTypesetValueRegexes(@NonNull Iterable<@NonNull String> valueRegexes)Added in version 8.0.0
Sets the regexes used for content validation from a collection of strings.
- setValueRegex(valueRegex)
@NonNull
BuilderTypesetValueRegex(@NonNull String valueRegex)Added in version 8.0.0
Sets a single regex for content validation.
- setValueRegex(valueRegex)
@NonNull
BuilderTypesetValueRegex(@NonNull Regex valueRegex)Added in version 8.0.0
Sets a regular expression for content validation.
- setHiddenProperty(key, value)
@NonNull
BuilderTypesetHiddenProperty(@NonNull String key, @NonNull Object value)Added in version 6.21.0
- setHiddenProperties(hiddenProperties)
@NonNull
BuilderTypesetHiddenProperties(@NonNull Map<@NonNull String, @NonNull Object> hiddenProperties)Added in version 6.21.0
- build(name)
@NonNull
FieldTypebuild(@NonNull String name)Added in version 6.21.0
Creates a field definition with the specified name and all configured properties.
- buildFluent(name)
@NonNull LabelDefinitionBuilder buildFluent(@NonNull String name)
Added in version 6.21.0
Creates a field definition and returns a label definition builder for method chaining.