/** * Renders an {@link AsciiTable}. * @param rows table rows to render, cannot be null * @param colNumbers number of columns in the table * @param ctx context of the original table with relevant settings, cannot be null * @return a single string with the rendered table * @throws {@link NullPointerException} if rows or context where null */ default String render(LinkedList<AT_Row> rows, int colNumbers, AT_Context ctx){ Validate.notNull(rows); Validate.notNull(ctx); return this.render(rows, colNumbers, ctx, ctx.getWidth()); }
/** * Renders an {@link AsciiTable}. * @param rows table rows to render, cannot be null * @param colNumbers number of columns in the table * @param ctx context of the original table with relevant settings, cannot be null * @return a single string with the rendered table * @throws {@link NullPointerException} if rows or context where null */ default String render(LinkedList<AT_Row> rows, int colNumbers, AT_Context ctx){ Validate.notNull(rows); Validate.notNull(ctx); return this.render(rows, colNumbers, ctx, ctx.getWidth()); }
@Override public String render(){ return this.renderer.render(this.getRawContent(), this.getColNumber(), this.ctx); // return new StrBuilder().appendWithSeparators(this.renderer.render(this.getRawContent(), this.getColNumber(), this.ctx), "\n").toString(); }
@Override public String render(){ return this.renderer.render(this.getRawContent(), this.getColNumber(), this.ctx); // return new StrBuilder().appendWithSeparators(this.renderer.render(this.getRawContent(), this.getColNumber(), this.ctx), "\n").toString(); }
@Override public String render(int width){ return this.renderer.render(this.getRawContent(), this.getColNumber(), this.ctx, width); // return new StrBuilder().appendWithSeparators(this.renderer.render(this.getRawContent(), this.getColNumber(), this.ctx, this.ctx.getTextWidth(width)), "\n").toString(); }
@Override public String render(int width){ return this.renderer.render(this.getRawContent(), this.getColNumber(), this.ctx, width); // return new StrBuilder().appendWithSeparators(this.renderer.render(this.getRawContent(), this.getColNumber(), this.ctx, this.ctx.getTextWidth(width)), "\n").toString(); }