Class encapsulating barcode data plus the ID of the associated symbology.
This structure is used by BarcodeListener to deliver the results of successful barcode scans to the user.
Thread safety:
Public Member Functions | |
BarcodeData () | |
Construct with empty barcode data and unknown symbology. | |
BarcodeData (@NonNull String initBarcode) | |
Construct with given barcode data and unknown symbology. More... | |
BarcodeData (@NonNull String initBarcode, @NonNull BarcodeSymbology initSymbology) | |
Constructor - supplied barcode data and symbology. More... | |
String | barcode () |
Retrieve the barcode data as a string. More... | |
void | setBarcode (@NonNull String newBarcode) |
Set the barcode data. More... | |
void | setSymbologyID (@NonNull BarcodeSymbology newSymbology) |
Set the symbology ID. More... | |
BarcodeSymbology | symbologyID () |
Retrieve the symbology ID used by the barcode. More... | |
String | symbologyName () |
Retrieve the current symbology name as a string. More... | |
Static Public Member Functions | |
static String | symbologyName (@NonNull BarcodeSymbology symb) |
Retrieve the name of a given symbology as a string. More... | |
BarcodeData | ( | @NonNull String | initBarcode | ) |
Construct with given barcode data and unknown symbology.
initBarcode | Initial barcode data, represented as a Java string (UTF-16) |
BarcodeData | ( | @NonNull String | initBarcode, |
@NonNull BarcodeSymbology | initSymbology | ||
) |
Constructor - supplied barcode data and symbology.
initBarcode | Initial value of barcode data field, represented as a Java string (UTF-16) |
initSymbology | Initial value of symbology field |
String barcode | ( | ) |
Retrieve the barcode data as a string.
void setBarcode | ( | @NonNull String | newBarcode | ) |
Set the barcode data.
newBarcode | New value of barcode data field, represented as a Java string (UTF-16) |
void setSymbologyID | ( | @NonNull BarcodeSymbology | newSymbology | ) |
Set the symbology ID.
newSymbology | New value of barcode symbology field |
BarcodeSymbology symbologyID | ( | ) |
Retrieve the symbology ID used by the barcode.
String symbologyName | ( | ) |
Retrieve the current symbology name as a string.
|
static |
Retrieve the name of a given symbology as a string.
symb | Symbology ID for which the name is to be retrieved |