blob: 2fbe84b8cce779252bce7f0edf5532845e171997 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 -->
<title>PointTree (Apache SIS 1.4 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="dc.created" content="2023-10-05">
<meta name="description" content="declaration: module: org.apache.sis.feature, package: org.apache.sis.index.tree, class: PointTree">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.index.tree.PointTree class">
<meta name="keywords" content="MAXIMUM_DIMENSIONS">
<meta name="keywords" content="getCoordinateReferenceSystem()">
<meta name="keywords" content="getDimension()">
<meta name="keywords" content="getElementType()">
<meta name="keywords" content="clear()">
<meta name="keywords" content="isEmpty()">
<meta name="keywords" content="size()">
<meta name="keywords" content="add()">
<meta name="keywords" content="addAll()">
<meta name="keywords" content="contains()">
<meta name="keywords" content="iterator()">
<meta name="keywords" content="spliterator()">
<meta name="keywords" content="parallelStream()">
<meta name="keywords" content="queryByBoundingBox()">
<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">
<script type="text/javascript" src="../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../script-dir/jquery-3.6.1.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="../../../../../module-summary.html">Module</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</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><a href="#nested-class-summary">Nested</a></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:&nbsp;</li>
<li><a href="#nested-class-summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&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><a href="#field-detail">Field</a>&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="module-label-in-type">Module</span>&nbsp;<a href="../../../../../module-summary.html">org.apache.sis.feature</a></div>
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.index.tree</a></div>
<h1 title="Class PointTree" class="title">Class PointTree&lt;E&gt;</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
<div class="inheritance"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html" title="class or interface in java.util" class="external-link">AbstractCollection</a>&lt;E&gt;
<div class="inheritance"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractSet.html" title="class or interface in java.util" class="external-link">AbstractSet</a>&lt;E&gt;
<div class="inheritance">PointTree&lt;E&gt;</div>
</div>
</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>E</code> - the type of elements stored in this tree.</dd>
</dl>
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a>&lt;E&gt;</code>, <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;E&gt;</code>, <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a>&lt;E&gt;</code>, <code><a href="../../../../../../org.apache.sis.util/org/apache/sis/util/collection/CheckedContainer.html" title="interface in org.apache.sis.util.collection">Checked­Container</a>&lt;E&gt;</code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">PointTree&lt;E&gt;</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractSet.html" title="class or interface in java.util" class="external-link">AbstractSet</a>&lt;E&gt;
implements <a href="../../../../../../org.apache.sis.util/org/apache/sis/util/collection/CheckedContainer.html" title="interface in org.apache.sis.util.collection">CheckedContainer</a>&lt;E&gt;</span></div>
<div class="block">A <var>k</var>-dimensional tree index for points.
For <var>k</var>=2, this is a <cite>point QuadTree</cite>.
For <var>k</var>=3, this is a point <cite>Octree</cite>.
Higher dimensions are also accepted up to <a href="#MAXIMUM_DIMENSIONS">6</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt; dimensions.
Elements are stored in this <code>Point­Tree</code> as arbitrary non-null objects with their coordinates
computed by a user-specified <code>locator</code> function. That function expects an element <code>E</code>
in argument and returns its coordinates as a <code>double[]</code> array.
The coordinates of each elements must be <em>stable</em>, i.e. applying the <code>locator</code> function
twice on the same element must return the same coordinates.
Searches based on element coordinates can be done with the following methods:
<ul>
<li><a href="#queryByBoundingBox(org.opengis.geometry.Envelope)"><code>query­By­Bounding­Box(Envelope)</code></a></li>
</ul>
The performances of this <code>Point­Tree</code> depends on two parameters: an estimated bounding box of the points
to be added in this tree and a maximal capacity of leaf nodes (not to be confused with a capacity of the tree).
More details are given in the <a href="#%3Cinit%3E(java.lang.Class,org.opengis.geometry.Envelope,org.apache.sis.index.tree.PointTree.Locator,int,boolean)">constructor</a>.
<h2 id="thread-safety-heading">Thread-safety</h2>
This class is not thread-safe when the tree content is modified. But if the tree is kept unmodified
after construction, then multiple read operations in concurrent threads are safe. Users can synchronize
with <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/locks/ReadWriteLock.html" title="class or interface in java.util.concurrent.locks" class="external-link"><code>Read­Write­Lock</code></a> (the read lock must be held for complete duration
of iterations or stream consumptions).
<h2 id="serialization-heading">Serialization</h2>
This tree is serializable if the <code>locator</code> function and all elements in the tree are also serializable.
However, the serialization details is implementation specific and may change in any future Apache SIS version.
<h2 id="limitations-heading">Limitations</h2>
Current implementation does not yet support removal of elements.
<h2 id="references-heading">References</h2>
Insertion algorithm is based on design of QuadTree index in H. Samet,
<u>The Design and Analysis of Spatial Data Structures</u>.
Massachusetts: Addison Wesley Publishing Company, 1989.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>1.1</dd>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<li>
<section class="nested-class-summary" id="nested-class-summary">
<h2>Nested Class Summary</h2>
<div class="caption"><span>Nested Classes</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">Class</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>static interface&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="PointTree.Locator.html" class="type-name-link" title="interface in org.apache.sis.index.tree">Point­Tree​.Locator</a>&lt;<a href="PointTree.Locator.html" title="type parameter in PointTree.Locator">E</a>&gt;</code></div>
<div class="col-last even-row-color">
<div class="block">Provides the coordinates of any element stored in <a href="PointTree.html" title="class in org.apache.sis.index.tree"><code>Point­Tree</code></a>.</div>
</div>
</div>
</section>
</li>
<!-- =========== 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 int</code></div>
<div class="col-second even-row-color"><code><a href="#MAXIMUM_DIMENSIONS" class="member-name-link">MAXIMUM_DIMENSIONS</a></code></div>
<div class="col-last even-row-color">
<div class="block">The maximum number of dimensions (inclusive) that this class currently supports.</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(java.lang.Class,org.opengis.geometry.Envelope,org.apache.sis.index.tree.PointTree.Locator,int,boolean)" class="member-name-link">Point­Tree</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;&nbsp;element­Type,
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html" title="class or interface in org.opengis.geometry" class="external-link">Envelope</a>&nbsp;bounds,
<a href="PointTree.Locator.html" title="interface in org.apache.sis.index.tree">Point­Tree​.Locator</a>&lt;? super <a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;&nbsp;locator,
int&nbsp;node­Capacity,
boolean&nbsp;parallel)</code></div>
<div class="col-last even-row-color">
<div class="block">Creates an initially empty <var>k</var>-dimensional tree with the given capacity for each node.</div>
</div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.apache.sis.index.tree.PointTree)" class="member-name-link">Point­Tree</a><wbr>(<a href="PointTree.html" title="class in org.apache.sis.index.tree">Point­Tree</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;&nbsp;other)</code></div>
<div class="col-last odd-row-color">
<div class="block">Creates a new tree initialized to a copy of the given tree.</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>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#add(E)" class="member-name-link">add</a><wbr>(<a href="PointTree.html" title="type parameter in PointTree">E</a>&nbsp;element)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Inserts the specified element into this tree if it is not already present.</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="#addAll(java.util.Collection)" class="member-name-link">add­All</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;? extends <a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;&nbsp;elements)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Inserts all elements from the specified collection into this tree if they are not already present.</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="#clear()" class="member-name-link">clear</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Removes all elements from this tree.</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="#contains(java.lang.Object)" class="member-name-link">contains</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;element)</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 this set contains the specified element.</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/11/docs/api/java.base/java/util/Optional.html" title="class or interface in java.util" class="external-link">Optional</a><wbr>&lt;<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">Coordinate­Reference­System</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="#getCoordinateReferenceSystem()" class="member-name-link">get­Coordinate­Reference­System</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 coordinate reference system (CRS) of all points in this tree.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>final int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getDimension()" class="member-name-link">get­Dimension</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 number of dimensions of points in this tree.</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/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><wbr>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</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="#getElementType()" class="member-name-link">get­Element­Type</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 base type of all elements in this tree.</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="#isEmpty()" class="member-name-link">is­Empty</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 true if this set contains no elements.</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/11/docs/api/java.base/java/util/Iterator.html" title="class or interface in java.util" class="external-link">Iterator</a><wbr>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</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="#iterator()" class="member-name-link">iterator</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Creates an iterator over all elements in this set.</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/11/docs/api/java.base/java/util/stream/Stream.html" title="class or interface in java.util.stream" class="external-link">Stream</a><wbr>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#parallelStream()" class="member-name-link">parallel­Stream</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 possibly parallel stream with this tree as its source.</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/11/docs/api/java.base/java/util/stream/Stream.html" title="class or interface in java.util.stream" class="external-link">Stream</a><wbr>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</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="#queryByBoundingBox(org.opengis.geometry.Envelope)" class="member-name-link">query­By­Bounding­Box</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html" title="class or interface in org.opengis.geometry" class="external-link">Envelope</a>&nbsp;search­Region)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns all elements in the given bounding box.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#size()" class="member-name-link">size</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 number of elements in this tree.</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/11/docs/api/java.base/java/util/Spliterator.html" title="class or interface in java.util" class="external-link">Spliterator</a><wbr>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</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="#spliterator()" class="member-name-link">spliterator</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Creates an iterator over all elements in this set.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-AbstractSet">Methods inherited from class&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractSet.html" title="class or interface in java.util" class="external-link">AbstractSet</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractSet.html#equals(java.lang.Object)" title="class or interface in java.util" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractSet.html#hashCode()" title="class or interface in java.util" class="external-link">hash­Code</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractSet.html#removeAll(java.util.Collection)" title="class or interface in java.util" class="external-link">remove­All</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-AbstractCollection">Methods inherited from class&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html" title="class or interface in java.util" class="external-link">AbstractCollection</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html#containsAll(java.util.Collection)" title="class or interface in java.util" class="external-link">contains­All</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html#remove(java.lang.Object)" title="class or interface in java.util" class="external-link">remove</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html#retainAll(java.util.Collection)" title="class or interface in java.util" class="external-link">retain­All</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html#toArray()" title="class or interface in java.util" class="external-link">to­Array</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html#toArray(T%5B%5D)" title="class or interface in java.util" class="external-link">to­Array</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html#toString()" title="class or interface in java.util" class="external-link">to­String</a></code></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/11/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/11/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/11/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/11/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/11/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/11/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/11/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/11/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/11/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>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Collection">Methods inherited from interface&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html#removeIf(java.util.function.Predicate)" title="class or interface in java.util" class="external-link">remove­If</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html#stream()" title="class or interface in java.util" class="external-link">stream</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html#toArray(java.util.function.IntFunction)" title="class or interface in java.util" class="external-link">to­Array</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Iterable">Methods inherited from interface&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html#forEach(java.util.function.Consumer)" title="class or interface in java.lang" class="external-link">for­Each</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Set">Methods inherited from interface&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html#containsAll(java.util.Collection)" title="class or interface in java.util" class="external-link">contains­All</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html#remove(java.lang.Object)" title="class or interface in java.util" class="external-link">remove</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html#retainAll(java.util.Collection)" title="class or interface in java.util" class="external-link">retain­All</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html#toArray()" title="class or interface in java.util" class="external-link">to­Array</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html#toArray(T%5B%5D)" title="class or interface in java.util" class="external-link">to­Array</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="MAXIMUM_DIMENSIONS">
<h3>MAXIMUM_DIMENSIONS</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">MAXIMUM_DIMENSIONS</span></div>
<div class="block">The maximum number of dimensions (inclusive) that this class currently supports.
Current maximum is 6. This restriction come from 2⁶ = <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Long.html#SIZE" title="class or interface in java.lang" class="external-link">64</a>.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../../../../../../constant-values.html#org.apache.sis.index.tree.PointTree.MAXIMUM_DIMENSIONS">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</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="&lt;init&gt;(org.apache.sis.index.tree.PointTree)">
<h3>PointTree</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">PointTree</span><wbr><span class="parameters">(<a href="PointTree.html" title="class in org.apache.sis.index.tree">PointTree</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;&nbsp;other)</span></div>
<div class="block">Creates a new tree initialized to a copy of the given tree.
This copy constructor shares some data structure from the <code>other</code> tree for reducing memory usage,
but the two trees are nevertheless independent (changes in a tree does not affect the other tree).</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>other</code> - the other tree to copy.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(java.lang.Class,org.opengis.geometry.Envelope,org.apache.sis.index.tree.PointTree.Locator,int,boolean)">
<h3>PointTree</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">PointTree</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;&nbsp;elementType,
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html" title="class or interface in org.opengis.geometry" class="external-link">Envelope</a>&nbsp;bounds,
<a href="PointTree.Locator.html" title="interface in org.apache.sis.index.tree">PointTree.Locator</a>&lt;? super <a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;&nbsp;locator,
int&nbsp;nodeCapacity,
boolean&nbsp;parallel)</span></div>
<div class="block">Creates an initially empty <var>k</var>-dimensional tree with the given capacity for each node.
The number of dimensions of the given envelope determines the number of dimensions of points in this tree.
The positions computed by <code>locator</code> must have the same number of dimensions than the given envelope.
<p>The <code>bounds</code> argument specifies the expected region of points to be added in this <code>Point­Tree</code>.
Those bounds do not need to be exact; <code>Point­Tree</code> will work even if some points are located outside
those bounds. However, performances will be better if the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html#getMedian(int)" title="class or interface in org.opengis.geometry" class="external-link">envelope center</a>
is close to the median of the points to be inserted in the <code>Point­Tree</code>, and if the majority of points
are inside those bounds.</p>
<p>The given <code>node­Capacity</code> is a threshold value controlling when the content of a node should
be splited into smaller children nodes. That capacity should be a relatively small number,
for example 10. Determining the most efficient value may require benchmarking.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>element­Type</code> - the base type of all elements in this tree.</dd>
<dd><code>bounds</code> - bounds of the region of data to be inserted in the <var>k</var>-dimensional tree.</dd>
<dd><code>locator</code> - function computing the position of any element in this tree.</dd>
<dd><code>node­Capacity</code> - the capacity of each node (not to be confused with a capacity of the tree).</dd>
<dd><code>parallel</code> - whether the stream can be parallel by default.
Should be <code>false</code> if the given <code>locator</code> is not thread-safe.</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="getCoordinateReferenceSystem()">
<h3>getCoordinateReferenceSystem</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/11/docs/api/java.base/java/util/Optional.html" title="class or interface in java.util" class="external-link">Optional</a>&lt;<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">CoordinateReferenceSystem</a>&gt;</span>&nbsp;<span class="element-name">getCoordinateReferenceSystem</span>()</div>
<div class="block">Returns the coordinate reference system (CRS) of all points in this tree.
The CRS is taken from the envelope given in argument to the constructor.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the CRS of all points in this tree, if presents.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="#getDimension()"><code>get­Dimension()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDimension()">
<h3>getDimension</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getDimension</span>()</div>
<div class="block">Returns the number of dimensions of points in this tree.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the number of dimensions of points in this tree.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="#getCoordinateReferenceSystem()"><code>get­Coordinate­Reference­System()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getElementType()">
<h3>getElementType</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/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</span>&nbsp;<span class="element-name">getElementType</span>()</div>
<div class="block">Returns the base type of all elements in this tree.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../../../../../../org.apache.sis.util/org/apache/sis/util/collection/CheckedContainer.html#getElementType()">get­Element­Type</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../../org.apache.sis.util/org/apache/sis/util/collection/CheckedContainer.html" title="interface in org.apache.sis.util.collection">Checked­Container</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Returns:</dt>
<dd>the element type.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="clear()">
<h3>clear</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">clear</span>()</div>
<div class="block">Removes all elements from this tree.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html#clear()" title="class or interface in java.util" class="external-link">clear</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html#clear()" title="class or interface in java.util" class="external-link">clear</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html#clear()" title="class or interface in java.util" class="external-link">clear</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html" title="class or interface in java.util" class="external-link">Abstract­Collection</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isEmpty()">
<h3>isEmpty</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isEmpty</span>()</div>
<div class="block">Returns true if this set contains no elements.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html#isEmpty()" title="class or interface in java.util" class="external-link">is­Empty</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html#isEmpty()" title="class or interface in java.util" class="external-link">is­Empty</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html#isEmpty()" title="class or interface in java.util" class="external-link">is­Empty</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html" title="class or interface in java.util" class="external-link">Abstract­Collection</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Returns:</dt>
<dd>whether this set is empty.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="size()">
<h3>size</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">size</span>()</div>
<div class="block">Returns the number of elements in this tree.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html#size()" title="class or interface in java.util" class="external-link">size</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html#size()" title="class or interface in java.util" class="external-link">size</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html#size()" title="class or interface in java.util" class="external-link">size</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html" title="class or interface in java.util" class="external-link">Abstract­Collection</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Returns:</dt>
<dd>the number of elements in this tree, or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Integer.html#MAX_VALUE" title="class or interface in java.lang" class="external-link"><code>Integer​.MAX_VALUE</code></a>
if there is more elements than what an <code>int</code> can represent.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="add(E)">
<h3 id="add(java.lang.Object)">add</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">add</span><wbr><span class="parameters">(<a href="PointTree.html" title="type parameter in PointTree">E</a>&nbsp;element)</span></div>
<div class="block">Inserts the specified element into this tree if it is not already present.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html#add(E)" title="class or interface in java.util" class="external-link">add</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html#add(E)" title="class or interface in java.util" class="external-link">add</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html#add(E)" title="class or interface in java.util" class="external-link">add</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html" title="class or interface in java.util" class="external-link">Abstract­Collection</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>element</code> - the element to insert.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the element has been added, or <code>false</code> if it was already present.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link">Null­Pointer­Exception</a></code> - if the given element is null.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="addAll(java.util.Collection)">
<h3>addAll</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">addAll</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;? extends <a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;&nbsp;elements)</span></div>
<div class="block">Inserts all elements from the specified collection into this tree if they are not already present.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html#addAll(java.util.Collection)" title="class or interface in java.util" class="external-link">add­All</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html#addAll(java.util.Collection)" title="class or interface in java.util" class="external-link">add­All</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html#addAll(java.util.Collection)" title="class or interface in java.util" class="external-link">add­All</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html" title="class or interface in java.util" class="external-link">Abstract­Collection</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>elements</code> - the elements to insert.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if at least one element has been added.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/NullPointerException.html" title="class or interface in java.lang" class="external-link">Null­Pointer­Exception</a></code> - if an element is null.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="contains(java.lang.Object)">
<h3>contains</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">contains</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;element)</span></div>
<div class="block">Returns <code>true</code> if this set contains the specified element.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html#contains(java.lang.Object)" title="class or interface in java.util" class="external-link">contains</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html#contains(java.lang.Object)" title="class or interface in java.util" class="external-link">contains</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html#contains(java.lang.Object)" title="class or interface in java.util" class="external-link">contains</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html" title="class or interface in java.util" class="external-link">Abstract­Collection</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>element</code> - the object to search.</dd>
<dt>Returns:</dt>
<dd>whether this set contains the specified element.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="iterator()">
<h3>iterator</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Iterator.html" title="class or interface in java.util" class="external-link">Iterator</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</span>&nbsp;<span class="element-name">iterator</span>()</div>
<div class="block">Creates an iterator over all elements in this set.
In current implementation, the iterator does not support element removal.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html#iterator()" title="class or interface in java.util" class="external-link">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html#iterator()" title="class or interface in java.lang" class="external-link">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html#iterator()" title="class or interface in java.util" class="external-link">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html#iterator()" title="class or interface in java.util" class="external-link">iterator</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/AbstractCollection.html" title="class or interface in java.util" class="external-link">Abstract­Collection</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="spliterator()">
<h3>spliterator</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Spliterator.html" title="class or interface in java.util" class="external-link">Spliterator</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</span>&nbsp;<span class="element-name">spliterator</span>()</div>
<div class="block">Creates an iterator over all elements in this set. The iterator characteristics are
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Spliterator.html#SIZED" title="class or interface in java.util" class="external-link">sized</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Spliterator.html#DISTINCT" title="class or interface in java.util" class="external-link">distinct</a> and
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Spliterator.html#NONNULL" title="class or interface in java.util" class="external-link"><code>non-null</code></a>.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html#spliterator()" title="class or interface in java.util" class="external-link">spliterator</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html#spliterator()" title="class or interface in java.lang" class="external-link">spliterator</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Iterable.html" title="class or interface in java.lang" class="external-link">Iterable</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html#spliterator()" title="class or interface in java.util" class="external-link">spliterator</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html" title="class or interface in java.util" class="external-link">Set</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="parallelStream()">
<h3>parallelStream</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Stream.html" title="class or interface in java.util.stream" class="external-link">Stream</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</span>&nbsp;<span class="element-name">parallelStream</span>()</div>
<div class="block">Returns a possibly parallel stream with this tree as its source.
It is allowable for this method to return a sequential stream.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html#parallelStream()" title="class or interface in java.util" class="external-link">parallel­Stream</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</code></dd>
<dt>Returns:</dt>
<dd>a possibly parallel stream over the elements in this tree.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="queryByBoundingBox(org.opengis.geometry.Envelope)">
<h3>queryByBoundingBox</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/Stream.html" title="class or interface in java.util.stream" class="external-link">Stream</a>&lt;<a href="PointTree.html" title="type parameter in PointTree">E</a>&gt;</span>&nbsp;<span class="element-name">queryByBoundingBox</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html" title="class or interface in org.opengis.geometry" class="external-link">Envelope</a>&nbsp;searchRegion)</span></div>
<div class="block">Returns all elements in the given bounding box. The given envelope shall be in the same CRS
than the points in this tree (this is currently not verified). The returned stream may be
parallel by default, depending on the argument given to the constructor.
If the action to be applied on the stream cannot be parallel,
then user should invoke <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/BaseStream.html#sequential()" title="class or interface in java.util.stream" class="external-link"><code>Base­Stream​.sequential()</code></a> explicitly.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>search­Region</code> - envelope representing the rectangular search region.</dd>
<dt>Returns:</dt>
<dd>elements that are in the given search region (bounds inclusive).</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>