Ejemplo n.º 1
0
 public int getNumBlocks() {
   int total = 0;
   for (ECB ecBlock : ecBlocks) {
     total += ecBlock.getCount();
   }
   return total;
 }
Ejemplo n.º 2
0
 private Version(int versionNumber, int[] alignmentPatternCenters, ECBlocks... ecBlocks) {
   this.versionNumber = versionNumber;
   this.alignmentPatternCenters = alignmentPatternCenters;
   this.ecBlocks = ecBlocks;
   int total = 0;
   int ecCodewords = ecBlocks[0].getECCodewordsPerBlock();
   ECB[] ecbArray = ecBlocks[0].getECBlocks();
   for (ECB ecBlock : ecbArray) {
     total += ecBlock.getCount() * (ecBlock.getDataCodewords() + ecCodewords);
   }
   this.totalCodewords = total;
 }