Package io.scanbot.sdk.barcode
Enum Class UpcEanExtensionBehavior
- All Implemented Interfaces:
Serializable,Comparable<UpcEanExtensionBehavior>,Constable
Behavior when scanning UPC/EAN barcodes with EAN-2 or EAN-5 extensions.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionReturn detected 2-digit extension if present, but do not require it.Return detected 5-digit extension if present, but do not require it.Return any detected extension if present, but do not require it.Always ignore the extension.Only barcodes with a 2-digit extension are accepted.Only barcodes with a 5-digit extension are accepted.Only barcodes with either a 2-digit or a 5-digit extension are accepted. -
Method Summary
Modifier and TypeMethodDescriptionstatic UpcEanExtensionBehaviorReturns the enum constant of this class with the specified name.static UpcEanExtensionBehavior[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
REQUIRE_2
Only barcodes with a 2-digit extension are accepted. -
REQUIRE_5
Only barcodes with a 5-digit extension are accepted. -
REQUIRE_ANY
Only barcodes with either a 2-digit or a 5-digit extension are accepted. -
IGNORE
Always ignore the extension. -
ALLOW_2
Return detected 2-digit extension if present, but do not require it. Ignore the 5-digit extension. -
ALLOW_5
Return detected 5-digit extension if present, but do not require it. Ignore the 2-digit extension. -
ALLOW_ANY
Return any detected extension if present, but do not require it.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-