boolean (final GridConstraints constraints, final boolean isRow, final int cellIndex) { final int cell = constraints.getCell(isRow); final int span = constraints.getSpan(isRow); return cell <= cellIndex && cellIndex <= cell + span - 1; }