Modifier and Type | Class and Description |
---|---|
static class |
GenerationConfig.Builder
This class is a Builder to build a
RandomConfig
programmatically. |
Constructor and Description |
---|
GenerationConfig(int size,
EncodingConfig encoding,
List<CodeConfig> codes,
List<EncodingConfig> encodings)
Create a new
GenerationConfig with the given random size (in bits) or source encoding, barcode formats
and additional representations. |
Modifier and Type | Method and Description |
---|---|
static GenerationConfig.Builder |
builder()
Return a
Builder that can be used to build a
config. |
List<CodeConfig> |
getCodes()
Return the configurations of the barcodes to create.
|
EncodingConfig |
getEncoding()
Return the encoding of the predefined values.
|
List<EncodingConfig> |
getEncodings()
Return the configurations of the additional encoding of the random number to create.
|
int |
getSize()
Return the size of the random number to be created.
|
public GenerationConfig(int size, EncodingConfig encoding, List<CodeConfig> codes, List<EncodingConfig> encodings)
Create a new GenerationConfig
with the given random size (in bits) or source encoding, barcode formats
and additional representations. If the encoding is set the random size is ignored.
This constructor is annotated so that a YAML or JSON parsed with jackson fasterxml can create an instance directly.
size
- the size of the random number generated (must be positive and a multiple of 8).encoding
- the encoding of the predefined codes.codes
- the configuration of the barcodes generated.encodings
- the configuration of the additional encodings generated.IllegalArgumentException
- if size
is either negative or not a multiple of 8, or code
and
encodings
is both null
.public int getSize()
Return the size of the random number to be created.
public EncodingConfig getEncoding()
Return the encoding of the predefined values.
public List<CodeConfig> getCodes()
Return the configurations of the barcodes to create.
public List<EncodingConfig> getEncodings()
Return the configurations of the additional encoding of the random number to create.
public static GenerationConfig.Builder builder()
Return a Builder
that can be used to build a
config.
Builder
.Copyright © 2020 sw4j.org. All rights reserved.