Checking the neighbor of the current cell
return Math.abs(c.getRow   () - getRow   ()) +
       Math.abs(c.getColumn() - getColumn()) == 1;


You want to be in the same row and one column apart, or in the same column and one row apart. Computing the absolute value of the difference in row and column numbers tells you how far apart the cells are irrespective of orientation. For horizontal and vertical neighbors these must add up to 1; that is, one of them must be 1 and the other must be 0.