public class Gtin14Builder extends Object
Constructor and Description |
---|
Gtin14Builder(Dummy4j dummy4j,
ModTenFormula modTenFormula) |
Modifier and Type | Method and Description |
---|---|
String |
build()
Generates a random GTIN
|
protected Gtin14Builder |
self() |
Gtin14Builder |
withApplicationIdentifier()
Adds the application id
(01) to the generated GTIN-14 |
T |
withGs1PrefixRange(Gs1PrefixRange range)
Sets the prefix range for the generated GTIN
|
Gtin14Builder |
withoutApplicationIdentifier()
Removes the application id
(01) from the generated GTIN-14 |
T |
withRandomGs1PrefixRange()
Sets a random prefix range for the generated GTIN.
|
T |
withRandomGs1PrefixRange(Gs1PrefixRange... ranges)
Sets the random prefix range for the generated GTIN to one that is randomly chosen from provided arguments
|
public Gtin14Builder(Dummy4j dummy4j, ModTenFormula modTenFormula)
protected Gtin14Builder self()
public Gtin14Builder withApplicationIdentifier()
(01)
to the generated GTIN-14public Gtin14Builder withoutApplicationIdentifier()
(01)
from the generated GTIN-14public String build()
public T withRandomGs1PrefixRange()
This is the default behavior for this builder.
Gs1PrefixRange
public T withRandomGs1PrefixRange(Gs1PrefixRange... ranges)
Gs1PrefixRange
public T withGs1PrefixRange(Gs1PrefixRange range)
Gs1PrefixRange
Copyright © 2021. All rights reserved.