public enum ErrorCorrectionLevel extends Enum<ErrorCorrectionLevel>
See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels defined by the QR code standard.
枚举常量和说明 |
---|
H
H = ~30% correction
|
L
L = ~7% correction
|
M
M = ~15% correction
|
Q
Q = ~25% correction
|
限定符和类型 | 方法和说明 |
---|---|
static ErrorCorrectionLevel |
forBits(int bits) |
int |
getBits() |
static ErrorCorrectionLevel |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static ErrorCorrectionLevel[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final ErrorCorrectionLevel L
public static final ErrorCorrectionLevel M
public static final ErrorCorrectionLevel Q
public static final ErrorCorrectionLevel H
public static ErrorCorrectionLevel[] values()
for (ErrorCorrectionLevel c : ErrorCorrectionLevel.values()) System.out.println(c);
public static ErrorCorrectionLevel valueOf(String name)
name
- 要返回的枚举常量的名称。如果该枚举类型没有带有指定名称的常量,
- 则抛出 IllegalArgumentException如果参数为空值,
- 则抛出 NullPointerExceptionpublic int getBits()
public static ErrorCorrectionLevel forBits(int bits)
bits
- int containing the two bits encoding a QR Code's error correction levelCopyright © 2007–2014. All rights reserved.