Barcode-Lib4J requires Java 9+

Enum Class «TwoDType»

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

public enum TwoDType extends Enum<TwoDType>
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).

  • Enum Constant Details

    • QRCODE

      public static final TwoDType QRCODE
      Code type "QR Code"
    • DATAMATRIX

      public static final TwoDType DATAMATRIX
      Code type "DataMatrix"
    • PDF417

      public static final TwoDType PDF417
      Code type "PDF 417"
    • AZTEC

      public static final TwoDType AZTEC
      Code type "Aztec"
    • GS1_QRCODE

      public static final TwoDType GS1_QRCODE
      Code type "GS1 QR Code"
    • GS1_DATAMATRIX

      public static final TwoDType GS1_DATAMATRIX
      Code type "GS1 DataMatrix"
  • Method Details

    • values

      public static TwoDType[] 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 TwoDType 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 TwoDType 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.
      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

      public String getTypeName()
      Returns the name of this 2D code type.
      Returns:
      the name of this 2D code type
    • toString

      public String toString()
      Returns the name of this 2D code type. Equivalent to getTypeName().
      Overrides:
      toString in class Enum<TwoDType>
      Returns:
      the name of this 2D code type