/** * Creates a new row with content with default 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){ return AT_Row.createContentRow(content, TableRowStyle.NORMAL); }
/** * Creates a new row with content with default 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){ return AT_Row.createContentRow(content, TableRowStyle.NORMAL); }
/** * Adds a content row to the table. * For the first content row added, the number of objects given here determines the number of columns in the table. * For every subsequent content row, the array must have an entry for each column, * i.e. the size of the array must be the same as the result of {@link #getColNumber()}. * @param columns content of the columns for the row, must not be null * @return the created row for further customization * @throws {@link NullPointerException} if columns was null * @throws {@link AsciiTableException} if columns does not have the correct size (more or less entries than columns defined for the table) */ public final AT_Row addRow(Object ...columns) throws NullPointerException, AsciiTableException { AT_Row ret = AT_Row.createContentRow(columns, TableRowStyle.NORMAL); if(this.colNumber==0){ this.colNumber = columns.length; } else{ if(columns.length!=this.colNumber){ throw new AsciiTableException("wrong columns argument", "wrong number of columns, expected " + this.colNumber + " received " + columns.length); } } this.rows.add(ret); return ret; }
/** * Adds a content row to the table. * For the first content row added, the number of objects given here determines the number of columns in the table. * For every subsequent content row, the array must have an entry for each column, * i.e. the size of the array must be the same as the result of {@link #getColNumber()}. * @param columns content of the columns for the row, must not be null * @return the created row for further customization * @throws {@link NullPointerException} if columns was null * @throws {@link AsciiTableException} if columns does not have the correct size (more or less entries than columns defined for the table) */ public final AT_Row addRow(Object ...columns) throws NullPointerException, AsciiTableException { AT_Row ret = AT_Row.createContentRow(columns, TableRowStyle.NORMAL); if(this.colNumber==0){ this.colNumber = columns.length; } else{ if(columns.length!=this.colNumber){ throw new AsciiTableException("wrong columns argument", "wrong number of columns, expected " + this.colNumber + " received " + columns.length); } } this.rows.add(ret); return ret; }