Package com.itextpdf.text.pdf.qrcode
Class ErrorCorrectionLevel
- java.lang.Object
-
- com.itextpdf.text.pdf.qrcode.ErrorCorrectionLevel
-
public final class ErrorCorrectionLevel extends java.lang.ObjectSee ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels defined by the QR code standard.
- Since:
- 5.0.2
-
-
Field Summary
Fields Modifier and Type Field Description private intbitsprivate static ErrorCorrectionLevel[]FOR_BITSstatic ErrorCorrectionLevelHH = ~30% correctionstatic ErrorCorrectionLevelLL = ~7% correctionstatic ErrorCorrectionLevelMM = ~15% correctionprivate java.lang.Stringnameprivate intordinalstatic ErrorCorrectionLevelQQ = ~25% correction
-
Constructor Summary
Constructors Modifier Constructor Description privateErrorCorrectionLevel(int ordinal, int bits, java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ErrorCorrectionLevelforBits(int bits)intgetBits()java.lang.StringgetName()intordinal()java.lang.StringtoString()
-
-
-
Field Detail
-
L
public static final ErrorCorrectionLevel L
L = ~7% correction
-
M
public static final ErrorCorrectionLevel M
M = ~15% correction
-
Q
public static final ErrorCorrectionLevel Q
Q = ~25% correction
-
H
public static final ErrorCorrectionLevel H
H = ~30% correction
-
FOR_BITS
private static final ErrorCorrectionLevel[] FOR_BITS
-
ordinal
private final int ordinal
-
bits
private final int bits
-
name
private final java.lang.String name
-
-
Method Detail
-
ordinal
public int ordinal()
-
getBits
public int getBits()
-
getName
public java.lang.String getName()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
forBits
public static ErrorCorrectionLevel forBits(int bits)
- Parameters:
bits- int containing the two bits encoding a QR Code's error correction level- Returns:
ErrorCorrectionLevelrepresenting the encoded error correction level
-
-