- All Implemented Interfaces:
Serializable,Comparable<DataMatrixShape>,Constable
Enumeration of DataMatrix symbol shape preferences.
DataMatrix symbols can be square or rectangular. The special constant AUTO
allows automatic shape selection based on the data.
The unique integer IDs (0-2) assigned to the constants can be used for efficient
storage in files or databases. The IDs are small enough to 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 Constants -
Method Summary
Modifier and TypeMethodDescriptionintgetID()Returns the integer ID associated with this shape preference.static DataMatrixShapevalueOf(int id) Returns the enum constant of this class associated with the specified integer ID.static DataMatrixShapeReturns the enum constant of this class with the specified name.static DataMatrixShape[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AUTO
Select optimal shape based on data -
SQUARE
Force square symbol shape -
RECTANGLE
Force rectangular symbol shape
-
-
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 (0-2)- 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 shape preference.- Returns:
- the integer ID associated with this shape preference
- See Also:
-