- All Implemented Interfaces:
Serializable
,Comparable<BarcodeType>
,Constable
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)
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionBarcode type "Codabar"Barcode type "Code 11"Barcode type "Code 128"Barcode type "Code 128 A"Barcode type "Code 128 B"Barcode type "Code 128 C"Barcode type "Code 39"Barcode type "Code 39 Extended"Barcode type "Code 93"Barcode type "Code 93 Extended"Barcode type "GS1-128 (UCC/EAN-128)"Barcode type "EAN-13 (GTIN-13)"Barcode type "EAN-14 (GTIN-14)"Barcode type "EAN-8 (GTIN-8)"Barcode type "ISBN-13"Barcode type "ISMN"Barcode type "Interleaved 2 of 5"Barcode type "PZN"Barcode type "PZN8"Barcode type "SSCC-18 (NVE/EAN-18)"Barcode type "UPC-A"Barcode type "UPC-E" -
Method Summary
Modifier and TypeMethodDescriptionint
getID()
Returns the integer ID associated with this barcode type.Returns the name of this barcode type.Returns a shortened version of the name of this barcode type.void
setTypeName
(String typeName) Sets a custom name for this barcode type.toString()
Returns the name of this barcode type.static BarcodeType
valueOf
(int id) Returns the enum constant of this class associated with the specified integer ID.static BarcodeType
Returns the enum constant of this class with the specified name.static BarcodeType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CODABAR
Barcode type "Codabar" -
CODE11
Barcode type "Code 11" -
CODE128
Barcode type "Code 128" -
CODE128A
Barcode type "Code 128 A" -
CODE128B
Barcode type "Code 128 B" -
CODE128C
Barcode type "Code 128 C" -
CODE39
Barcode type "Code 39" -
CODE39E
Barcode type "Code 39 Extended" -
CODE93
Barcode type "Code 93" -
CODE93E
Barcode type "Code 93 Extended" -
EAN13
Barcode type "EAN-13 (GTIN-13)" -
EAN14
Barcode type "EAN-14 (GTIN-14)" -
EAN8
Barcode type "EAN-8 (GTIN-8)" -
EAN128
Barcode type "GS1-128 (UCC/EAN-128)" -
ITF
Barcode type "Interleaved 2 of 5" -
ISBN13
Barcode type "ISBN-13" -
ISMN
Barcode type "ISMN" -
PZN
Barcode type "PZN" -
PZN8
Barcode type "PZN8" -
SSCC18
Barcode type "SSCC-18 (NVE/EAN-18)" -
UPCA
Barcode type "UPC-A" -
UPCE
Barcode type "UPC-E"
-
-
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
-
valueOf
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
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
Returns the name of this barcode type.- Returns:
- the name of this barcode type
-
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
Returns the name of this barcode type. Equivalent togetTypeName()
.- Overrides:
toString
in classEnum<BarcodeType>
- Returns:
- the name of this barcode type
-