ModuleFactory (Barbecue 1.0.6d API)
Keywords: net.sourceforge.barbecue.linear.code39.ModuleFactory class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sourceforge.barbecue.linear.code39
Class ModuleFactory

    java.lang.Object
      net.sourceforge.barbecue.linear.code39.ModuleFactory

public final class ModuleFactory
extends java.lang.Object

The Code 39 barcode module definitions.

Author:
  Ian Bourke

Field Summary
`static Module` | `START_STOP` The start and stop character for the barcode

Method Summary
`static java.lang.String` | `getExtendedCharacter(char c)` Returns the string of characters from the standard encoding table that encode the given extended character set character.
`static int` | `getIndex(java.lang.String key)` Returns the index of the given character in the encoding tables.
`static Module` | `getModule(java.lang.String key)` 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, boolean extendedMode)` Indicates whether the given key is represented in the default encoding table that this module factory contains.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### START_STOP

    public static final Module START_STOP

  The start and stop character for the barcode

Method Detail

### getModule

    public static Module getModule(java.lang.String key)

  Returns the module that represents the specified character.

  Parameters:
    `key` - The data character to get the encoding module for
  Returns:
    The module that encodes the given char

### getIndex

    public static int getIndex(java.lang.String key)

  Returns the index of the given character in the encoding tables. This is used when calculating the checksum.

  Parameters:
    `key` - The data character sequence to get the index for
  Returns:
    The index for the given key

### hasModule

    public static boolean hasModule(java.lang.String key,
                                    boolean extendedMode)

  Indicates whether the given key is represented in the default encoding table that this module factory contains.

  Returns:
    True if the key has a direct module encoding, false if not

### getModuleForIndex

    public static Module getModuleForIndex(int index)

  Returns the encoded module at the given index position. This is used to get the encoded checksum character.

  Parameters:
    `index` - The index to get the module for
  Returns:
    The module at the specified index

### getExtendedCharacter

    public static java.lang.String getExtendedCharacter(char c)

  Returns the string of characters from the standard encoding table that encode the given extended character set character.

  Parameters:
    `c` - The character from the extended ASCII set to encode
  Returns:
    The string of characters from the default Code 39 encoding table that represent the given character

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD