@Test public void empty() throws Exception { (new DataSection()).finalizeToMatrix(); }
public void finalizeToMatrix() throws Exception { if (this.maxX == null || this.maxY == null) { throw new Exception("The maximum values should be initialized"); } this.matrixX = this.maxX + 1; this.matrixY = this.maxY + 1; this.matrix = new DataCell[this.matrixX][this.matrixY]; for (DataCell cell : this.cellList) { this.matrix[cell.getX()][cell.getY()] = cell; for (DataCell emptyCell : cell.generateMergedCells()) { this.matrix[emptyCell.getX()][emptyCell.getY()] = emptyCell; } } }
DataSection { public void finalizeToMatrix() throws Exception { if (this.maxX == null || this.maxY == null) { throw new Exception("The maximum values should be initialized"); } this.matrixX = this.maxX + 1; this.matrixY = this.maxY + 1; this.matrix = new DataCell[this.matrixX][this.matrixY]; for (DataCell cell : this.cellList) { this.matrix[cell.getX()][cell.getY()] = cell; for (DataCell emptyCell : cell.generateMergedCells()) { this.matrix[emptyCell.getX()][emptyCell.getY()] = emptyCell; } } } }
DataSection { public void finalizeToMatrix() throws Exception { if (this.maxX == null || this.maxY == null) { throw new Exception("The maximum values should be initialized"); } this.matrixX = this.maxX + 1; this.matrixY = this.maxY + 1; this.matrix = new DataCell[this.matrixX][this.matrixY]; for (DataCell cell : this.cellList) { this.matrix[cell.getX()][cell.getY()] = cell; for (DataCell emptyCell : cell.generateMergedCells()) { this.matrix[emptyCell.getX()][emptyCell.getY()] = emptyCell; } } }  }
DataSection { public void finalizeToMatrix() throws Exception { if (this.maxX == null || this.maxY == null) { throw new Exception("The maximum values should be initialized"); } this.matrixX = this.maxX + 1; this.matrixY = this.maxY + 1; this.matrix = new DataCell[this.matrixX][this.matrixY]; for (DataCell cell : this.cellList) { this.matrix[cell.getX()][cell.getY()] = cell; for (DataCell emptyCell : cell.generateMergedCells()) { this.matrix[emptyCell.getX()][emptyCell.getY()] = emptyCell; } } }  void addCell(DataCell cell); void finalizeToMatrix(); void mergeX(); Set<DataCell> getCellList(); DataCell[][] getMatrix(); Integer getMaxX(); Integer getMaxY(); }
DataSection { public void finalizeToMatrix() throws Exception { if (this.maxX == null || this.maxY == null) { throw new Exception("The maximum values should be initialized"); } this.matrixX = this.maxX + 1; this.matrixY = this.maxY + 1; this.matrix = new DataCell[this.matrixX][this.matrixY]; for (DataCell cell : this.cellList) { this.matrix[cell.getX()][cell.getY()] = cell; for (DataCell emptyCell : cell.generateMergedCells()) { this.matrix[emptyCell.getX()][emptyCell.getY()] = emptyCell; } } }  void addCell(DataCell cell); void finalizeToMatrix(); void mergeX(); Set<DataCell> getCellList(); DataCell[][] getMatrix(); Integer getMaxX(); Integer getMaxY();  }