public class ModuleFactory
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static Module |
CENTRE_GUARD |
static int |
GUARD_CHAR_SIZE |
protected static java.util.List |
KEYS_LEFT |
protected static java.util.List |
KEYS_RIGHT |
static Module |
LEFT_GUARD
The guards for the barcode
|
static Module |
LEFT_MARGIN |
static int |
LEFT_WIDTH |
static Module |
RIGHT_GUARD |
static Module |
RIGHT_MARGIN |
protected static java.util.Map |
SET_LEFT |
protected static java.util.Map |
SET_RIGHT |
限定符 | 构造器和说明 |
---|---|
protected |
ModuleFactory()
Cannot construct.
|
限定符和类型 | 方法和说明 |
---|---|
static Module |
getModule(java.lang.String key,
int position)
Returns the module that represents the specified character.
|
static Module |
getModuleForIndex(int index)
Returns the encoded module at the given index position.
|
static boolean |
hasModule(java.lang.String key)
Indicates whether the given key is represented in the default encoding
table that this module factory contains.
|
protected static void |
initBaseSet()
Initialise the module definitions.
|
protected static void |
initLeftSet() |
protected static void |
initRightSet() |
static boolean |
isValid(java.lang.String key)
Indicates whether the given character is valid for this barcode or not.
|
public static final Module LEFT_GUARD
public static final Module CENTRE_GUARD
public static final Module RIGHT_GUARD
public static final Module LEFT_MARGIN
public static final Module RIGHT_MARGIN
protected static final java.util.List KEYS_LEFT
protected static final java.util.List KEYS_RIGHT
protected static final java.util.Map SET_LEFT
protected static final java.util.Map SET_RIGHT
public static final int LEFT_WIDTH
public static final int GUARD_CHAR_SIZE
protected static void initBaseSet()
protected static void initRightSet()
protected static void initLeftSet()
public static Module getModule(java.lang.String key, int position)
key
- The data character to get the encoding module forposition
- The position of the data character, starts at 0public static boolean hasModule(java.lang.String key)
public static Module getModuleForIndex(int index)
index
- The index of the module requiredpublic static boolean isValid(java.lang.String key)
key
- The key to check for validity