Class UPCALogicImpl
java.lang.Object
org.krysalis.barcode4j.impl.upcean.UPCEANLogicImpl
org.krysalis.barcode4j.impl.upcean.UPCALogicImpl
This class is an implementation of the UPC-A barcode.
- Version:
- $Id: UPCALogicImpl.java,v 1.2 2004-10-24 11:45:53 jmaerki Exp $
- Author:
- Jeremias Maerki
-
Field Summary
Fields inherited from class org.krysalis.barcode4j.impl.upcean.UPCEANLogicImpl
EVEN_PARITY, LEFT_HAND_A, LEFT_HAND_B, ODD_PARITY, RIGHT_HAND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerateBarcodeLogic(ClassicBarcodeLogicHandler logic, String msg) Generates the barcode logic.static StringhandleChecksum(String msg, ChecksumMode mode) Does checksum processing according to the checksum mode.static voidvalidateMessage(String msg) Validates a UPC-A message.Methods inherited from class org.krysalis.barcode4j.impl.upcean.UPCEANLogicImpl
calcChecksum, drawCenterGuard, drawSideGuard, drawSupplemental, encodeChar, getChecksumMode, getSupplementalLength, removeSupplemental, retrieveSupplemental
-
Constructor Details
-
UPCALogicImpl
Main constructor- Parameters:
mode- the checksum mode
-
-
Method Details
-
validateMessage
Validates a UPC-A message. The method throws IllegalArgumentExceptions if an invalid message is passed.- Parameters:
msg- the message to validate
-
handleChecksum
Does checksum processing according to the checksum mode.- Parameters:
msg- the message to processmode- the checksum mode- Returns:
- the possibly modified message
-
generateBarcodeLogic
Description copied from class:UPCEANLogicImplGenerates the barcode logic.- Specified by:
generateBarcodeLogicin classUPCEANLogicImpl- Parameters:
logic- the logic handler to receive generated eventsmsg- the message to encode- See Also:
-