X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=core%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2FBarcodeFormat.java;fp=core%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2FBarcodeFormat.java;h=90cbf731ffecfead4fc4f7038e0f85e8d89e6b3f;hb=b921215268ef412c6863e68e566bb7047ec1c4a4;hp=b0ffae85be5a8e6c23a8bd570fbec83ccda35849;hpb=2410f483e4da9ccda251da4144da8325c2bfb2f9;p=zxing.git diff --git a/core/src/com/google/zxing/BarcodeFormat.java b/core/src/com/google/zxing/BarcodeFormat.java index b0ffae85..90cbf731 100644 --- a/core/src/com/google/zxing/BarcodeFormat.java +++ b/core/src/com/google/zxing/BarcodeFormat.java @@ -25,20 +25,38 @@ public final class BarcodeFormat { // No, we can't use an enum here. J2ME doesn't support it. - /** - * 1D barcode format family. - */ - public static final BarcodeFormat ONED = new BarcodeFormat(); - /** - * QR Code 2D barcode format - */ - public static final BarcodeFormat QR_CODE = new BarcodeFormat(); - /** - * DataMatrix 2D barcode format - */ - public static final BarcodeFormat DATAMATRIX = new BarcodeFormat(); - - private BarcodeFormat() { + /** QR Code 2D barcode format. */ + public static final BarcodeFormat QR_CODE = new BarcodeFormat("QR_CODE"); + + /** DataMatrix 2D barcode format. */ + public static final BarcodeFormat DATAMATRIX = new BarcodeFormat("DATAMATRIX"); + + /** UPC-E 1D format. */ + public static final BarcodeFormat UPC_E = new BarcodeFormat("UPC_E"); + + /** UPC-A 1D format. */ + public static final BarcodeFormat UPC_A = new BarcodeFormat("UPC_A"); + + /** EAN-8 1D format. */ + public static final BarcodeFormat EAN_8 = new BarcodeFormat("EAN_8"); + + /** EAN-13 1D format. */ + public static final BarcodeFormat EAN_13 = new BarcodeFormat("EAN_13"); + + /** Code 128 1D format. */ + public static final BarcodeFormat CODE_128 = new BarcodeFormat("CODE_128"); + + /** Code 39 1D format. */ + public static final BarcodeFormat CODE_39 = new BarcodeFormat("CODE_39"); + + private final String name; + + private BarcodeFormat(String name) { + this.name = name; + } + + public String toString() { + return name; } } \ No newline at end of file