|
barcode4j 2.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.krysalis.barcode4j.impl.int2of5.Interleaved2Of5LogicImpl
public class Interleaved2Of5LogicImpl
This class is an implementation of the Interleaved 2 of 5 barcode.
Constructor Summary | |
---|---|
Interleaved2Of5LogicImpl(ChecksumMode mode,
boolean displayChecksum)
Main constructor. |
Method Summary | |
---|---|
static char |
calcChecksum(java.lang.String msg)
Calculates the checksum for a message to be encoded as an Interleaved 2 of 5 barcode. |
static char |
calcChecksum(java.lang.String msg,
int oddMultiplier,
int evenMultiplier)
Calculates the checksum for a message to be encoded as an Interleaved 2 of 5 barcode. |
protected java.lang.String |
doHandleChecksum(java.lang.StringBuffer sb,
ChecksumMode mode)
Handles the checksum based on the given checksum mode. |
void |
generateBarcodeLogic(ClassicBarcodeLogicHandler logic,
java.lang.String msg)
Generates the barcode logic. |
ChecksumMode |
getChecksumMode()
Returns the current checksum mode |
protected java.lang.String |
handleChecksum(java.lang.StringBuffer sb)
Handles the checksum based on the checksum mode. |
static boolean |
validateChecksum(java.lang.String msg)
Verifies the checksum for a message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Interleaved2Of5LogicImpl(ChecksumMode mode, boolean displayChecksum)
mode
- the checksum modedisplayChecksum
- Controls whether to display checksum
in the human-readable messageMethod Detail |
---|
public ChecksumMode getChecksumMode()
public static char calcChecksum(java.lang.String msg, int oddMultiplier, int evenMultiplier)
msg
- message to calculate the check digit foroddMultiplier
- multiplier to be used for odd positions (usually 3 or 4)evenMultiplier
- multiplier to be used for even positions (usually 1 or 9)
public static char calcChecksum(java.lang.String msg)
msg
- message to calculate the check digit for
public static boolean validateChecksum(java.lang.String msg)
msg
- message (check digit included)
protected java.lang.String doHandleChecksum(java.lang.StringBuffer sb, ChecksumMode mode)
sb
- the string buffer containing the messagemode
- the checksum mode
protected java.lang.String handleChecksum(java.lang.StringBuffer sb)
sb
- the string buffer containing the message
public void generateBarcodeLogic(ClassicBarcodeLogicHandler logic, java.lang.String msg)
logic
- the logic handler to receive generated eventsmsg
- the message to encode
|
barcode4j 2.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |