@Test public void zeroMerge() { DataCell cell = new DataCell("", 0, 0); Assert.assertTrue(cell.generateMergedCells().isEmpty()); }
public Set<DataCell> generateMergedCells() { if (this.mergeX == null) { return Collections.emptySet(); } if (this.generated != null) { return this.generated; } this.generated = new HashSet<>(); for (int gx = 1; gx <= this.mergeX; gx++) { DataCell cell = new DataCell("", this.x + gx, this.getY()); cell.setIsChild(true); cell.addStyles(this.styles); this.generated.add(cell); } return this.generated; }
DataCell { public Set<DataCell> generateMergedCells() { if (this.mergeX == null) { return Collections.emptySet(); } if (this.generated != null) { return this.generated; } this.generated = new HashSet<>(); for (int gx = 1; gx <= this.mergeX; gx++) { DataCell cell = new DataCell("", this.x + gx, this.getY()); cell.setIsChild(true); cell.addStyles(this.styles); this.generated.add(cell); } return this.generated; } }
DataCell { public Set<DataCell> generateMergedCells() { if (this.mergeX == null) { return Collections.emptySet(); } if (this.generated != null) { return this.generated; } this.generated = new HashSet<>(); for (int gx = 1; gx <= this.mergeX; gx++) { DataCell cell = new DataCell("", this.x + gx, this.getY()); cell.setIsChild(true); cell.addStyles(this.styles); this.generated.add(cell); } return this.generated; } DataCell(String value, Integer x, Integer y);  DataCell(String value, Integer x, Integer y, StyleOption style); }
DataCell { public Set<DataCell> generateMergedCells() { if (this.mergeX == null) { return Collections.emptySet(); } if (this.generated != null) { return this.generated; } this.generated = new HashSet<>(); for (int gx = 1; gx <= this.mergeX; gx++) { DataCell cell = new DataCell("", this.x + gx, this.getY()); cell.setIsChild(true); cell.addStyles(this.styles); this.generated.add(cell); } return this.generated; } DataCell(String value, Integer x, Integer y);  DataCell(String value, Integer x, Integer y, StyleOption style); void addStyle(StyleOption style); void addStyles(Collection<StyleOption> styles); void removeStyles(Collection<StyleOption> styles); Integer getX(); Integer getY(); void setX(Integer x); void setY(Integer y); String getValue(); Integer getMergeX(); void addMergeX(); Set<DataCell> generateMergedCells(); Set<StyleOption> getStyles(); Boolean isChild(); void setIsChild(Boolean isChild); void setMultiline(); Integer getNumberOfLines(); }
DataCell { public Set<DataCell> generateMergedCells() { if (this.mergeX == null) { return Collections.emptySet(); } if (this.generated != null) { return this.generated; } this.generated = new HashSet<>(); for (int gx = 1; gx <= this.mergeX; gx++) { DataCell cell = new DataCell("", this.x + gx, this.getY()); cell.setIsChild(true); cell.addStyles(this.styles); this.generated.add(cell); } return this.generated; } DataCell(String value, Integer x, Integer y);  DataCell(String value, Integer x, Integer y, StyleOption style); void addStyle(StyleOption style); void addStyles(Collection<StyleOption> styles); void removeStyles(Collection<StyleOption> styles); Integer getX(); Integer getY(); void setX(Integer x); void setY(Integer y); String getValue(); Integer getMergeX(); void addMergeX(); Set<DataCell> generateMergedCells(); Set<StyleOption> getStyles(); Boolean isChild(); void setIsChild(Boolean isChild); void setMultiline(); Integer getNumberOfLines();  }