Barcode-Lib4J requires Java 11+

Enum Class «QRCodeVersion»

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

public enum QRCodeVersion extends Enum<QRCodeVersion>
Enumeration of QR Code versions with their corresponding symbol sizes.

QR Code versions are defined by ISO/IEC 18004 and range from version 1 (21x21 modules) to version 40 (177x177 modules). All QR Code symbols are square. Symbol sizes do not include the quiet zone.

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

The unique numbers (0-40) assigned to the constants can be used for efficient storage in files or databases. The numbers are small enough to be safely cast to byte if needed. See getNumber() and valueOf(int number).

  • 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 version based on data
    QR Code version 1 (21x21 modules)
    QR Code version 2 (25x25 modules)
    QR Code version 3 (29x29 modules)
    QR Code version 4 (33x33 modules)
    QR Code version 5 (37x37 modules)
    QR Code version 6 (41x41 modules)
    QR Code version 7 (45x45 modules)
    QR Code version 8 (49x49 modules)
    QR Code version 9 (53x53 modules)
    QR Code version 10 (57x57 modules)
    QR Code version 11 (61x61 modules)
    QR Code version 12 (65x65 modules)
    QR Code version 13 (69x69 modules)
    QR Code version 14 (73x73 modules)
    QR Code version 15 (77x77 modules)
    QR Code version 16 (81x81 modules)
    QR Code version 17 (85x85 modules)
    QR Code version 18 (89x89 modules)
    QR Code version 19 (93x93 modules)
    QR Code version 20 (97x97 modules)
    QR Code version 21 (101x101 modules)
    QR Code version 22 (105x105 modules)
    QR Code version 23 (109x109 modules)
    QR Code version 24 (113x113 modules)
    QR Code version 25 (117x117 modules)
    QR Code version 26 (121x121 modules)
    QR Code version 27 (125x125 modules)
    QR Code version 28 (129x129 modules)
    QR Code version 29 (133x133 modules)
    QR Code version 30 (137x137 modules)
    QR Code version 31 (141x141 modules)
    QR Code version 32 (145x145 modules)
    QR Code version 33 (149x149 modules)
    QR Code version 34 (153x153 modules)
    QR Code version 35 (157x157 modules)
    QR Code version 36 (161x161 modules)
    QR Code version 37 (165x165 modules)
    QR Code version 38 (169x169 modules)
    QR Code version 39 (173x173 modules)
    QR Code version 40 (177x177 modules)
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the version number of this QR Code version.
    int
    Returns the symbol size (width/height in modules) of this QR Code version.
    valueOf(int number)
    Returns the enum constant of this class corresponding to the specified version number.
    Returns the enum constant of this class with the specified name.
    static QRCodeVersion[]
    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 QRCodeVersion AUTO
      Select optimal version based on data
    • V01

      public static final QRCodeVersion V01
      QR Code version 1 (21x21 modules)
    • V02

      public static final QRCodeVersion V02
      QR Code version 2 (25x25 modules)
    • V03

      public static final QRCodeVersion V03
      QR Code version 3 (29x29 modules)
    • V04

      public static final QRCodeVersion V04
      QR Code version 4 (33x33 modules)
    • V05

      public static final QRCodeVersion V05
      QR Code version 5 (37x37 modules)
    • V06

      public static final QRCodeVersion V06
      QR Code version 6 (41x41 modules)
    • V07

      public static final QRCodeVersion V07
      QR Code version 7 (45x45 modules)
    • V08

      public static final QRCodeVersion V08
      QR Code version 8 (49x49 modules)
    • V09

      public static final QRCodeVersion V09
      QR Code version 9 (53x53 modules)
    • V10

      public static final QRCodeVersion V10
      QR Code version 10 (57x57 modules)
    • V11

      public static final QRCodeVersion V11
      QR Code version 11 (61x61 modules)
    • V12

      public static final QRCodeVersion V12
      QR Code version 12 (65x65 modules)
    • V13

      public static final QRCodeVersion V13
      QR Code version 13 (69x69 modules)
    • V14

      public static final QRCodeVersion V14
      QR Code version 14 (73x73 modules)
    • V15

      public static final QRCodeVersion V15
      QR Code version 15 (77x77 modules)
    • V16

      public static final QRCodeVersion V16
      QR Code version 16 (81x81 modules)
    • V17

      public static final QRCodeVersion V17
      QR Code version 17 (85x85 modules)
    • V18

      public static final QRCodeVersion V18
      QR Code version 18 (89x89 modules)
    • V19

      public static final QRCodeVersion V19
      QR Code version 19 (93x93 modules)
    • V20

      public static final QRCodeVersion V20
      QR Code version 20 (97x97 modules)
    • V21

      public static final QRCodeVersion V21
      QR Code version 21 (101x101 modules)
    • V22

      public static final QRCodeVersion V22
      QR Code version 22 (105x105 modules)
    • V23

      public static final QRCodeVersion V23
      QR Code version 23 (109x109 modules)
    • V24

      public static final QRCodeVersion V24
      QR Code version 24 (113x113 modules)
    • V25

      public static final QRCodeVersion V25
      QR Code version 25 (117x117 modules)
    • V26

      public static final QRCodeVersion V26
      QR Code version 26 (121x121 modules)
    • V27

      public static final QRCodeVersion V27
      QR Code version 27 (125x125 modules)
    • V28

      public static final QRCodeVersion V28
      QR Code version 28 (129x129 modules)
    • V29

      public static final QRCodeVersion V29
      QR Code version 29 (133x133 modules)
    • V30

      public static final QRCodeVersion V30
      QR Code version 30 (137x137 modules)
    • V31

      public static final QRCodeVersion V31
      QR Code version 31 (141x141 modules)
    • V32

      public static final QRCodeVersion V32
      QR Code version 32 (145x145 modules)
    • V33

      public static final QRCodeVersion V33
      QR Code version 33 (149x149 modules)
    • V34

      public static final QRCodeVersion V34
      QR Code version 34 (153x153 modules)
    • V35

      public static final QRCodeVersion V35
      QR Code version 35 (157x157 modules)
    • V36

      public static final QRCodeVersion V36
      QR Code version 36 (161x161 modules)
    • V37

      public static final QRCodeVersion V37
      QR Code version 37 (165x165 modules)
    • V38

      public static final QRCodeVersion V38
      QR Code version 38 (169x169 modules)
    • V39

      public static final QRCodeVersion V39
      QR Code version 39 (173x173 modules)
    • V40

      public static final QRCodeVersion V40
      QR Code version 40 (177x177 modules)
  • Method Details

    • values

      public static QRCodeVersion[] 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 QRCodeVersion 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 QRCodeVersion valueOf(int number)
      Returns the enum constant of this class corresponding to the specified version number.
      Parameters:
      number - the version number (0 for AUTO, 1-40 for specific versions)
      Returns:
      the enum constant corresponding to the specified version number
      Throws:
      IllegalArgumentException - if the specified version number is outside the valid range
    • getNumber

      public int getNumber()
      Returns the version number of this QR Code version.

      Returns 0 for AUTO, or 1-40 for specific versions.

      Returns:
      the version number of this QR Code version
      See Also:
    • getSize

      public int getSize()
      Returns the symbol size (width/height in modules) of this QR Code version.
      Returns:
      the symbol size (width/height in modules) of this QR Code version