Class DefaultPlacement


  • public class DefaultPlacement
    extends java.lang.Object
    Symbol Character Placement Program. Adapted from Annex M.1 in ISO/IEC 16022:2000(E).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private byte[] bits  
      private java.lang.CharSequence codewords  
      private int numcols  
      private int numrows  
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultPlacement​(java.lang.CharSequence codewords, int numcols, int numrows)
      Main constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void corner1​(int pos)  
      private void corner2​(int pos)  
      private void corner3​(int pos)  
      private void corner4​(int pos)  
      boolean getBit​(int col, int row)  
      (package private) byte[] getBits()  
      (package private) int getNumcols()  
      (package private) int getNumrows()  
      private void module​(int row, int col, int pos, int bit)  
      private boolean noBit​(int col, int row)  
      void place()  
      private void setBit​(int col, int row, boolean bit)  
      private void utah​(int row, int col, int pos)
      Places the 8 bits of a utah-shaped symbol character in ECC200.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • codewords

        private final java.lang.CharSequence codewords
      • numrows

        private final int numrows
      • numcols

        private final int numcols
      • bits

        private final byte[] bits
    • Constructor Detail

      • DefaultPlacement

        public DefaultPlacement​(java.lang.CharSequence codewords,
                                int numcols,
                                int numrows)
        Main constructor
        Parameters:
        codewords - the codewords to place
        numcols - the number of columns
        numrows - the number of rows
    • Method Detail

      • getNumrows

        final int getNumrows()
      • getNumcols

        final int getNumcols()
      • getBits

        final byte[] getBits()
      • getBit

        public final boolean getBit​(int col,
                                    int row)
      • setBit

        private void setBit​(int col,
                            int row,
                            boolean bit)
      • noBit

        private boolean noBit​(int col,
                              int row)
      • place

        public final void place()
      • module

        private void module​(int row,
                            int col,
                            int pos,
                            int bit)
      • utah

        private void utah​(int row,
                          int col,
                          int pos)
        Places the 8 bits of a utah-shaped symbol character in ECC200.
        Parameters:
        row - the row
        col - the column
        pos - character position
      • corner1

        private void corner1​(int pos)
      • corner2

        private void corner2​(int pos)
      • corner3

        private void corner3​(int pos)
      • corner4

        private void corner4​(int pos)