Rabbit-R1/android (non root)/java/sources/com/google/zxing/qrcode/encoder/QRCode.java

80 lines
1.9 KiB
Java
Raw Normal View History

2024-05-21 21:08:36 +00:00
package com.google.zxing.qrcode.encoder;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import com.google.zxing.qrcode.decoder.Mode;
import com.google.zxing.qrcode.decoder.Version;
/* loaded from: classes3.dex */
public final class QRCode {
public static final int NUM_MASK_PATTERNS = 8;
private ErrorCorrectionLevel ecLevel;
private int maskPattern = -1;
private ByteMatrix matrix;
private Mode mode;
private Version version;
public static boolean isValidMaskPattern(int i) {
return i >= 0 && i < 8;
}
public ErrorCorrectionLevel getECLevel() {
return this.ecLevel;
}
public int getMaskPattern() {
return this.maskPattern;
}
public ByteMatrix getMatrix() {
return this.matrix;
}
public Mode getMode() {
return this.mode;
}
public Version getVersion() {
return this.version;
}
public void setECLevel(ErrorCorrectionLevel errorCorrectionLevel) {
this.ecLevel = errorCorrectionLevel;
}
public void setMaskPattern(int i) {
this.maskPattern = i;
}
public void setMatrix(ByteMatrix byteMatrix) {
this.matrix = byteMatrix;
}
public void setMode(Mode mode) {
this.mode = mode;
}
public void setVersion(Version version) {
this.version = version;
}
public String toString() {
StringBuilder sb = new StringBuilder(200);
sb.append("<<\n mode: ");
sb.append(this.mode);
sb.append("\n ecLevel: ");
sb.append(this.ecLevel);
sb.append("\n version: ");
sb.append(this.version);
sb.append("\n maskPattern: ");
sb.append(this.maskPattern);
if (this.matrix == null) {
sb.append("\n matrix: null\n");
} else {
sb.append("\n matrix:\n");
sb.append(this.matrix);
}
sb.append(">>\n");
return sb.toString();
}
}