Constructor. Called internally by PrefixManager.gtinCreator; should not be called by other code.
Prefix manager.
GTIN type.
Get the tweak for sparse creation.
Set the tweak for sparse creation.
Static
zeroStatic
convertStatic
normalizeNormalize a GTIN of any length.
GTIN.
Normalized GTIN.
Static
zeroStatic
validateValidate any GTIN, optionally against a level.
GTIN.
Level at which GTIN is to be validated.
Static
validateGTIN14Protected
Static
validatorGet the character set validator for a character set.
Character set.
Character set validator.
Protected
Static
padPad an identification key on the left with zeroes for validation purposes. This is done to align an identification key with a position offset for any error message that may be thrown by the reference validator.
Identification key.
Identification key validation parameters.
Padded identification key.
Create a GTIN-14 with an indicator digit and a reference based on a numeric value. The value is converted to a
reference of the appropriate length using NUMERIC_CREATOR
.
Indicator digit.
Numeric value of the reference.
Optional
sparse: booleanIf true, the value is mapped to a sparse sequence resistant to discovery. Default is false.
GTIN-14.
Create multiple GTIN-14s with an indicator digit and references based on numeric values. The values are converted
to references of the appropriate length using NUMERIC_CREATOR
.
The implementation uses CharacterSetCreator.create, so the values are created only as needed.
Indicator digit.
Values.
Optional
sparse: booleanIf true, the values are mapped to a sparse sequence resistant to discovery. Default is false.
Iterable iterator over created GTIN-14s.
Protected
validateOptional
validation: IdentificationKeyValidationProtected
initInitialize the prefix manager. This method is in lieu of a constructor due to the mixin architecture.
Prefix manager.
Prefix within prefix manager to use to calculate reference length.
Optional
sparse: booleanOptional
sparse: boolean
GTIN creator. Applicable to GTIN-13, GTIN-12, and GTIN-8 types; no applicable to GTIN-14 type.