java.lang.Object
com.google.zxing.qrcode.decoder.Version.ECBlocks
- Enclosing class:
Version
Encapsulates a set of error-correction blocks in one symbol version. Most versions will use blocks of differing sizes within one version, so, this encapsulates the parameters for each set of blocks. It also holds the number of error-correction codewords per block since it will be the same across all blocks within one version.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Version.ECB[]The block counts, by block type.private final intError correction codewords per block.Constructor Summary
ConstructorsConstructorDescriptionECBlocks(int ecCodewordsPerBlock, Version.ECB... ecBlocks) Creates the block layout for one error correction level of this version.Method Summary
All MethodsModifier and TypeMethodDescriptionGets the EC block groups.intGets the EC codewords per block.intGets the number of blocks across all groups.intGets the total EC codewords across every block.
Field Details
ecCodewordsPerBlock
private final int ecCodewordsPerBlockError correction codewords per block.ecBlocks
The block counts, by block type.
Constructor Details
ECBlocks
ECBlocks(int ecCodewordsPerBlock, Version.ECB... ecBlocks) Creates the block layout for one error correction level of this version.- Parameters:
ecCodewordsPerBlock- EC codewords per blockecBlocks- the groups of equal-sized blocks this version splits its codewords into
Method Details
getECCodewordsPerBlock
public int getECCodewordsPerBlock()Gets the EC codewords per block.- Returns:
- the e c codewords per block
getNumBlocks
public int getNumBlocks()Gets the number of blocks across all groups.- Returns:
- the num blocks
getTotalECCodewords
public int getTotalECCodewords()Gets the total EC codewords across every block.- Returns:
- the total e c codewords
getECBlocks