Enum Class UpcEanExtensionBehavior

java.lang.Object
java.lang.Enum<UpcEanExtensionBehavior>
io.scanbot.sdk.barcode.UpcEanExtensionBehavior
All Implemented Interfaces:
Serializable, Comparable<UpcEanExtensionBehavior>, Constable

public enum UpcEanExtensionBehavior extends Enum<UpcEanExtensionBehavior>
Behavior when scanning UPC/EAN barcodes with EAN-2 or EAN-5 extensions.
  • Enum Constant Details

    • 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 Details

    • values

      public static UpcEanExtensionBehavior[] 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

      public static UpcEanExtensionBehavior valueOf(String name)
      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 name
      NullPointerException - if the argument is null