Barcode-Lib4J requires Java 11+

Enum Class «AztecSize»

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

public enum AztecSize extends Enum<AztecSize>
Enumeration of Aztec symbol sizes.

Aztec sizes are defined by ISO/IEC 24778 and include both normal and compact variants. Normal variants have 1 to 32 layers with sizes ranging from 19x19 to 151x151 modules. Compact variants have 1 to 4 layers with sizes ranging from 15x15 to 27x27 modules.

All Aztec symbols are square. In contrast to other 2D codes Aztec does not require a quiet zone as its bullseye finder pattern enables reliable detection without surrounding white space.

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

The unique layer counts (1 to 32 for normal sizes, -1 to -4 for compact sizes, 0 for AUTO) assigned to the constants can be used as IDs for efficient storage in files or databases. The numbers are small enough to be safely cast to signed byte if needed. See getLayerCount() and valueOf(int layerCount).

  • 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
    Aztec compact 1 (15x15 modules)
    Aztec compact 2 (19x19 modules)
    Aztec compact 3 (23x23 modules)
    Aztec compact 4 (27x27 modules)
    Aztec normal 1 (19x19 modules)
    Aztec normal 2 (23x23 modules)
    Aztec normal 3 (27x27 modules)
    Aztec normal 4 (31x31 modules)
    Aztec normal 5 (37x37 modules)
    Aztec normal 6 (41x41 modules)
    Aztec normal 7 (45x45 modules)
    Aztec normal 8 (49x49 modules)
    Aztec normal 9 (53x53 modules)
    Aztec normal 10 (57x57 modules)
    Aztec normal 11 (61x61 modules)
    Aztec normal 12 (67x67 modules)
    Aztec normal 13 (71x71 modules)
    Aztec normal 14 (75x75 modules)
    Aztec normal 15 (79x79 modules)
    Aztec normal 16 (83x83 modules)
    Aztec normal 17 (87x87 modules)
    Aztec normal 18 (91x91 modules)
    Aztec normal 19 (95x95 modules)
    Aztec normal 20 (101x101 modules)
    Aztec normal 21 (105x105 modules)
    Aztec normal 22 (109x109 modules)
    Aztec normal 23 (113x113 modules)
    Aztec normal 24 (117x117 modules)
    Aztec normal 25 (121x121 modules)
    Aztec normal 26 (125x125 modules)
    Aztec normal 27 (131x131 modules)
    Aztec normal 28 (135x135 modules)
    Aztec normal 29 (139x139 modules)
    Aztec normal 30 (143x143 modules)
    Aztec normal 31 (147x147 modules)
    Aztec normal 32 (151x151 modules)
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the layer count corresponding to this Aztec size.
    int
    Returns the symbol size (width/height in modules) of this Aztec size.
    boolean
    Returns true if this Aztec size represents a compact symbol.
    boolean
    Returns true if this Aztec size represents a normal symbol.
    static AztecSize
    valueOf(int layerCount)
    Returns the enum constant of this class corresponding to the specified layer count.
    static AztecSize
    Returns the enum constant of this class with the specified name.
    static AztecSize[]
    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 AztecSize AUTO
      Select optimal size based on data
    • COMPACT01

      public static final AztecSize COMPACT01
      Aztec compact 1 (15x15 modules)
    • COMPACT02

      public static final AztecSize COMPACT02
      Aztec compact 2 (19x19 modules)
    • COMPACT03

      public static final AztecSize COMPACT03
      Aztec compact 3 (23x23 modules)
    • COMPACT04

      public static final AztecSize COMPACT04
      Aztec compact 4 (27x27 modules)
    • NORMAL01

      public static final AztecSize NORMAL01
      Aztec normal 1 (19x19 modules)
    • NORMAL02

      public static final AztecSize NORMAL02
      Aztec normal 2 (23x23 modules)
    • NORMAL03

      public static final AztecSize NORMAL03
      Aztec normal 3 (27x27 modules)
    • NORMAL04

      public static final AztecSize NORMAL04
      Aztec normal 4 (31x31 modules)
    • NORMAL05

      public static final AztecSize NORMAL05
      Aztec normal 5 (37x37 modules)
    • NORMAL06

      public static final AztecSize NORMAL06
      Aztec normal 6 (41x41 modules)
    • NORMAL07

      public static final AztecSize NORMAL07
      Aztec normal 7 (45x45 modules)
    • NORMAL08

      public static final AztecSize NORMAL08
      Aztec normal 8 (49x49 modules)
    • NORMAL09

      public static final AztecSize NORMAL09
      Aztec normal 9 (53x53 modules)
    • NORMAL10

      public static final AztecSize NORMAL10
      Aztec normal 10 (57x57 modules)
    • NORMAL11

      public static final AztecSize NORMAL11
      Aztec normal 11 (61x61 modules)
    • NORMAL12

      public static final AztecSize NORMAL12
      Aztec normal 12 (67x67 modules)
    • NORMAL13

      public static final AztecSize NORMAL13
      Aztec normal 13 (71x71 modules)
    • NORMAL14

      public static final AztecSize NORMAL14
      Aztec normal 14 (75x75 modules)
    • NORMAL15

      public static final AztecSize NORMAL15
      Aztec normal 15 (79x79 modules)
    • NORMAL16

      public static final AztecSize NORMAL16
      Aztec normal 16 (83x83 modules)
    • NORMAL17

      public static final AztecSize NORMAL17
      Aztec normal 17 (87x87 modules)
    • NORMAL18

      public static final AztecSize NORMAL18
      Aztec normal 18 (91x91 modules)
    • NORMAL19

      public static final AztecSize NORMAL19
      Aztec normal 19 (95x95 modules)
    • NORMAL20

      public static final AztecSize NORMAL20
      Aztec normal 20 (101x101 modules)
    • NORMAL21

      public static final AztecSize NORMAL21
      Aztec normal 21 (105x105 modules)
    • NORMAL22

      public static final AztecSize NORMAL22
      Aztec normal 22 (109x109 modules)
    • NORMAL23

      public static final AztecSize NORMAL23
      Aztec normal 23 (113x113 modules)
    • NORMAL24

      public static final AztecSize NORMAL24
      Aztec normal 24 (117x117 modules)
    • NORMAL25

      public static final AztecSize NORMAL25
      Aztec normal 25 (121x121 modules)
    • NORMAL26

      public static final AztecSize NORMAL26
      Aztec normal 26 (125x125 modules)
    • NORMAL27

      public static final AztecSize NORMAL27
      Aztec normal 27 (131x131 modules)
    • NORMAL28

      public static final AztecSize NORMAL28
      Aztec normal 28 (135x135 modules)
    • NORMAL29

      public static final AztecSize NORMAL29
      Aztec normal 29 (139x139 modules)
    • NORMAL30

      public static final AztecSize NORMAL30
      Aztec normal 30 (143x143 modules)
    • NORMAL31

      public static final AztecSize NORMAL31
      Aztec normal 31 (147x147 modules)
    • NORMAL32

      public static final AztecSize NORMAL32
      Aztec normal 32 (151x151 modules)
  • Method Details

    • values

      public static AztecSize[] 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 AztecSize 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 AztecSize valueOf(int layerCount)
      Returns the enum constant of this class corresponding to the specified layer count.
      Parameters:
      layerCount - the layer count (1 to 32 for normal, -1 to -4 for compact, 0 for AUTO)
      Returns:
      the enum constant corresponding to the specified layer count
      Throws:
      IllegalArgumentException - if this enum class has no constant corresponding to the specified layer count
    • getLayerCount

      public int getLayerCount()
      Returns the layer count corresponding to this Aztec size.

      Returns positive values (1 to 32) for normal sizes, negative values (-1 to -4) for compact sizes, or 0 for AUTO.

      Returns:
      the layer count corresponding to this Aztec size
      See Also:
    • getSize

      public int getSize()
      Returns the symbol size (width/height in modules) of this Aztec size.
      Returns:
      the symbol size (width/height in modules) of this Aztec size
    • isNormal

      public boolean isNormal()
      Returns true if this Aztec size represents a normal symbol.
      Returns:
      true if this Aztec size represents a normal symbol
    • isCompact

      public boolean isCompact()
      Returns true if this Aztec size represents a compact symbol.
      Returns:
      true if this Aztec size represents a compact symbol