Remove getBits()
[zxing.git] / core / src / com / google / zxing / common / BitMatrix.java
index 74e452d..5440787 100755 (executable)
@@ -71,6 +71,17 @@ public final class BitMatrix {
     bits[offset >> 5] |= 1 << (offset & 0x1F);\r
   }\r
 \r
+  /**\r
+   * <p>Flips the given bit.</p>\r
+   *\r
+   * @param i row offset\r
+   * @param j column offset\r
+   */\r
+  public void flip(int i, int j) {\r
+    int offset = i + dimension * j;\r
+    bits[offset >> 5] ^= 1 << (offset & 0x1F);\r
+  }\r
+\r
   /**\r
    * <p>Sets a square region of the bit matrix to true.</p>\r
    *\r
@@ -108,13 +119,6 @@ public final class BitMatrix {
     return dimension;\r
   }\r
 \r
-  /**\r
-   * @return array of ints holding internal representation of this matrix's bits\r
-   */\r
-  public int[] getBits() {\r
-    return bits;\r
-  }\r
-\r
   public String toString() {\r
     StringBuffer result = new StringBuffer(dimension * (dimension + 1));\r
     for (int i = 0; i < dimension; i++) {\r