- All Implemented Interfaces:
Serializable
,Comparable<TwoDType>
,Constable
Enumeration of all supported 2D code types.
Each 2D code 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 ConstantDescriptionCode type "Aztec"Code type "DataMatrix"Code type "GS1 DataMatrix"Code type "GS1 QR Code"Code type "PDF 417"Code type "QR Code" -
Method Summary
Modifier and TypeMethodDescriptionint
getID()
Returns the integer ID associated with this 2D code type.Returns the name of this 2D code type.boolean
isGS1()
Convenience method that returns whether this enum constant represents a GS1 code type.toString()
Returns the name of this 2D code type.static TwoDType
valueOf
(int id) Returns the enum constant of this class associated with the specified integer ID.static TwoDType
Returns the enum constant of this class with the specified name.static TwoDType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
QRCODE
Code type "QR Code" -
DATAMATRIX
Code type "DataMatrix" -
PDF417
Code type "PDF 417" -
AZTEC
Code type "Aztec" -
GS1_QRCODE
Code type "GS1 QR Code" -
GS1_DATAMATRIX
Code type "GS1 DataMatrix"
-
-
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 2D code type.- Returns:
- the integer ID associated with this 2D code type
-
isGS1
public boolean isGS1()Convenience method that returns whether this enum constant represents a GS1 code type. It is a shortcut for:foo == TwoDType.GS1_QRCODE || foo == TwoDType.GS1_DATAMATRIX
- Returns:
true
if the enum constant represents a GS1 code type,false
otherwise
-
getTypeName
Returns the name of this 2D code type.- Returns:
- the name of this 2D code type
-
toString
Returns the name of this 2D code type. Equivalent togetTypeName()
.
-