blob: 3689e644c19f4561150b8434653fb57d19020209 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (19) -->
<title>DefaultTreeTable.Node (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.util.collection, class: DefaultTreeTable, class: Node">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.util.collection.DefaultTreeTable.Node class">
<meta name="keywords" content="getParent()">
<meta name="keywords" content="isLeaf()">
<meta name="keywords" content="getChildren()">
<meta name="keywords" content="newChild()">
<meta name="keywords" content="getValue()">
<meta name="keywords" content="setValue()">
<meta name="keywords" content="isEditable()">
<meta name="keywords" content="getUserObject()">
<meta name="keywords" content="clone()">
<meta name="keywords" content="equals()">
<meta name="keywords" content="hashCode()">
<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">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</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/DefaultTreeTable.Node.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>Field</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>Field</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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</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>&nbsp;<a href="package-summary.html">org.apache.sis.util.collection</a></div>
<h1 title="Class DefaultTreeTable.Node" class="title">Class DefaultTreeTable.Node</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">Node</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/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></code>, <code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Cloneable.html" title="class or interface in java.lang" class="external-link">Cloneable</a></code>, <code><a href="TreeTable.Node.html" title="interface in org.apache.sis.util.collection">Tree­Table​.Node</a></code></dd>
</dl>
<dl class="notes">
<dt>Enclosing class:</dt>
<dd><code><a href="DefaultTreeTable.html" title="class in org.apache.sis.util.collection">Default­Tree­Table</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public static class </span><span class="element-name type-name-label">DefaultTreeTable.Node</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="TreeTable.Node.html" title="interface in org.apache.sis.util.collection">TreeTable.Node</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Cloneable.html" title="class or interface in java.lang" class="external-link">Cloneable</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></span></div>
<div class="block">A <a href="TreeTable.Node.html" title="interface in org.apache.sis.util.collection"><code>Tree­Table​.Node</code></a> implementation which can store values for a predefined list of columns.
The list of columns is specified by a <a href="TreeTable.html" title="interface in org.apache.sis.util.collection"><code>Tree­Table</code></a>, or inherited from a parent node.
<h2>Note on the parent node</h2>
The value returned by the <a href="#getParent()"><code>get­Parent()</code></a> method is updated automatically when this node
is <em>added to</em> or <em>removed from</em> the <a href="#getChildren()">list of children</a>
of another <code>Node</code> instance - there is no <code>set­Parent(Node)</code> method. Since the parent
is inferred rather than user-specified, it is ignored by the <a href="#clone()"><code>clone()</code></a>,
<a href="#equals(java.lang.Object)"><code>equals(Object)</code></a> and <a href="#hashCode()"><code>hash­Code()</code></a> methods.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>0.3</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="DefaultTreeTable.html" title="class in org.apache.sis.util.collection"><code>Default­Tree­Table</code></a></li>
<li><a href="TableColumn.html" title="class in org.apache.sis.util.collection"><code>Table­Column</code></a></li>
<li><a href="../../../../../serialized-form.html#org.apache.sis.util.collection.DefaultTreeTable.Node">Serialized Form</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">
<!-- ======== 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(java.lang.CharSequence)" class="member-name-link">Node</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">Char­Sequence</a>&nbsp;name)</code></div>
<div class="col-last even-row-color">
<div class="block">Creates a node with a single column for object names (<cite>convenience constructor</cite>).</div>
</div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.apache.sis.util.collection.DefaultTreeTable.Node)" class="member-name-link">Node</a><wbr>(<a href="DefaultTreeTable.Node.html" title="class in org.apache.sis.util.collection">Default­Tree­Table​.Node</a>&nbsp;parent)</code></div>
<div class="col-last odd-row-color">
<div class="block">Creates a new node with the given parent.</div>
</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.apache.sis.util.collection.DefaultTreeTable.Node,int)" class="member-name-link">Node</a><wbr>(<a href="DefaultTreeTable.Node.html" title="class in org.apache.sis.util.collection">Default­Tree­Table​.Node</a>&nbsp;parent,
int&nbsp;index)</code></div>
<div class="col-last even-row-color">
<div class="block">Creates a new node with the given parent.</div>
</div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.apache.sis.util.collection.TreeTable)" class="member-name-link">Node</a><wbr>(<a href="TreeTable.html" title="interface in org.apache.sis.util.collection">Tree­Table</a>&nbsp;table)</code></div>
<div class="col-last odd-row-color">
<div class="block">Creates a new node for the given table.</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="DefaultTreeTable.Node.html" title="class in org.apache.sis.util.collection">Default­Tree­Table​.Node</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#clone()" class="member-name-link">clone</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 a clone of this node without parent.</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="#equals(java.lang.Object)" class="member-name-link">equals</a><wbr>(<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>&nbsp;other)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Compares the given object with this node for <a href="#getValue(org.apache.sis.util.collection.TableColumn)">values</a>
and <a href="#getChildren()">children</a> equality, ignoring the <a href="#getParent()">parent</a>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>final <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="TreeTable.Node.html" title="interface in org.apache.sis.util.collection">Tree­Table​.Node</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getChildren()" class="member-name-link">get­Children</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 children of this node.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>final <a href="TreeTable.Node.html" title="interface in org.apache.sis.util.collection">Tree­Table​.Node</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getParent()" class="member-name-link">get­Parent</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 parent of this node.</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/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getUserObject()" class="member-name-link">get­User­Object</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 user object associated to this node.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>&lt;V&gt;&nbsp;V</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getValue(org.apache.sis.util.collection.TableColumn)" class="member-name-link">get­Value</a><wbr>(<a href="TableColumn.html" title="class in org.apache.sis.util.collection">Table­Column</a>&lt;V&gt;&nbsp;column)</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 value in the given column, or <code>null</code> if none.</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="#hashCode()" class="member-name-link">hash­Code</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 a hash-code value computed from the <a href="#getValue(org.apache.sis.util.collection.TableColumn)">values</a>
and <a href="#getChildren()">children</a>, ignoring the <a href="#getParent()">parent</a>.</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="#isEditable(org.apache.sis.util.collection.TableColumn)" class="member-name-link">is­Editable</a><wbr>(<a href="TableColumn.html" title="class in org.apache.sis.util.collection">Table­Column</a>&lt;?&gt;&nbsp;column)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Determines whether the value in the specified column is editable.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isLeaf()" class="member-name-link">is­Leaf</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 <code>true</code> if this node cannot have any children.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="DefaultTreeTable.Node.html" title="class in org.apache.sis.util.collection">Default­Tree­Table​.Node</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#newChild()" class="member-name-link">new­Child</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds a new child in the <a href="#getChildren()">children list</a>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>&lt;V&gt;&nbsp;void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setValue(org.apache.sis.util.collection.TableColumn,V)" class="member-name-link">set­Value</a><wbr>(<a href="TableColumn.html" title="class in org.apache.sis.util.collection">Table­Column</a>&lt;V&gt;&nbsp;column,
V&nbsp;value)</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 value for the given column.</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="#toString()" class="member-name-link">to­String</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 a string representation of this node for identification in error message or in debugger.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Object">Methods inherited from class&nbsp;<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#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">get­Class</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">notify­All</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">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;(org.apache.sis.util.collection.TreeTable)">
<h3>Node</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">Node</span><wbr><span class="parameters">(<a href="TreeTable.html" title="interface in org.apache.sis.util.collection">TreeTable</a>&nbsp;table)</span></div>
<div class="block">Creates a new node for the given table. The new node will be able to store a value
for each <a href="TreeTable.html#getColumns()">columns</a> defined in the given table.
<p>This method does not set the new node as the root of the given table. If desired, it
is the caller responsibility to <a href="DefaultTreeTable.html#setRoot(org.apache.sis.util.collection.TreeTable.Node)">set the table root
node</a>.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>table</code> - the table for which this node is created.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.apache.sis.util.collection.DefaultTreeTable.Node)">
<h3>Node</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">Node</span><wbr><span class="parameters">(<a href="DefaultTreeTable.Node.html" title="class in org.apache.sis.util.collection">DefaultTreeTable.Node</a>&nbsp;parent)</span></div>
<div class="block">Creates a new node with the given parent. The new node is added at the end of the parent
<a href="#getChildren()">list of children</a>. The new node will be able to store values
for the same columns than the parent node.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>parent</code> - the parent of the new node.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.apache.sis.util.collection.DefaultTreeTable.Node,int)">
<h3>Node</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">Node</span><wbr><span class="parameters">(<a href="DefaultTreeTable.Node.html" title="class in org.apache.sis.util.collection">DefaultTreeTable.Node</a>&nbsp;parent,
int&nbsp;index)</span></div>
<div class="block">Creates a new node with the given parent. The new node is added to the parent
<a href="#getChildren()">list of children</a> at the given index. The new node
will be able to store values for the same columns than the parent node.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>parent</code> - the parent of the new node.</dd>
<dd><code>index</code> - the index where to add the new node in the parent list of children.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(java.lang.CharSequence)">
<h3>Node</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">Node</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>&nbsp;name)</span></div>
<div class="block">Creates a node with a single column for object names (<cite>convenience constructor</cite>).
The node will have the following columns:
<table class="sis">
<caption>Node columns</caption>
<tr><th>Header</th> <th>Type</th> <th>Initial value</th></tr>
<tr><td>"Name"</td> <td><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></td> <td><code>name</code></td></tr>
</table></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - the initial value for the "Name" column (can be <code>null</code>).</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="getParent()">
<h3>getParent</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<span class="return-type"><a href="TreeTable.Node.html" title="interface in org.apache.sis.util.collection">TreeTable.Node</a></span>&nbsp;<span class="element-name">getParent</span>()</div>
<div class="block">Returns the parent of this node. On <code>Node</code> creation, this value may be initially
<code>null</code>. It will be automatically set to a non-null value when this node will be
added as a child of another <code>Node</code> instance.
<p>Note that the parent is intentionally ignored by the <a href="#clone()"><code>clone()</code></a>,
<a href="#equals(java.lang.Object)"><code>equals(Object)</code></a> and <a href="#hashCode()"><code>hash­Code()</code></a> methods.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="TreeTable.Node.html#getParent()">get­Parent</a></code>&nbsp;in interface&nbsp;<code><a href="TreeTable.Node.html" title="interface in org.apache.sis.util.collection">Tree­Table​.Node</a></code></dd>
<dt>Returns:</dt>
<dd>the parent, or <code>null</code> if none.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isLeaf()">
<h3>isLeaf</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isLeaf</span>()</div>
<div class="block">Returns <code>true</code> if this node cannot have any children. The default implementation
unconditionally returns <code>false</code> even if the list of children is empty, because the
list is allowed to grow at any time.
<p>Subclasses can override this method if they can determine which nodes are leaves.
In the current implementation, the return value shall be stable (i.e. a node cannot
alternate between leaf and non-leaf state). However, this restriction may be relaxed
in a future SIS version.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="TreeTable.Node.html#isLeaf()">is­Leaf</a></code>&nbsp;in interface&nbsp;<code><a href="TreeTable.Node.html" title="interface in org.apache.sis.util.collection">Tree­Table​.Node</a></code></dd>
<dt>Returns:</dt>
<dd><code>true</code> if this node cannot have any children.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getChildren()">
<h3>getChildren</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="TreeTable.Node.html" title="interface in org.apache.sis.util.collection">TreeTable.Node</a>&gt;</span>&nbsp;<span class="element-name">getChildren</span>()</div>
<div class="block">Returns the children of this node. For non-leaf nodes, the list is modifiable and will
automatically updates the <a href="#getParent()">parent</a> reference of any <code>Node</code>
instance added to or removed from the list.
<p>For leaf nodes, this method returns an unmodifiable
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Collections.html#emptyList()" title="class or interface in java.util" class="external-link">empty list</a>.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="TreeTable.Node.html#getChildren()">get­Children</a></code>&nbsp;in interface&nbsp;<code><a href="TreeTable.Node.html" title="interface in org.apache.sis.util.collection">Tree­Table​.Node</a></code></dd>
<dt>Returns:</dt>
<dd>the children, or an empty collection if none.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="newChild()">
<h3>newChild</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="DefaultTreeTable.Node.html" title="class in org.apache.sis.util.collection">DefaultTreeTable.Node</a></span>&nbsp;<span class="element-name">newChild</span>()</div>
<div class="block">Adds a new child in the <a href="#getChildren()">children list</a>.
The default implementation first checks that this node is not a leaf,
then delegates to the <code>Node(Node)</code> constructor.
That constructor call has the following implications:
<ul>
<li>The new node inherits the columns of this node, on the assumption that
they are the same set of columns than other children nodes.</li>
<li>The new node is appended at the end of the children list.</li>
</ul>
Subclasses may override this method with different behavior.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="TreeTable.Node.html#newChild()">new­Child</a></code>&nbsp;in interface&nbsp;<code><a href="TreeTable.Node.html" title="interface in org.apache.sis.util.collection">Tree­Table​.Node</a></code></dd>
<dt>Returns:</dt>
<dd>the new child.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link">Unsupported­Operation­Exception</a></code> - if this node <a href="#isLeaf()">is a leaf</a>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getValue(org.apache.sis.util.collection.TableColumn)">
<h3>getValue</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="type-parameters">&lt;V&gt;</span>&nbsp;<span class="return-type">V</span>&nbsp;<span class="element-name">getValue</span><wbr><span class="parameters">(<a href="TableColumn.html" title="class in org.apache.sis.util.collection">TableColumn</a>&lt;V&gt;&nbsp;column)</span></div>
<div class="block">Returns the value in the given column, or <code>null</code> if none.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="TreeTable.Node.html#getValue(org.apache.sis.util.collection.TableColumn)">get­Value</a></code>&nbsp;in interface&nbsp;<code><a href="TreeTable.Node.html" title="interface in org.apache.sis.util.collection">Tree­Table​.Node</a></code></dd>
<dt>Type Parameters:</dt>
<dd><code>V</code> - the base type of values in the given column.</dd>
<dt>Parameters:</dt>
<dd><code>column</code> - identifier of the column from which to get the value.</dd>
<dt>Returns:</dt>
<dd>the value in the given column, or <code>null</code> if none.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="TreeTable.html#getColumns()"><code>Tree­Table​.get­Columns()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setValue(org.apache.sis.util.collection.TableColumn,V)">
<h3 id="setValue(org.apache.sis.util.collection.TableColumn,java.lang.Object)">setValue</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="type-parameters">&lt;V&gt;</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setValue</span><wbr><span class="parameters">(<a href="TableColumn.html" title="class in org.apache.sis.util.collection">TableColumn</a>&lt;V&gt;&nbsp;column,
V&nbsp;value)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></span></div>
<div class="block">Sets the value for the given column.
The <a href="#isEditable(org.apache.sis.util.collection.TableColumn)"><code>is­Editable(Table­Column)</code></a> method can be invoked before this setter method
for determining if the given column is modifiable.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="TreeTable.Node.html#setValue(org.apache.sis.util.collection.TableColumn,V)">set­Value</a></code>&nbsp;in interface&nbsp;<code><a href="TreeTable.Node.html" title="interface in org.apache.sis.util.collection">Tree­Table​.Node</a></code></dd>
<dt>Type Parameters:</dt>
<dd><code>V</code> - the base type of values in the given column.</dd>
<dt>Parameters:</dt>
<dd><code>column</code> - identifier of the column into which to set the value.</dd>
<dd><code>value</code> - the value to set.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">Illegal­Argument­Exception</a></code> - if the given column is not a legal column for this node.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#isEditable(org.apache.sis.util.collection.TableColumn)"><code>is­Editable(Table­Column)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isEditable(org.apache.sis.util.collection.TableColumn)">
<h3>isEditable</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isEditable</span><wbr><span class="parameters">(<a href="TableColumn.html" title="class in org.apache.sis.util.collection">TableColumn</a>&lt;?&gt;&nbsp;column)</span></div>
<div class="block">Determines whether the value in the specified column is editable. If the given
column is not a legal column for this <code>Node</code> instance, then this method
returns <code>false</code>.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="TreeTable.Node.html#isEditable(org.apache.sis.util.collection.TableColumn)">is­Editable</a></code>&nbsp;in interface&nbsp;<code><a href="TreeTable.Node.html" title="interface in org.apache.sis.util.collection">Tree­Table​.Node</a></code></dd>
<dt>Parameters:</dt>
<dd><code>column</code> - the column to query.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the given column is a legal column for this <code>Node</code>
implementation and the corresponding value is editable, or <code>false</code>
otherwise.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getUserObject()">
<h3>getUserObject</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><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></span>&nbsp;<span class="element-name">getUserObject</span>()</div>
<div class="block">Returns the user object associated to this node.
The default implementation returns <code>null</code>.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="TreeTable.Node.html#getUserObject()">get­User­Object</a></code>&nbsp;in interface&nbsp;<code><a href="TreeTable.Node.html" title="interface in org.apache.sis.util.collection">Tree­Table​.Node</a></code></dd>
<dt>Returns:</dt>
<dd>any object stored at this node by the user, or <code>null</code> if none.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="clone()">
<h3>clone</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="DefaultTreeTable.Node.html" title="class in org.apache.sis.util.collection">DefaultTreeTable.Node</a></span>&nbsp;<span class="element-name">clone</span>()
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CloneNotSupportedException.html" title="class or interface in java.lang" class="external-link">CloneNotSupportedException</a></span></div>
<div class="block">Returns a clone of this node without parent.
This method recursively clones all <a href="#getChildren()">children</a>,
but does not clone the column <a href="#getValue(org.apache.sis.util.collection.TableColumn)">values</a>.
The parent of the cloned node is set to <code>null</code>.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><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></code>&nbsp;in class&nbsp;<code><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></code></dd>
<dt>Returns:</dt>
<dd>a clone of this node without parent.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/CloneNotSupportedException.html" title="class or interface in java.lang" class="external-link">Clone­Not­Supported­Exception</a></code> - if this node or one of its children cannot be cloned.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="equals(java.lang.Object)">
<h3>equals</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">equals</span><wbr><span class="parameters">(<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>&nbsp;other)</span></div>
<div class="block">Compares the given object with this node for <a href="#getValue(org.apache.sis.util.collection.TableColumn)">values</a>
and <a href="#getChildren()">children</a> equality, ignoring the <a href="#getParent()">parent</a>. This method can be used for determining if two branches of a same tree or of two
different trees are identical.
<div class="note"><b>Implementation note:</b> This method ignores the parent because:
<ul>
<li>When comparing the children recursively, comparing the parents would cause infinite recursivity.</li>
<li>For consistency with the <a href="#clone()"><code>clone()</code></a> method, which cannot clone the parent.</li>
<li>For making possible to compare branches instead of only whole trees.</li>
</ul></div></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="TreeTable.Node.html#equals(java.lang.Object)">equals</a></code>&nbsp;in interface&nbsp;<code><a href="TreeTable.Node.html" title="interface in org.apache.sis.util.collection">Tree­Table​.Node</a></code></dd>
<dt>Overrides:</dt>
<dd><code><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></code>&nbsp;in class&nbsp;<code><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></code></dd>
<dt>Parameters:</dt>
<dd><code>other</code> - the object to compare with this node.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the two objects are equal, ignoring the parent node.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="hashCode()">
<h3>hashCode</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">hashCode</span>()</div>
<div class="block">Returns a hash-code value computed from the <a href="#getValue(org.apache.sis.util.collection.TableColumn)">values</a>
and <a href="#getChildren()">children</a>, ignoring the <a href="#getParent()">parent</a>.
This method is defined for consistency with <a href="#equals(java.lang.Object)"><code>equals(Object)</code></a> contract.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="TreeTable.Node.html#hashCode()">hash­Code</a></code>&nbsp;in interface&nbsp;<code><a href="TreeTable.Node.html" title="interface in org.apache.sis.util.collection">Tree­Table​.Node</a></code></dd>
<dt>Overrides:</dt>
<dd><code><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">hash­Code</a></code>&nbsp;in class&nbsp;<code><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></code></dd>
<dt>Returns:</dt>
<dd>a hash code for this node, potentially based on values and children but ignoring parent.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="toString()">
<h3>toString</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<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>&nbsp;<span class="element-name">toString</span>()</div>
<div class="block">Returns a string representation of this node for identification in error message or in debugger.
The default implementation returns the <code>to­String()</code> value of the first non-empty
<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>Char­Sequence</code></a> found in the <a href="#getValue(org.apache.sis.util.collection.TableColumn)">values</a>, if any.
If no such value is found, then this method returns "<var>Node</var>-<var>i</var>"
where <var>Node</var> is the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Class.html#getSimpleName()" title="class or interface in java.lang" class="external-link">simple classname</a>
and <var>i</var> is the index of this node in the parent node.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">to­String</a></code>&nbsp;in class&nbsp;<code><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></code></dd>
<dt>Returns:</dt>
<dd>a string representation of this node.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2010&#x2013;2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>