/*
- * Copyright 2007 Google Inc.
+ * Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* Enumerates barcode formats known to this package.
*
- * @author srowen@google.com (Sean Owen)
+ * @author Sean Owen
*/
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");
+
+ /** ITF (Interleaved Two of Five) 1D format. */
+ public static final BarcodeFormat ITF = new BarcodeFormat("ITF");
+
+ private final String name;
+
+ private BarcodeFormat(String name) {
+ this.name = name;
+ }
+
+ public String toString() {
+ return name;
}
}
\ No newline at end of file