Barcode-Lib4J requires Java 11+

Enum Class «DataMatrixSize»

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

public enum DataMatrixSize extends Enum<DataMatrixSize>
Enumeration of DataMatrix symbol sizes.

DataMatrix symbols are defined by ISO/IEC 16022. The ECC200 standard supports 30 symbol sizes ranging from 10x10 to 144x144 modules. Of these 30 sizes, 24 are square and 6 are rectangular. Rectangular symbols are designed for applications where the available space is distributed over, for example, a long, narrow or rounded surface.

Symbol sizes do not include the quiet zone and are sorted by width, then height.

The special constant AUTO allows automatic size selection, choosing the smallest symbol that can accommodate the data to be encoded.

The unique integer IDs (0-30) 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
    Enum Constant
    Description
    Select optimal size based on data
    DataMatrix size 1 (10x10 modules)
    DataMatrix size 2 (12x12 modules)
    DataMatrix size 3 (14x14 modules)
    DataMatrix size 4 (16x16 modules)
    DataMatrix size 5 (18x8 modules)
    DataMatrix size 6 (18x18 modules)
    DataMatrix size 7 (20x20 modules)
    DataMatrix size 8 (22x22 modules)
    DataMatrix size 9 (24x24 modules)
    DataMatrix size 10 (26x12 modules)
    DataMatrix size 11 (26x26 modules)
    DataMatrix size 12 (32x8 modules)
    DataMatrix size 13 (32x32 modules)
    DataMatrix size 14 (36x12 modules)
    DataMatrix size 15 (36x16 modules)
    DataMatrix size 16 (36x36 modules)
    DataMatrix size 17 (40x40 modules)
    DataMatrix size 18 (44x44 modules)
    DataMatrix size 19 (48x16 modules)
    DataMatrix size 20 (48x48 modules)
    DataMatrix size 21 (52x52 modules)
    DataMatrix size 22 (64x64 modules)
    DataMatrix size 23 (72x72 modules)
    DataMatrix size 24 (80x80 modules)
    DataMatrix size 25 (88x88 modules)
    DataMatrix size 26 (96x96 modules)
    DataMatrix size 27 (104x104 modules)
    DataMatrix size 28 (120x120 modules)
    DataMatrix size 29 (132x132 modules)
    DataMatrix size 30 (144x144 modules)
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the symbol height in modules of this DataMatrix size.
    int
    Returns the integer ID associated with this DataMatrix size.
    int
    Returns the symbol width in modules of this DataMatrix size.
    boolean
    Returns true if this DataMatrix size represents a rectangular symbol.
    boolean
    Returns true if this DataMatrix size represents a square symbol.
    valueOf(int id)
    Returns the enum constant of this class associated with the specified integer ID.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • AUTO

      public static final DataMatrixSize AUTO
      Select optimal size based on data
    • S01

      public static final DataMatrixSize S01
      DataMatrix size 1 (10x10 modules)
    • S02

      public static final DataMatrixSize S02
      DataMatrix size 2 (12x12 modules)
    • S03

      public static final DataMatrixSize S03
      DataMatrix size 3 (14x14 modules)
    • S04

      public static final DataMatrixSize S04
      DataMatrix size 4 (16x16 modules)
    • S05

      public static final DataMatrixSize S05
      DataMatrix size 5 (18x8 modules)
    • S06

      public static final DataMatrixSize S06
      DataMatrix size 6 (18x18 modules)
    • S07

      public static final DataMatrixSize S07
      DataMatrix size 7 (20x20 modules)
    • S08

      public static final DataMatrixSize S08
      DataMatrix size 8 (22x22 modules)
    • S09

      public static final DataMatrixSize S09
      DataMatrix size 9 (24x24 modules)
    • S10

      public static final DataMatrixSize S10
      DataMatrix size 10 (26x12 modules)
    • S11

      public static final DataMatrixSize S11
      DataMatrix size 11 (26x26 modules)
    • S12

      public static final DataMatrixSize S12
      DataMatrix size 12 (32x8 modules)
    • S13

      public static final DataMatrixSize S13
      DataMatrix size 13 (32x32 modules)
    • S14

      public static final DataMatrixSize S14
      DataMatrix size 14 (36x12 modules)
    • S15

      public static final DataMatrixSize S15
      DataMatrix size 15 (36x16 modules)
    • S16

      public static final DataMatrixSize S16
      DataMatrix size 16 (36x36 modules)
    • S17

      public static final DataMatrixSize S17
      DataMatrix size 17 (40x40 modules)
    • S18

      public static final DataMatrixSize S18
      DataMatrix size 18 (44x44 modules)
    • S19

      public static final DataMatrixSize S19
      DataMatrix size 19 (48x16 modules)
    • S20

      public static final DataMatrixSize S20
      DataMatrix size 20 (48x48 modules)
    • S21

      public static final DataMatrixSize S21
      DataMatrix size 21 (52x52 modules)
    • S22

      public static final DataMatrixSize S22
      DataMatrix size 22 (64x64 modules)
    • S23

      public static final DataMatrixSize S23
      DataMatrix size 23 (72x72 modules)
    • S24

      public static final DataMatrixSize S24
      DataMatrix size 24 (80x80 modules)
    • S25

      public static final DataMatrixSize S25
      DataMatrix size 25 (88x88 modules)
    • S26

      public static final DataMatrixSize S26
      DataMatrix size 26 (96x96 modules)
    • S27

      public static final DataMatrixSize S27
      DataMatrix size 27 (104x104 modules)
    • S28

      public static final DataMatrixSize S28
      DataMatrix size 28 (120x120 modules)
    • S29

      public static final DataMatrixSize S29
      DataMatrix size 29 (132x132 modules)
    • S30

      public static final DataMatrixSize S30
      DataMatrix size 30 (144x144 modules)
  • Method Details

    • values

      public static DataMatrixSize[] 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 DataMatrixSize 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 DataMatrixSize 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 (0 for AUTO, 1-30 for specific sizes)
      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 DataMatrix size.

      Returns 0 for AUTO, or 1-30 for specific sizes.

      Returns:
      the integer ID associated with this DataMatrix size
      See Also:
    • getWidth

      public int getWidth()
      Returns the symbol width in modules of this DataMatrix size.
      Returns:
      the symbol width in modules of this DataMatrix size
    • getHeight

      public int getHeight()
      Returns the symbol height in modules of this DataMatrix size.
      Returns:
      the symbol height in modules of this DataMatrix size
    • isSquare

      public boolean isSquare()
      Returns true if this DataMatrix size represents a square symbol.
      Returns:
      true if this DataMatrix size represents a square symbol
    • isRectangle

      public boolean isRectangle()
      Returns true if this DataMatrix size represents a rectangular symbol.
      Returns:
      true if this DataMatrix size represents a rectangular symbol