- All Implemented Interfaces:
Serializable,Comparable<BarcodeType>,Constable
Each barcode type has a unique integer ID which can be used for efficient storage in a file or
database. The IDs are small positive integers that can be safely cast to byte if needed.
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 ConstantsEnum 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 TypeMethodDescriptionintgetID()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.booleanReturns whether this barcode type supports the addition of supplementary barcode symbols.booleanReturns whether this barcode type supports auto-completion.booleanReturns whether this barcode type supports customization of the automatically generated human readable text.booleanReturns whether this barcode type supports an optional checksum.booleanReturns whether this barcode type supports setting the width ratio between wide and narrow bars in the barcode symbol.booleanReturns whether this barcode type supports placing the human readable text above the barcode symbol.toString()Returns the name of this barcode type.static BarcodeTypevalueOf(int id) Returns the enum constant of this class associated with the specified integer ID.static BarcodeTypeReturns 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:
-
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".
- Returns:
- a shortened version of the name of this barcode type
-
toString
Returns the name of this barcode type.Equivalent to
getTypeName().- Overrides:
toStringin classEnum<BarcodeType>- Returns:
- the name of this barcode type
-
supportsCustomText
public boolean supportsCustomText()Returns whether this barcode type supports customization of the automatically generated human readable text.- Returns:
- whether this barcode type supports customization of the automatically generated human readable text
- See Also:
-
supportsAddOn
public boolean supportsAddOn()Returns whether this barcode type supports the addition of supplementary barcode symbols.This feature is specific to barcode types in the UPC family, such as
UPC-A,UPC-E,EAN-13,EAN-8,ISBN-13andISMN.- Returns:
- whether this barcode type supports the addition of supplementary barcode symbols
- See Also:
-
supportsTextOnTop
public boolean supportsTextOnTop()Returns whether this barcode type supports placing the human readable text above the barcode symbol.- Returns:
- whether this barcode type supports placing the human readable text above the barcode symbol
- See Also:
-
supportsRatio
public boolean supportsRatio()Returns whether this barcode type supports setting the width ratio between wide and narrow bars in the barcode symbol.This feature is used in two-width barcode types such as
Interleaved 2 of 5 (ITF),Code 39,Code 11andCodabar.- Returns:
- whether this barcode type supports setting the width ratio between wide and narrow bars in the barcode symbol
- See Also:
-
supportsAutoCompletion
public boolean supportsAutoCompletion()Returns whether this barcode type supports auto-completion.The returned value indicates whether the
autoCompleteparameter has any effect when callingsetContenton instances of this barcode type.- Returns:
- whether this barcode type supports auto-completion
-
supportsOptionalChecksum
public boolean supportsOptionalChecksum()Returns whether this barcode type supports an optional checksum.The returned value indicates whether the
appendOptionalChecksumparameter has any effect when callingsetContenton instances of this barcode type.- Returns:
- whether this barcode type supports an optional checksum
-