ModuleFactory (Barbecue 1.0.6d API)
Keywords: net.sourceforge.barbecue.linear.code128.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.code128
Class ModuleFactory

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

public final class ModuleFactory
extends java.lang.Object

Code 128 barcode module definitions.

Author:
  Ian Bourke

Method Summary
`static int` | `getIndex(java.lang.String key, int mode)` Returns the index of the given character in the encoding tables.
`static Module` | `getModule(java.lang.String key, int mode)` Returns the module that represents the specified character and character set.
`static Module` | `getModuleForIndex(int index, int mode)` Returns the encoded module at the given index position.

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

Method Detail

### getModule

    public static Module getModule(java.lang.String key,
                                   int mode)

  Returns the module that represents the specified character and character set.

  Parameters:
    `key` - The data character to get the encoding module for
    `mode` - The character set mode that is currently in use (A, B or C)
  Returns:
    The module that encodes the given char in the given character set

### getIndex

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

  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
    `mode` - The character set mode that is currently in use (A, B or C)
  Returns:
    The index for the given key

### getModuleForIndex

    public static Module getModuleForIndex(int index,
                                           int mode)

  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
    `mode` - The character set mode that is currently in use (A, B or C)
  Returns:
    The module at the specified index

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