Barcode-Lib4J requires Java 9+

Enum Class «BarcodeType»

java.lang.Object
java.lang.Enum<BarcodeType>
de.vwsoft.barcodelib4j.oned.BarcodeType
All Implemented Interfaces:
Serializable, Comparable<BarcodeType>, Constable

public enum BarcodeType extends Enum<BarcodeType>
Enumeration of all supported 1D barcode types sorted by type name in alphabetical order.

Each barcode type has a unique integer ID which can optionally be used for efficient storage in a file or database (e.g. as a byte type). See getID() and valueOf(int id).

  • Enum Constant Details

    • CODABAR

      public static final BarcodeType CODABAR
      Barcode type "Codabar"
    • CODE11

      public static final BarcodeType CODE11
      Barcode type "Code 11"
    • CODE128

      public static final BarcodeType CODE128
      Barcode type "Code 128"
    • CODE128A

      public static final BarcodeType CODE128A
      Barcode type "Code 128 A"
    • CODE128B

      public static final BarcodeType CODE128B
      Barcode type "Code 128 B"
    • CODE128C

      public static final BarcodeType CODE128C
      Barcode type "Code 128 C"
    • CODE39

      public static final BarcodeType CODE39
      Barcode type "Code 39"
    • CODE39E

      public static final BarcodeType CODE39E
      Barcode type "Code 39 Extended"
    • CODE93

      public static final BarcodeType CODE93
      Barcode type "Code 93"
    • CODE93E

      public static final BarcodeType CODE93E
      Barcode type "Code 93 Extended"
    • EAN13

      public static final BarcodeType EAN13
      Barcode type "EAN-13 (GTIN-13)"
    • EAN14

      public static final BarcodeType EAN14
      Barcode type "EAN-14 (GTIN-14)"
    • EAN8

      public static final BarcodeType EAN8
      Barcode type "EAN-8 (GTIN-8)"
    • EAN128

      public static final BarcodeType EAN128
      Barcode type "GS1-128 (UCC/EAN-128)"
    • ITF

      public static final BarcodeType ITF
      Barcode type "Interleaved 2 of 5"
    • ISBN13

      public static final BarcodeType ISBN13
      Barcode type "ISBN-13"
    • ISMN

      public static final BarcodeType ISMN
      Barcode type "ISMN"
    • PZN

      public static final BarcodeType PZN
      Barcode type "PZN"
    • PZN8

      public static final BarcodeType PZN8
      Barcode type "PZN8"
    • SSCC18

      public static final BarcodeType SSCC18
      Barcode type "SSCC-18 (NVE/EAN-18)"
    • UPCA

      public static final BarcodeType UPCA
      Barcode type "UPC-A"
    • UPCE

      public static final BarcodeType UPCE
      Barcode type "UPC-E"
  • Method Details

    • values

      public static BarcodeType[] 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 BarcodeType 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
    • valueOf

      public static BarcodeType valueOf(int id)
      Returns the enum constant of this class associated with the specified integer ID.
      Parameters:
      id - the ID of the enum constant to be returned.
      Returns:
      the enum constant associated with the specified ID
      Throws:
      IllegalArgumentException - if this enum class has no constant associated with the specified ID
    • getID

      public int getID()
      Returns the integer ID associated with this barcode type.
      Returns:
      the integer ID associated with this barcode type
      See Also:
    • setTypeName

      public void setTypeName(String typeName)
      Sets a custom name for this barcode type. This method allows it to customize the displayed names of barcode types as needed. For example, an alternative name like "ITF" can be set instead of "Interleaved 2 of 5" and so on.
      Parameters:
      typeName - the new name for this barcode type
    • getTypeName

      public String getTypeName()
      Returns the name of this barcode type.
      Returns:
      the name of this barcode type
    • getTypeNameShort

      public String getTypeNameShort()
      Returns a shortened version of the name of this barcode type. If there is a part enclosed in parentheses, it is truncated. For example, if the type name is "EAN-13 (GTIN-13)", this method will return "EAN-13".

      This method is provided for convenience.

      Returns:
      a shortened version of the name of this barcode type
    • toString

      public String toString()
      Returns the name of this barcode type. Equivalent to getTypeName().
      Overrides:
      toString in class Enum<BarcodeType>
      Returns:
      the name of this barcode type