app/src/main/java/sudoku/Solver.java
private void assertMatrixIsWithinBounds(int[][] nbrs) {
        int rows = nbrs.length;
        int cols = nbrs[0] != null ? nbrs[0].length : 0;
        if (rows != cols) {  // must be quadratic
            throw new IllegalArgumentException();
        } else {
            assertIsWithinBounds(rows, cols);
        }
    }
/**
     * Asserts that the matrix nbrs is quadratic and within bounds. 
     * 
     * @param nbrs
     *        the matrix
     * @throws IllegalArgumentException
     *        if the matrix is not quadric or if the delegated method call
     *        throws IllegalArgumentException 
     */
Asserts that the matrix nbrs is quadratic and within bounds.

@param nbrs
the matrix
@throws IllegalArgumentException
if the matrix is not quadric or if the delegated method call
throws IllegalArgumentException
Asserts that the matrix nbrs is quadratic and within bounds . @param nbrs the matrix @throws IllegalArgumentException if the matrix is not quadric or if the delegated method call throws IllegalArgumentException
private void assertMatrixIsWithinBounds(int[][] nbrs) {
        int rows = nbrs.length;
        int cols = nbrs[0] != null ? nbrs[0].length : 0;
        if (rows != cols) {  
            throw new IllegalArgumentException();
        } else {
            assertIsWithinBounds(rows, cols);
        }
    }
private void assertMatrixIsWithinBounds ( int [ ] [ ] nbrs ) { int rows = nbrs . length ; int cols = nbrs [ 0 ] != null ? nbrs [ 0 ] . length : 0 ; if ( rows != cols ) { throw new IllegalArgumentException ( ) ; } else { assertIsWithinBounds ( rows , cols ) ; } }
Asserts that the matrix nbrs is quadratic and within bounds.
Asserts that the matrix nbrs is quadratic and within bounds .
// must be quadratic