public final class ErrorCorrectionLevel extends Object
See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels defined by the QR code standard.
Modifier and Type | Field and Description |
---|---|
private int |
bits |
private static ErrorCorrectionLevel[] |
FOR_BITS |
static ErrorCorrectionLevel |
H
H = ~30% correction
|
static ErrorCorrectionLevel |
L
L = ~7% correction
|
static ErrorCorrectionLevel |
M
M = ~15% correction
|
private String |
name |
private int |
ordinal |
static ErrorCorrectionLevel |
Q
Q = ~25% correction
|
Modifier | Constructor and Description |
---|---|
private |
ErrorCorrectionLevel(int ordinal,
int bits,
String name) |
Modifier and Type | Method and Description |
---|---|
static ErrorCorrectionLevel |
forBits(int bits) |
int |
getBits() |
String |
getName() |
int |
ordinal() |
String |
toString() |
public static final ErrorCorrectionLevel L
public static final ErrorCorrectionLevel M
public static final ErrorCorrectionLevel Q
public static final ErrorCorrectionLevel H
private static final ErrorCorrectionLevel[] FOR_BITS
private final int ordinal
private final int bits
private ErrorCorrectionLevel(int ordinal, int bits, String name)
public int ordinal()
public int getBits()
public static ErrorCorrectionLevel forBits(int bits)
bits
- int containing the two bits encoding a QR Code's error correction levelErrorCorrectionLevel
representing the encoded error correction levelWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses