|
barcode4j 2.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.krysalis.barcode4j.impl.fourstate.AbstractFourStateLogicImpl
public abstract class AbstractFourStateLogicImpl
Provides a base class for "four-state" barcodes.
| Constructor Summary | |
|---|---|
AbstractFourStateLogicImpl(ChecksumMode mode)
Main constructor |
|
| Method Summary | |
|---|---|
abstract char |
calcChecksum(java.lang.String msg)
Calculates the checksum for a message to be encoded as an one of the foru-state barcode symbologies. |
protected void |
encodeCodeword(ClassicBarcodeLogicHandler logic,
char c,
java.lang.String codeword)
Encodes a single character. |
protected abstract java.lang.String[] |
encodeHighLevel(java.lang.String msg)
Does the high-level encoding of the message into codewords. |
void |
generateBarcodeLogic(ClassicBarcodeLogicHandler logic,
java.lang.String msg)
Generates the barcode logic |
ChecksumMode |
getChecksumMode()
Returns the currently active checksum mode. |
static boolean |
isIgnoredChar(char c)
Checks if a character is an ignored character (such as a '-' (dash)). |
protected abstract java.lang.String |
normalizeMessage(java.lang.String msg)
Turns the given message into a normalize representation. |
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 AbstractFourStateLogicImpl(ChecksumMode mode)
mode - checksum mode| Method Detail |
|---|
public ChecksumMode getChecksumMode()
public abstract char calcChecksum(java.lang.String msg)
msg - message to calculate the check digit for
public boolean validateChecksum(java.lang.String msg)
msg - message (check digit included)
public static boolean isIgnoredChar(char c)
c - character to check
protected abstract java.lang.String normalizeMessage(java.lang.String msg)
msg - the message
protected abstract java.lang.String[] encodeHighLevel(java.lang.String msg)
msg - the message
protected void encodeCodeword(ClassicBarcodeLogicHandler logic,
char c,
java.lang.String codeword)
logic - the logic handler to receive generated eventsc - the character to encodecodeword - the codeword belonging to the character
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 | |||||||||