Package io.scanbot.sdk.barcode
Enum UpcEanExtensionBehavior
- java.lang.Object
-
- java.lang.Enum<UpcEanExtensionBehavior>
-
- io.scanbot.sdk.barcode.UpcEanExtensionBehavior
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<UpcEanExtensionBehavior>
public enum UpcEanExtensionBehavior extends java.lang.Enum<UpcEanExtensionBehavior>
Behavior when scanning UPC/EAN barcodes with EAN-2 or EAN-5 extensions.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLOW_2Return detected 2-digit extension if present, but do not require it.ALLOW_5Return detected 5-digit extension if present, but do not require it.ALLOW_ANYReturn any detected extension if present, but do not require it.IGNOREAlways ignore the extension.REQUIRE_2Only barcodes with a 2-digit extension are accepted.REQUIRE_5Only barcodes with a 5-digit extension are accepted.REQUIRE_ANYOnly barcodes with either a 2-digit or a 5-digit extension are accepted.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static UpcEanExtensionBehaviorvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static UpcEanExtensionBehavior[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
REQUIRE_2
public static final UpcEanExtensionBehavior REQUIRE_2
Only barcodes with a 2-digit extension are accepted.
-
REQUIRE_5
public static final UpcEanExtensionBehavior REQUIRE_5
Only barcodes with a 5-digit extension are accepted.
-
REQUIRE_ANY
public static final UpcEanExtensionBehavior REQUIRE_ANY
Only barcodes with either a 2-digit or a 5-digit extension are accepted.
-
IGNORE
public static final UpcEanExtensionBehavior IGNORE
Always ignore the extension.
-
ALLOW_2
public static final UpcEanExtensionBehavior ALLOW_2
Return detected 2-digit extension if present, but do not require it. Ignore the 5-digit extension.
-
ALLOW_5
public static final UpcEanExtensionBehavior ALLOW_5
Return detected 5-digit extension if present, but do not require it. Ignore the 2-digit extension.
-
ALLOW_ANY
public static final UpcEanExtensionBehavior ALLOW_ANY
Return any detected extension if present, but do not require it.
-
-
Method Detail
-
values
public static UpcEanExtensionBehavior[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (UpcEanExtensionBehavior c : UpcEanExtensionBehavior.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static UpcEanExtensionBehavior valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-