/** * Creates a new row with content with given cell context and a normal row style. * @param content the content for the row, each member of the array represents the content for a cell in the row, must not be null but can contain null members * @return a new row with content * @throws {@link NullPointerException} if content was null */ public static AT_Row createContentRow(Object[] content, TableRowStyle style){ Validate.notNull(content); Validate.notNull(style); Validate.validState(style!=TableRowStyle.UNKNOWN); LinkedList<AT_Cell> cells = new LinkedList<AT_Cell>(); for(Object o : content){ cells.add(new AT_Cell(o)); } return new AT_Row(){ @Override public TableRowType getType(){ return TableRowType.CONTENT; } @Override public TableRowStyle getStyle(){ return style; } @Override public LinkedList<AT_Cell> getCells(){ return cells; } }; }
/** * Creates a new row with content with given cell context and a normal row style. * @param content the content for the row, each member of the array represents the content for a cell in the row, must not be null but can contain null members * @return a new row with content * @throws {@link NullPointerException} if content was null */ public static AT_Row createContentRow(Object[] content, TableRowStyle style){ Validate.notNull(content); Validate.notNull(style); Validate.validState(style!=TableRowStyle.UNKNOWN); LinkedList<AT_Cell> cells = new LinkedList<AT_Cell>(); for(Object o : content){ cells.add(new AT_Cell(o)); } return new AT_Row(){ @Override public TableRowType getType(){ return TableRowType.CONTENT; } @Override public TableRowStyle getStyle(){ return style; } @Override public LinkedList<AT_Cell> getCells(){ return cells; } }; }