@Test public void addStyles() { DataCell cell = new DataCell("", 0, 0); List<StyleOption> styleList = new LinkedList<>(); styleList.add(StyleOption.HEADER); styleList.add(StyleOption.HEADER); cell.addStyle(StyleOption.FEATURE_SEPARATOR); cell.addStyle(StyleOption.FEATURE_SEPARATOR); Assert.assertTrue(cell.getStyles().size() == 1); cell.addStyles(styleList); Assert.assertTrue(cell.getStyles().size() == 2); }
public void addStyles(Collection<StyleOption> styles) { if (styles == null) { return; } if (this.styles == null) { this.styles = new HashSet<>(); } this.styles.addAll(styles); if (this.generated != null) { for (DataCell child : this.generated) { child.addStyles(styles); } } }
DataCell { public void addStyles(Collection<StyleOption> styles) { if (styles == null) { return; } if (this.styles == null) { this.styles = new HashSet<>(); } this.styles.addAll(styles); if (this.generated != null) { for (DataCell child : this.generated) { child.addStyles(styles); } } } }
DataCell { public void addStyles(Collection<StyleOption> styles) { if (styles == null) { return; } if (this.styles == null) { this.styles = new HashSet<>(); } this.styles.addAll(styles); if (this.generated != null) { for (DataCell child : this.generated) { child.addStyles(styles); } } } DataCell(String value, Integer x, Integer y);  DataCell(String value, Integer x, Integer y, StyleOption style); }
DataCell { public void addStyles(Collection<StyleOption> styles) { if (styles == null) { return; } if (this.styles == null) { this.styles = new HashSet<>(); } this.styles.addAll(styles); if (this.generated != null) { for (DataCell child : this.generated) { child.addStyles(styles); } } } 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 void addStyles(Collection<StyleOption> styles) { if (styles == null) { return; } if (this.styles == null) { this.styles = new HashSet<>(); } this.styles.addAll(styles); if (this.generated != null) { for (DataCell child : this.generated) { child.addStyles(styles); } } } 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();  }