Class CustomClassRules.Builder
java.lang.Object
com.microblink.blinkid.entities.recognizers.blinkid.generic.CustomClassRules.Builder
- Enclosing class:
- CustomClassRules
Builder for
CustomClassRules.-
Constructor Summary
ConstructorsConstructorDescriptionBuilder(DetailedFieldType[] detailedFieldTypes) Constructs a new builder with the provided detailed field types as they are mandatory for creating a custom class rule. -
Method Summary
Modifier and TypeMethodDescriptionbuild()BuildsCustomClassRulesfrom the provided arguments.setCountry(Country country) Sets the country of the document class.Sets the region of the document class.Sets the type of the document class.
-
Constructor Details
-
Builder
Constructs a new builder with the provided detailed field types as they are mandatory for creating a custom class rule.- Parameters:
detailedFieldTypes- array of detailed field types that are mandatory for the document class- Throws:
IllegalArgumentException- if detailedFieldTypes is null or empty
-
-
Method Details
-
build
BuildsCustomClassRulesfrom the provided arguments.- Returns:
- built
CustomClassRules
-
setCountry
Sets the country of the document class. If set, rules will be applied on documents issued by specified country only. Otherwise, or if set tonull, issuing country will not be taken into account. Setting the country toType.NONEhas no effect.- Parameters:
country- country of the document class- Returns:
- this builder
-
setRegion
Sets the region of the document class. If set, rules will be applied on documents issued by specified region only. Otherwise, or if set tonull, issuing region will not be taken into account. If set toRegion.NONE, the rules will be applied only to the default region (for example, Croatia has no regions, so the rules will be applied to all documents issued in Croatia, but if country is set to the USA, the documents that have a region will be excluded from the rules).- Parameters:
region- region of the document class- Returns:
- this builder
-
setType
Sets the type of the document class. If set, rules will be applied on documents of specified type only. Otherwise, or if set tonull, document type will not be taken into account. Setting the type toType.NONEhas no effect.- Parameters:
type- type of the document class- Returns:
- this builder
-