| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (19) --> |
| <title>TableAppender (Apache SIS 1.3 API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: package: org.apache.sis.io, class: TableAppender"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.io.TableAppender class"> |
| <meta name="keywords" content="ALIGN_LEFT"> |
| <meta name="keywords" content="ALIGN_CENTER"> |
| <meta name="keywords" content="ALIGN_RIGHT"> |
| <meta name="keywords" content="isMultiLinesCells()"> |
| <meta name="keywords" content="setMultiLinesCells()"> |
| <meta name="keywords" content="getCellAlignment()"> |
| <meta name="keywords" content="setCellAlignment()"> |
| <meta name="keywords" content="getLineSeparator()"> |
| <meta name="keywords" content="getRowCount()"> |
| <meta name="keywords" content="getColumnCount()"> |
| <meta name="keywords" content="append()"> |
| <meta name="keywords" content="appendHorizontalSeparator()"> |
| <meta name="keywords" content="nextColumn()"> |
| <meta name="keywords" content="nextLine()"> |
| <meta name="keywords" content="flush()"> |
| <meta name="keywords" content="toString()"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../sis.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jquery-3.6.0.min.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var pathtoroot = "../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span></button> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="class-use/TableAppender.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| <ul class="sub-nav-list-small"> |
| <li> |
| <p>Summary:</p> |
| <ul> |
| <li>Nested</li> |
| <li><a href="#field-summary">Field</a></li> |
| <li><a href="#constructor-summary">Constr</a></li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| </li> |
| <li> |
| <p>Detail:</p> |
| <ul> |
| <li><a href="#field-detail">Field</a></li> |
| <li><a href="#constructor-detail">Constr</a></li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div id="navbar-sub-list"> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field-summary">Field</a> | </li> |
| <li><a href="#constructor-summary">Constr</a> | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li><a href="#field-detail">Field</a> | </li> |
| <li><a href="#constructor-detail">Constr</a> | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><a href="../../../../search.html">SEARCH</a> |
| <input type="text" id="search-input" disabled placeholder="Search"> |
| <input type="reset" id="reset-button" disabled value="reset"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.sis.io</a></div> |
| <h1 title="Class TableAppender" class="title">Class TableAppender</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> |
| <div class="inheritance">TableAppender</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/Flushable.html" title="class or interface in java.io" class="external-link">Flushable</a></code>, <code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html" title="class or interface in java.lang" class="external-link">Appendable</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">TableAppender</span> |
| <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> |
| implements <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/Flushable.html" title="class or interface in java.io" class="external-link">Flushable</a></span></div> |
| <div class="block">An <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html" title="class or interface in java.lang" class="external-link"><code>Appendable</code></a> which formats the text as a table suitable for displaying in devices using |
| a monospaced font. Columns are separated by tabulations (<code>'\t'</code>) and rows are separated by |
| <a href="../util/Characters.html#isLineOrParagraphSeparator(int)">line or paragraph separators</a>. |
| The content of every table cells are stored in memory until the <a href="#flush()"><code>flush()</code></a> method is invoked. |
| When invoked, <code>flush()</code> copies the cell contents to the <a href="#out">underlying stream |
| or buffer</a> while replacing tabulations by some amount of spaces and drawing borders. |
| The exact number of spaces is computed from the cell widths. |
| |
| <p>For example, the following code:</p> |
| |
| <blockquote><pre>TableAppender table = <font color="green">new</font> <b>TableAppender</b>(System.out); |
| table.<b>nextLine</b>(<font color="orangered">'═'</font>); |
| table.<b>append</b>(<font color="orangered">"English\tFrench\tr.e.d.\n"</font>); |
| table.<b>nextLine</b>(<font color="orangered">'-'</font>); |
| table.<b>append</b>(<font color="orangered">"Mercury\tMercure\t0.382\n"</font>) |
| .<b>append</b>(<font color="orangered">"Venus\tVénus\t0.949\n"</font>) |
| .<b>append</b>(<font color="orangered">"Earth\tTerre\t1.00\n"</font>) |
| .<b>append</b>(<font color="orangered">"Mars\tMars\t0.532\n"</font>); |
| table.<b>nextLine</b>(<font color="orangered">'═'</font>); |
| table.<b>flush</b>();</pre></blockquote> |
| |
| produces the following output: |
| |
| <blockquote><pre>╔═════════╤═════════╤════════╗ |
| ║ English │ French │ r.e.d. ║ |
| ╟─────────┼─────────┼────────╢ |
| ║ Mercury │ Mercure │ 0.382 ║ |
| ║ Venus │ Vénus │ 0.949 ║ |
| ║ Earth │ Terre │ 1.00 ║ |
| ║ Mars │ Mars │ 0.532 ║ |
| ╚═════════╧═════════╧════════╝</pre></blockquote></div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>0.3</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="../util/collection/TreeTableFormat.html" title="class in org.apache.sis.util.collection"><code>TreeTableFormat</code></a></li> |
| </ul> |
| </dd> |
| |
| <p><font size="-1">Defined in the <code>sis-utility</code> module</font></p> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <li> |
| <section class="field-summary" id="field-summary"> |
| <h2>Field Summary</h2> |
| <div class="caption"><span>Fields</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Field</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>static final byte</code></div> |
| <div class="col-second even-row-color"><code><a href="#ALIGN_CENTER" class="member-name-link">ALIGN_CENTER</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">A possible value for cell alignment.</div> |
| </div> |
| <div class="col-first odd-row-color"><code>static final byte</code></div> |
| <div class="col-second odd-row-color"><code><a href="#ALIGN_LEFT" class="member-name-link">ALIGN_LEFT</a></code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">A possible value for cell alignment.</div> |
| </div> |
| <div class="col-first even-row-color"><code>static final byte</code></div> |
| <div class="col-second even-row-color"><code><a href="#ALIGN_RIGHT" class="member-name-link">ALIGN_RIGHT</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">A possible value for cell alignment.</div> |
| </div> |
| <div class="col-first odd-row-color"><code>protected final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html" title="class or interface in java.lang" class="external-link">Appendable</a></code></div> |
| <div class="col-second odd-row-color"><code><a href="#out" class="member-name-link">out</a></code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">The underlying character output stream or buffer.</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li> |
| <section class="constructor-summary" id="constructor-summary"> |
| <h2>Constructor Summary</h2> |
| <div class="caption"><span>Constructors</span></div> |
| <div class="summary-table two-column-summary"> |
| <div class="table-header col-first">Constructor</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">TableAppender</a>()</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Creates a new table formatter writing in an internal buffer with a default column separator.</div> |
| </div> |
| <div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(java.lang.Appendable)" class="member-name-link">TableAppender</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html" title="class or interface in java.lang" class="external-link">Appendable</a> out)</code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Creates a new table formatter writing in the given output with a default column separator.</div> |
| </div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(java.lang.Appendable,java.lang.String)" class="member-name-link">TableAppender</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html" title="class or interface in java.lang" class="external-link">Appendable</a> out, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> separator)</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Creates a new table formatter writing in the given output with the specified column separator.</div> |
| </div> |
| <div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(java.lang.Appendable,java.lang.String,java.lang.String,java.lang.String)" class="member-name-link">TableAppender</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html" title="class or interface in java.lang" class="external-link">Appendable</a> out, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> leftBorder, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> separator, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> rightBorder)</code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Creates a new table formatter writing in the given output with the specified column separator and border.</div> |
| </div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(java.lang.String)" class="member-name-link">TableAppender</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> separator)</code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Creates a new table formatter writing in an internal buffer with the specified column separator.</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="TableAppender.html" title="class in org.apache.sis.io">TableAppender</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#append(char)" class="member-name-link">append</a><wbr>(char c)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Writes a single character.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="TableAppender.html" title="class in org.apache.sis.io">TableAppender</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#append(java.lang.CharSequence)" class="member-name-link">append</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> sequence)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Appends the specified character sequence.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="TableAppender.html" title="class in org.apache.sis.io">TableAppender</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#append(java.lang.CharSequence,int,int)" class="member-name-link">append</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> sequence, |
| int start, |
| int end)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Writes a portion of a character sequence.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#appendHorizontalSeparator()" class="member-name-link">appendHorizontalSeparator</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Writes an horizontal separator using the <code>'─'</code> character.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#flush()" class="member-name-link">flush</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Flushes the table content to the underlying stream or buffer.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>byte</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getCellAlignment()" class="member-name-link">getCellAlignment</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the alignment of the text inside the current cell.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getColumnCount()" class="member-name-link">getColumnCount</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the number of columns in this table.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getLineSeparator()" class="member-name-link">getLineSeparator</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the line separator between table rows.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRowCount()" class="member-name-link">getRowCount</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the number of rows in this table.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isMultiLinesCells()" class="member-name-link">isMultiLinesCells</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns <code>true</code> if EOL characters are used for line feeds inside current cells.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#nextColumn()" class="member-name-link">nextColumn</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Moves one column to the right.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#nextColumn(char)" class="member-name-link">nextColumn</a><wbr>(char fill)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Moves one column to the right, filling remaining space with the given character.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#nextLine()" class="member-name-link">nextLine</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Moves to the first column on the next row.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#nextLine(char)" class="member-name-link">nextLine</a><wbr>(char fill)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Moves to the first column on the next row, filling every remaining cell in the current |
| row with the specified character.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setCellAlignment(byte)" class="member-name-link">setCellAlignment</a><wbr>(byte alignment)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets the alignment of the text inside the current cell.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setMultiLinesCells(boolean)" class="member-name-link">setMultiLinesCells</a><wbr>(boolean multiLines)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Sets the desired behavior for EOL and tabulations characters.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">toString</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the content of this <code>TableAppender</code> as a string if possible.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-Object">Methods inherited from class <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <li> |
| <section class="field-details" id="field-detail"> |
| <h2>Field Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="ALIGN_LEFT"> |
| <h3>ALIGN_LEFT</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type">byte</span> <span class="element-name">ALIGN_LEFT</span></div> |
| <div class="block">A possible value for cell alignment. This specifies that the text is aligned |
| to the left indent and extra whitespace should be placed on the right.</div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="../../../../constant-values.html#org.apache.sis.io.TableAppender.ALIGN_LEFT">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="ALIGN_CENTER"> |
| <h3>ALIGN_CENTER</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type">byte</span> <span class="element-name">ALIGN_CENTER</span></div> |
| <div class="block">A possible value for cell alignment. This specifies that the text is aligned |
| to the center and extra whitespace should be placed equally on the left and right.</div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="../../../../constant-values.html#org.apache.sis.io.TableAppender.ALIGN_CENTER">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="ALIGN_RIGHT"> |
| <h3>ALIGN_RIGHT</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type">byte</span> <span class="element-name">ALIGN_RIGHT</span></div> |
| <div class="block">A possible value for cell alignment. This specifies that the text is aligned |
| to the right indent and extra whitespace should be placed on the left.</div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="../../../../constant-values.html#org.apache.sis.io.TableAppender.ALIGN_RIGHT">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="out"> |
| <h3>out</h3> |
| <div class="member-signature"><span class="modifiers">protected final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html" title="class or interface in java.lang" class="external-link">Appendable</a></span> <span class="element-name">out</span></div> |
| <div class="block">The underlying character output stream or buffer.</div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li> |
| <section class="constructor-details" id="constructor-detail"> |
| <h2>Constructor Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="<init>()"> |
| <h3>TableAppender</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">TableAppender</span>()</div> |
| <div class="block">Creates a new table formatter writing in an internal buffer with a default column separator. |
| The default is a vertical double line for the left and right table borders, and a single |
| line between the columns.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(java.lang.String)"> |
| <h3>TableAppender</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">TableAppender</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> separator)</span></div> |
| <div class="block">Creates a new table formatter writing in an internal buffer with the specified column separator.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>separator</code> - string to write between columns.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(java.lang.Appendable)"> |
| <h3>TableAppender</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">TableAppender</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html" title="class or interface in java.lang" class="external-link">Appendable</a> out)</span></div> |
| <div class="block">Creates a new table formatter writing in the given output with a default column separator. |
| The default is a vertical double line for the left and right table borders, and a single |
| line between the columns.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>out</code> - the underlying stream or buffer to write to.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(java.lang.Appendable,java.lang.String)"> |
| <h3>TableAppender</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">TableAppender</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html" title="class or interface in java.lang" class="external-link">Appendable</a> out, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> separator)</span></div> |
| <div class="block">Creates a new table formatter writing in the given output with the specified column separator.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>out</code> - the underlying stream or buffer to write to.</dd> |
| <dd><code>separator</code> - string to write between columns.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(java.lang.Appendable,java.lang.String,java.lang.String,java.lang.String)"> |
| <h3>TableAppender</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">TableAppender</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html" title="class or interface in java.lang" class="external-link">Appendable</a> out, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> leftBorder, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> separator, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> rightBorder)</span></div> |
| <div class="block">Creates a new table formatter writing in the given output with the specified column separator and border.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>out</code> - the underlying stream or buffer to write to.</dd> |
| <dd><code>leftBorder</code> - string to write on the left side of the table.</dd> |
| <dd><code>separator</code> - string to write between columns.</dd> |
| <dd><code>rightBorder</code> - string to write on the right side of the table.</dd> |
| <dt>Since:</dt> |
| <dd>0.8</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="isMultiLinesCells()"> |
| <h3>isMultiLinesCells</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">isMultiLinesCells</span>()</div> |
| <div class="block">Returns <code>true</code> if EOL characters are used for line feeds inside current cells.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd><code>true</code> if EOL characters are to be write inside the cell.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setMultiLinesCells(boolean)"> |
| <h3>setMultiLinesCells</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setMultiLinesCells</span><wbr><span class="parameters">(boolean multiLines)</span></div> |
| <div class="block">Sets the desired behavior for EOL and tabulations characters. |
| |
| <ul> |
| <li>If <code>true</code>, then tabulations, |
| <a href="../util/Characters.html#isLineOrParagraphSeparator(int)">line and paragraph separator</a> characters are copied into the current cell. |
| Subsequent writing operations will continue inside the same cell.</li> |
| <li>If <code>false</code>, then tabulations move to next column and EOL move |
| to the first cell of next row (i.e. tabulation and EOL are equivalent to |
| <a href="#nextColumn()"><code>nextColumn()</code></a> and <a href="#nextLine()"><code>nextLine()</code></a> calls respectively).</li> |
| </ul> |
| |
| The default value is <code>false</code>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>multiLines</code> - <code>true</code> true if EOL are used for line feeds inside current cells, |
| or <code>false</code> if EOL move to the next row.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getCellAlignment()"> |
| <h3>getCellAlignment</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">byte</span> <span class="element-name">getCellAlignment</span>()</div> |
| <div class="block">Returns the alignment of the text inside the current cell. |
| The default value is <a href="#ALIGN_LEFT"><code>ALIGN_LEFT</code></a>.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>current cell alignment as one of the <a href="#ALIGN_LEFT"><code>ALIGN_LEFT</code></a>, |
| <a href="#ALIGN_RIGHT"><code>ALIGN_RIGHT</code></a> or <a href="#ALIGN_CENTER"><code>ALIGN_CENTER</code></a> constants.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setCellAlignment(byte)"> |
| <h3>setCellAlignment</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setCellAlignment</span><wbr><span class="parameters">(byte alignment)</span></div> |
| <div class="block">Sets the alignment of the text inside the current cell. The alignments of any cell |
| written prior this method call are left unchanged. The new alignment will apply to |
| the next cells too until this <code>setCellAlignment(…)</code> method is invoked again |
| with a different value. |
| |
| <p>If this method is never invoked, then the default alignment is <a href="#ALIGN_LEFT"><code>ALIGN_LEFT</code></a>.</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>alignment</code> - the new cell alignment as one of the <a href="#ALIGN_LEFT"><code>ALIGN_LEFT</code></a>, |
| <a href="#ALIGN_RIGHT"><code>ALIGN_RIGHT</code></a> or <a href="#ALIGN_CENTER"><code>ALIGN_CENTER</code></a> constants.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getLineSeparator()"> |
| <h3>getLineSeparator</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">getLineSeparator</span>()</div> |
| <div class="block">Returns the line separator between table rows. This is the first line separator found in the |
| text formatted as a table, or the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/System.html#lineSeparator()" title="class or interface in java.lang" class="external-link">system default</a> if no |
| line separator was found in the text to format.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the line separator between table rows.</dd> |
| <dt>Since:</dt> |
| <dd>1.0</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getRowCount()"> |
| <h3>getRowCount</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getRowCount</span>()</div> |
| <div class="block">Returns the number of rows in this table. This count is reset to 0 by <a href="#flush()"><code>flush()</code></a>.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the number of rows in this table.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getColumnCount()"> |
| <h3>getColumnCount</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getColumnCount</span>()</div> |
| <div class="block">Returns the number of columns in this table.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the number of columns in this table.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="append(char)"> |
| <h3>append</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="TableAppender.html" title="class in org.apache.sis.io">TableAppender</a></span> <span class="element-name">append</span><wbr><span class="parameters">(char c)</span></div> |
| <div class="block">Writes a single character. |
| If <a href="#isMultiLinesCells()"><code>isMultiLinesCells()</code></a> is <code>false</code> (which is the default), then: |
| |
| <ul> |
| <li>Tabulations (<code>'\t'</code>) are replaced by calls to <a href="#nextColumn()"><code>nextColumn()</code></a>.</li> |
| <li><a href="../util/Characters.html#isLineOrParagraphSeparator(int)">line or paragraph separators</a> are replaced by calls to <a href="#nextLine()"><code>nextLine()</code></a>.</li> |
| </ul></div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html#append(char)" title="class or interface in java.lang" class="external-link">append</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html" title="class or interface in java.lang" class="external-link">Appendable</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>c</code> - character to write.</dd> |
| <dt>Returns:</dt> |
| <dd><code>this</code>.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="append(java.lang.CharSequence)"> |
| <h3>append</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="TableAppender.html" title="class in org.apache.sis.io">TableAppender</a></span> <span class="element-name">append</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> sequence)</span></div> |
| <div class="block">Appends the specified character sequence.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html#append(java.lang.CharSequence)" title="class or interface in java.lang" class="external-link">append</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html" title="class or interface in java.lang" class="external-link">Appendable</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>sequence</code> - the character sequence to append, or <code>null</code>.</dd> |
| <dt>Returns:</dt> |
| <dd>a reference to this <code>Appendable</code>.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="append(java.lang.CharSequence,int,int)"> |
| <h3>append</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="TableAppender.html" title="class in org.apache.sis.io">TableAppender</a></span> <span class="element-name">append</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link">CharSequence</a> sequence, |
| int start, |
| int end)</span></div> |
| <div class="block">Writes a portion of a character sequence. Tabulations and line separators are |
| interpreted as by <a href="#append(char)"><code>append(char)</code></a>.</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html#append(java.lang.CharSequence,int,int)" title="class or interface in java.lang" class="external-link">append</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html" title="class or interface in java.lang" class="external-link">Appendable</a></code></dd> |
| <dt>Parameters:</dt> |
| <dd><code>sequence</code> - the character sequence to be written.</dd> |
| <dd><code>start</code> - index from which to start reading characters.</dd> |
| <dd><code>end</code> - index of the character following the last character to read.</dd> |
| <dt>Returns:</dt> |
| <dd><code>this</code>.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="appendHorizontalSeparator()"> |
| <h3>appendHorizontalSeparator</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">appendHorizontalSeparator</span>()</div> |
| <div class="block">Writes an horizontal separator using the <code>'─'</code> character.</div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#nextLine(char)"><code>nextLine(char)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="nextColumn()"> |
| <h3>nextColumn</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">nextColumn</span>()</div> |
| <div class="block">Moves one column to the right. |
| The subsequent writing operations will occur in a new cell on the same row.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="nextColumn(char)"> |
| <h3>nextColumn</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">nextColumn</span><wbr><span class="parameters">(char fill)</span></div> |
| <div class="block">Moves one column to the right, filling remaining space with the given character. |
| The subsequent writing operations will occur in a new cell on the same row. |
| |
| <p>Calling <code>nextColumn('*')</code> from the first character |
| in a cell is a convenient way to put a pad value in this cell.</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>fill</code> - character filling the cell (default to whitespace).</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="nextLine()"> |
| <h3>nextLine</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">nextLine</span>()</div> |
| <div class="block">Moves to the first column on the next row. |
| The subsequent writing operations will occur on a new row.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="nextLine(char)"> |
| <h3>nextLine</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">nextLine</span><wbr><span class="parameters">(char fill)</span></div> |
| <div class="block">Moves to the first column on the next row, filling every remaining cell in the current |
| row with the specified character. The subsequent writing operations will occur on a new |
| row. |
| |
| <p>Calling <code>nextLine('-')</code> or <code>nextLine('═')</code> from the first column of a row |
| is a convenient way to fill this row with a line separator.</p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>fill</code> - character filling the rest of the line (default to whitespace). |
| This character may be use as a row separator.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="#appendHorizontalSeparator()"><code>appendHorizontalSeparator()</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="flush()"> |
| <h3>flush</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">flush</span>() |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Flushes the table content to the underlying stream or buffer. This method should not |
| be called before the table is completed (otherwise, columns may have the wrong width).</div> |
| <dl class="notes"> |
| <dt>Specified by:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/Flushable.html#flush()" title="class or interface in java.io" class="external-link">flush</a></code> in interface <code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/Flushable.html" title="class or interface in java.io" class="external-link">Flushable</a></code></dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - if an output operation failed.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="toString()"> |
| <h3>toString</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name">toString</span>()</div> |
| <div class="block">Returns the content of this <code>TableAppender</code> as a string if possible. |
| |
| <ul> |
| <li>If this <code>TableAppender</code> has been created without explicit <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html" title="class or interface in java.lang" class="external-link"><code>Appendable</code></a>, |
| then this method always returns the current table content formatted as a string.</li> |
| <li>Otherwise, if <a href="#out"><code>out</code></a> implements <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CharSequence.html" title="class or interface in java.lang" class="external-link"><code>CharSequence</code></a> or is directly or |
| indirectly a wrapper around a <code>CharSequence</code>, returns its <code>toString()</code> |
| representation. The string will contain this table content only if <a href="#flush()"><code>flush()</code></a> |
| has been invoked prior this <code>toString()</code> method.</li> |
| <li>Otherwise returns the localized <cite>"Unavailable content"</cite> string.</li> |
| </ul></div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the content of this <code>Appendable</code>, or a localized message for unavailable content.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="IO.html#content(java.lang.Appendable)"><code>IO.content(Appendable)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small>Copyright © 2010–2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |