blob: ef2791181554ca8f9e52c1deb658dedc277f9b55 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 -->
<title>RangeSet (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.util, package: org.apache.sis.util.collection, class: RangeSet">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.util.collection.RangeSet class">
<meta name="keywords" content="elementType">
<meta name="keywords" content="isMinIncluded">
<meta name="keywords" content="isMaxIncluded">
<meta name="keywords" content="create()">
<meta name="keywords" content="getElementType()">
<meta name="keywords" content="comparator()">
<meta name="keywords" content="clear()">
<meta name="keywords" content="size()">
<meta name="keywords" content="trimToSize()">
<meta name="keywords" content="add()">
<meta name="keywords" content="remove()">
<meta name="keywords" content="contains()">
<meta name="keywords" content="first()">
<meta name="keywords" content="last()">
<meta name="keywords" content="intersect()">
<meta name="keywords" content="subSet()">
<meta name="keywords" content="headSet()">
<meta name="keywords" content="tailSet()">
<meta name="keywords" content="iterator()">
<meta name="keywords" content="indexOfRange()">
<meta name="keywords" content="indexOfMin()">
<meta name="keywords" content="indexOfMax()">
<meta name="keywords" content="getMinLong()">
<meta name="keywords" content="getMinDouble()">
<meta name="keywords" content="getMaxLong()">
<meta name="keywords" content="getMaxDouble()">
<meta name="keywords" content="newRange()">
<meta name="keywords" content="equals()">
<meta name="keywords" content="clone()">
<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>Nested</li>
<li><a href="#field-summary">Field</a></li>
<li><a href="#constructor-summary">Constr</a></li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li><a href="#field-detail">Field</a></li>
<li><a href="#constructor-detail">Constr</a></li>
<li><a href="#method-detail">Method</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&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.util</a></div>
<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 RangeSet" class="title">Class RangeSet&lt;E extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super E&gt;&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;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;E&gt;&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;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;E&gt;&gt;
<div class="inheritance">RangeSet&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 range elements.</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/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/11/docs/api/java.base/java/lang/Cloneable.html" title="class or interface in java.lang" class="external-link">Cloneable</a></code>, <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="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;E&gt;&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;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;E&gt;&gt;</code>, <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SequencedCollection.html" title="class or interface in java.util" class="external-link">Sequenced­Collection</a>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;E&gt;&gt;</code>, <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SequencedSet.html" title="class or interface in java.util" class="external-link">Sequenced­Set</a>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;E&gt;&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;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;E&gt;&gt;</code>, <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html" title="class or interface in java.util" class="external-link">Sorted­Set</a>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;E&gt;&gt;</code>, <code><a href="CheckedContainer.html" title="interface in org.apache.sis.util.collection">Checked­Container</a>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;E&gt;&gt;</code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">RangeSet&lt;E extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super E&gt;&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;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;E&gt;&gt;
implements <a href="CheckedContainer.html" title="interface in org.apache.sis.util.collection">CheckedContainer</a>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;E&gt;&gt;, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html" title="class or interface in java.util" class="external-link">SortedSet</a>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;E&gt;&gt;, <a href="https://docs.oracle.com/en/java/javase/11/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/11/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">An ordered set of disjoint ranges where overlapping ranges are merged.
All <code>add</code> and <code>remove</code> operations defined in this class interact with the existing
ranges, merging or splitting previously added ranges in order to ensure that every ranges in a
<code>Range­Set</code> are always disjoint. More specifically:
<ul>
<li>When a range is <a href="#add(org.apache.sis.measure.Range)">added</a>, <code>Range­Set</code> first looks for existing
ranges overlapping the specified range. If overlapping ranges are found, then those ranges
are merged as of <a href="../../measure/Range.html#union(org.apache.sis.measure.Range)"><code>Range​.union(Range)</code></a>. Consequently, adding ranges may in some
circumstances <strong>reduce</strong> the <a href="#size()">size</a> of this set.</li>
<li>Conversely, when a range is <a href="#remove(java.lang.Object)">removed</a>, <code>Range­Set</code> first
looks if that range is in the middle of an existing range. If such range is found, then
the enclosing range is splitted as of <a href="../../measure/Range.html#subtract(org.apache.sis.measure.Range)"><code>Range​.subtract(Range)</code></a>. Consequently, removing
ranges may in some circumstances <strong>increase</strong> the size of this set.</li>
</ul>
<h2 id="inclusive-or-exclusive-endpoints-heading">Inclusive or exclusive endpoints</h2>
<code>Range­Set</code> requires that <a href="../../measure/Range.html#isMinIncluded()"><code>Range​.is­Min­Included()</code></a> and <a href="../../measure/Range.html#isMaxIncluded()"><code>Range​.is­Max­Included()</code></a>
return the same values for all instances added to this set. Those values need to be specified
at construction time. If a user needs to store mixed kind of ranges, then he needs to subclass
this <code>Range­Set</code> class and override the <a href="#add(org.apache.sis.measure.Range)"><code>add(Range)</code></a>, <a href="#remove(java.lang.Object)"><code>remove(Object)</code></a> and
<a href="#newRange(E,E)"><code>new­Range(Comparable, Comparable)</code></a> methods.
<h2 id="limitation-heading">Limitation</h2>
Current implementation does not yet support open intervals. The ranges shall be either closed intervals,
or half-open. This limitation exists because supporting open intervals implies that the internal array
shall support duplicated values.
<h2 id="extensions-to-sortedset-api-heading">Extensions to <code>Sorted­Set</code> API</h2>
This class contains some methods not found in standard <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html" title="class or interface in java.util" class="external-link"><code>Sorted­Set</code></a> API.
Some of those methods look like <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link"><code>List</code></a> API, in that they work
with the index of a <code>Range</code> instance in the sequence of ranges returned
by the iterator.
<ul>
<li><a href="#indexOfRange(E)"><code>index­Of­Range(Comparable)</code></a> returns the index of the range containing
the given value (if any).</li>
<li><a href="#getMinDouble(int)"><code>get­Min­Double(int)</code></a> and <a href="#getMaxDouble(int)"><code>get­Max­Double(int)</code></a> return the endpoint values
in the range at the given index as a <code>double</code> without the cost of creating a
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Number.html" title="class or interface in java.lang" class="external-link"><code>Number</code></a> instance.</li>
<li><a href="#getMinLong(int)"><code>get­Min­Long(int)</code></a> and <a href="#getMaxLong(int)"><code>get­Max­Long(int)</code></a> are equivalent to the above
methods for the <code>long</code> primitive type, used mostly for <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Date.html" title="class or interface in java.util" class="external-link"><code>Date</code></a>
values (see implementation note below).</li>
<li><a href="#intersect(org.apache.sis.measure.Range)"><code>intersect(Range)</code></a> provides a more convenient way than <code>sub­Set(…)</code>,
<code>head­Set(…)</code> and <code>tail­Set(…)</code> for creating views over subsets of a
<code>Range­Set</code>.</li>
<li><a href="#trimToSize()"><code>trim­To­Size()</code></a> frees unused space.</li>
</ul>
<h2 id="implementation-note-heading">Implementation note</h2>
For efficiency reasons, this set stores the range values in a Java array of primitive type if
possible. The <code>Range</code> instances given in argument to the <a href="#add(org.apache.sis.measure.Range)"><code>add(Range)</code></a> method are
not retained by this class. Ranges are recreated during iterations by calls to the
<a href="#newRange(E,E)"><code>new­Range(Comparable, Comparable)</code></a> method. Subclasses can override that method if they
need to customize the range objects to be created.
<p>While it is possible to create <code>Range­Set&lt;Date&gt;</code> instances, it is more efficient to
use <code>Range­Set&lt;Long&gt;</code> with millisecond values because <code>Range­Set</code> will internally
use <code>long[]</code> arrays in the latter case.</p></div>
<dl class="notes">
<dt>Since:</dt>
<dd>0.3</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../../measure/Range.html" title="class in org.apache.sis.measure"><code>Range</code></a></li>
<li><a href="../../../../../../serialized-form.html#org.apache.sis.util.collection.RangeSet">Serialized Form</a></li>
</ul>
</dd>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>protected 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="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;</code></div>
<div class="col-second even-row-color"><code><a href="#elementType" class="member-name-link">element­Type</a></code></div>
<div class="col-last even-row-color">
<div class="block">The type of elements in the ranges.</div>
</div>
<div class="col-first odd-row-color"><code>protected final boolean</code></div>
<div class="col-second odd-row-color"><code><a href="#isMaxIncluded" class="member-name-link">is­Max­Included</a></code></div>
<div class="col-last odd-row-color">
<div class="block"><code>true</code> if the maximal values of ranges in this set are inclusive, or <code>false</code>
if exclusive.</div>
</div>
<div class="col-first even-row-color"><code>protected final boolean</code></div>
<div class="col-second even-row-color"><code><a href="#isMinIncluded" class="member-name-link">is­Min­Included</a></code></div>
<div class="col-last even-row-color">
<div class="block"><code>true</code> if the minimal values of ranges in this set are inclusive, or <code>false</code>
if exclusive.</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 three-column-summary">
<div class="table-header col-first">Modifier</div>
<div class="table-header col-second">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>protected </code></div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(java.lang.Class,boolean,boolean)" class="member-name-link">Range­Set</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="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&nbsp;element­Type,
boolean&nbsp;is­Min­Included,
boolean&nbsp;is­Max­Included)</code></div>
<div class="col-last even-row-color">
<div class="block">Constructs an initially empty set of ranges.</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-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static 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,E)" class="member-name-link">add</a><wbr>(<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&nbsp;min­Value,
<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&nbsp;max­Value)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Adds a range of values to this set.</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="#add(org.apache.sis.measure.Range)" class="member-name-link">add</a><wbr>(<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&nbsp;range)</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 range to this set.</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 set of ranges.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="RangeSet.html" title="class in org.apache.sis.util.collection">Range­Set</a><wbr>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">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="#clone()" class="member-name-link">clone</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 clone of this range set.</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/Comparator.html" title="class or interface in java.util" class="external-link">Comparator</a><wbr>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#comparator()" class="member-name-link">comparator</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 comparator associated with this sorted set.</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;object)</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 the given object is an instance of <a href="../../measure/Range.html" title="class in org.apache.sis.measure"><code>Range</code></a> compatible
with this set and contained inside one of the range elements of this set.</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="#contains(org.apache.sis.measure.Range,boolean)" class="member-name-link">contains</a><wbr>(<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&nbsp;range,
boolean&nbsp;exact)</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 set contains the specified element.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static &lt;E extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super E&gt;&gt;<br><a href="RangeSet.html" title="class in org.apache.sis.util.collection">Range­Set</a><wbr>&lt;E&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#create(java.lang.Class,boolean,boolean)" class="member-name-link">create</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;E&gt;&nbsp;element­Type,
boolean&nbsp;is­Min­Included,
boolean&nbsp;is­Max­Included)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Constructs an initially empty set of ranges.</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="#equals(java.lang.Object)" class="member-name-link">equals</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;object)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Compares the specified object with this set of ranges for equality.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a><wbr>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">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="#first()" class="member-name-link">first</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 first (lowest) range currently in this sorted set.</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="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&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 type of elements in this <em>collection</em>, which is always <code>Range</code>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMaxDouble(int)" class="member-name-link">get­Max­Double</a><wbr>(int&nbsp;index)</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 <a href="../../measure/Range.html#getMaxValue()">range maximum value</a> as a <code>double</code>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>long</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMaxLong(int)" class="member-name-link">get­Max­Long</a><wbr>(int&nbsp;index)</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 <a href="../../measure/Range.html#getMaxValue()">range maximum value</a> as a <code>long</code>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMinDouble(int)" class="member-name-link">get­Min­Double</a><wbr>(int&nbsp;index)</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 <a href="../../measure/Range.html#getMinValue()">range minimum value</a> as a <code>double</code>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>long</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMinLong(int)" class="member-name-link">get­Min­Long</a><wbr>(int&nbsp;index)</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 <a href="../../measure/Range.html#getMinValue()">range minimum value</a> as a <code>long</code>.</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/SortedSet.html" title="class or interface in java.util" class="external-link">Sorted­Set</a><wbr>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#headSet(org.apache.sis.measure.Range)" class="member-name-link">head­Set</a><wbr>(<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&nbsp;upper)</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 view of the portion of this sorted set whose elements are
strictly less than <code>upper</code>.</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="#indexOfMax(E)" class="member-name-link">index­Of­Max</a><wbr>(<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&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">Returns the index of the range having a maximum value equal or greater than the specified value.</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="#indexOfMin(E)" class="member-name-link">index­Of­Min</a><wbr>(<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&nbsp;value)</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 index of the range having a minimum value equal or lower than the specified value.</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="#indexOfRange(E)" class="member-name-link">index­Of­Range</a><wbr>(<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&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">If the specified value is inside a range, returns the index of this range.</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/SortedSet.html" title="class or interface in java.util" class="external-link">Sorted­Set</a><wbr>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#intersect(org.apache.sis.measure.Range)" class="member-name-link">intersect</a><wbr>(<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&nbsp;sub­Range)</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 view of the portion of this range set which is the intersection of
this <code>Range­Set</code> with the given range.</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="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&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">Returns an iterator over the elements in this set of ranges.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a><wbr>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">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="#last()" class="member-name-link">last</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 last (highest) range currently in this sorted set.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected <a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a><wbr>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">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="#newRange(E,E)" class="member-name-link">new­Range</a><wbr>(<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&nbsp;lower,
<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&nbsp;upper)</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 new <a href="../../measure/Range.html" title="class in org.apache.sis.measure"><code>Range</code></a> object initialized with the given values.</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="#remove(E,E)" class="member-name-link">remove</a><wbr>(<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&nbsp;min­Value,
<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&nbsp;max­Value)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Removes a range of values to this set.</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="#remove(java.lang.Object)" class="member-name-link">remove</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;object)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Removes a range from this set.</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 ranges in this set.</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/SortedSet.html" title="class or interface in java.util" class="external-link">Sorted­Set</a><wbr>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#subSet(org.apache.sis.measure.Range,org.apache.sis.measure.Range)" class="member-name-link">sub­Set</a><wbr>(<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&nbsp;lower,
<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&nbsp;upper)</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 view of the portion of this sorted set whose elements range
from <code>lower</code>, inclusive, to <code>upper</code>, exclusive.</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/SortedSet.html" title="class or interface in java.util" class="external-link">Sorted­Set</a><wbr>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#tailSet(org.apache.sis.measure.Range)" class="member-name-link">tail­Set</a><wbr>(<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&nbsp;lower)</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 view of the portion of this sorted set whose elements are
greater than or equal to <code>lower</code>.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>final void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#trimToSize()" class="member-name-link">trim­To­Size</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Trims this set to the minimal amount of memory required for holding its data.</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#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#addAll(java.util.Collection)" title="class or interface in java.util" class="external-link">add­All</a>, <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#isEmpty()" title="class or interface in java.util" class="external-link">is­Empty</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#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#parallelStream()" title="class or interface in java.util" class="external-link">parallel­Stream</a>, <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#addAll(java.util.Collection)" title="class or interface in java.util" class="external-link">add­All</a>, <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#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/Set.html#isEmpty()" title="class or interface in java.util" class="external-link">is­Empty</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Set.html#removeAll(java.util.Collection)" title="class or interface in java.util" class="external-link">remove­All</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>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-SortedSet">Methods inherited from interface&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html" title="class or interface in java.util" class="external-link">SortedSet</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html#addFirst(E)" title="class or interface in java.util" class="external-link">add­First</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html#addLast(E)" title="class or interface in java.util" class="external-link">add­Last</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html#getFirst()" title="class or interface in java.util" class="external-link">get­First</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html#getLast()" title="class or interface in java.util" class="external-link">get­Last</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html#removeFirst()" title="class or interface in java.util" class="external-link">remove­First</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html#removeLast()" title="class or interface in java.util" class="external-link">remove­Last</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html#reversed()" title="class or interface in java.util" class="external-link">reversed</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html#spliterator()" title="class or interface in java.util" class="external-link">spliterator</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="elementType">
<h3>elementType</h3>
<div class="member-signature"><span class="modifiers">protected 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="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</span>&nbsp;<span class="element-name">elementType</span></div>
<div class="block">The type of elements in the ranges. If the element are numbers,
then the value is the wrapper type (not the primitive type).</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../../measure/Range.html#getElementType()"><code>Range​.get­Element­Type()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isMinIncluded">
<h3>isMinIncluded</h3>
<div class="member-signature"><span class="modifiers">protected final</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isMinIncluded</span></div>
<div class="block"><code>true</code> if the minimal values of ranges in this set are inclusive, or <code>false</code>
if exclusive. This value is specified at construction time and enforced when ranges are
added or removed.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../../measure/Range.html#isMinIncluded()"><code>Range​.is­Min­Included()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isMaxIncluded">
<h3>isMaxIncluded</h3>
<div class="member-signature"><span class="modifiers">protected final</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isMaxIncluded</span></div>
<div class="block"><code>true</code> if the maximal values of ranges in this set are inclusive, or <code>false</code>
if exclusive. This value is specified at construction time and enforced when ranges are
added or removed.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../../measure/Range.html#isMaxIncluded()"><code>Range​.is­Max­Included()</code></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;(java.lang.Class,boolean,boolean)">
<h3>RangeSet</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="element-name">RangeSet</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="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&nbsp;elementType,
boolean&nbsp;isMinIncluded,
boolean&nbsp;isMaxIncluded)</span></div>
<div class="block">Constructs an initially empty set of ranges.
This constructor is provided for sub-classing only.
Client code should use the static <a href="#create(java.lang.Class,boolean,boolean)"><code>create(Class, boolean, boolean)</code></a> method instead.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>element­Type</code> - the type of the range elements.</dd>
<dd><code>is­Min­Included</code> - <code>true</code> if the minimal values are inclusive, or <code>false</code> if exclusive.</dd>
<dd><code>is­Max­Included</code> - <code>true</code> if the maximal values are inclusive, or <code>false</code> if exclusive.</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="create(java.lang.Class,boolean,boolean)">
<h3>create</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="type-parameters">&lt;E extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super E&gt;&gt;</span>
<span class="return-type"><a href="RangeSet.html" title="class in org.apache.sis.util.collection">RangeSet</a>&lt;E&gt;</span>&nbsp;<span class="element-name">create</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;E&gt;&nbsp;elementType,
boolean&nbsp;isMinIncluded,
boolean&nbsp;isMaxIncluded)</span></div>
<div class="block">Constructs an initially empty set of ranges.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>E</code> - the type of range elements.</dd>
<dt>Parameters:</dt>
<dd><code>element­Type</code> - the type of the range elements.</dd>
<dd><code>is­Min­Included</code> - <code>true</code> if the minimal values are inclusive, or <code>false</code> if exclusive.</dd>
<dd><code>is­Max­Included</code> - <code>true</code> if the maximal values are inclusive, or <code>false</code> if exclusive.</dd>
<dt>Returns:</dt>
<dd>a new range set for range elements of the given type.</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="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</span>&nbsp;<span class="element-name">getElementType</span>()</div>
<div class="block">Returns the type of elements in this <em>collection</em>, which is always <code>Range</code>.
This is not the type of minimal and maximal values in range objects.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="CheckedContainer.html#getElementType()">get­Element­Type</a></code>&nbsp;in interface&nbsp;<code><a href="CheckedContainer.html" title="interface in org.apache.sis.util.collection">Checked­Container</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</code></dd>
<dt>Returns:</dt>
<dd>the element type.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="comparator()">
<h3>comparator</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/Comparator.html" title="class or interface in java.util" class="external-link">Comparator</a>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</span>&nbsp;<span class="element-name">comparator</span>()</div>
<div class="block">Returns the comparator associated with this sorted set.</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/SortedSet.html#comparator()" title="class or interface in java.util" class="external-link">comparator</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html" title="class or interface in java.util" class="external-link">Sorted­Set</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</code></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 set of ranges.</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="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&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="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&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="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;&gt;</code></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 ranges in this set.</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="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&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="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&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="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;&gt;</code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="trimToSize()">
<h3>trimToSize</h3>
<div class="member-signature"><span class="modifiers">public final</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">trimToSize</span>()</div>
<div class="block">Trims this set to the minimal amount of memory required for holding its data.
This method may be invoked after all elements have been <a href="#add(org.apache.sis.measure.Range)">added</a>
in order to free unused memory.</div>
</section>
</li>
<li>
<section class="detail" id="add(org.apache.sis.measure.Range)">
<h3>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="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&nbsp;range)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/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">Adds a range to this set. If the specified range overlaps existing ranges,
then the existing ranges will be merged as of <a href="../../measure/Range.html#union(org.apache.sis.measure.Range)"><code>Range​.union(Range)</code></a>.
In other words, invoking this method may <strong>reduce</strong> the
<a href="#size()">size</a> of this set.
<p>The default implementation does nothing if the given range <a href="../../measure/Range.html#isEmpty()">is
empty</a>. Otherwise this method ensures that the <code>is­Min­Included</code> and <code>is­Max­Included</code>
match the ones given to the constructor of this <code>Range­Set</code>, then delegates to
<a href="#add(E,E)"><code>add(Comparable, Comparable)</code></a>.</p></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="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&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="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&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="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>range</code> - the range to add.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if this set changed as a result of this method call.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/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 <code>is­Min­Included</code> or <code>is­Max­Included</code>
property does not match the one given at this <code>Range­Set</code> constructor.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="add(E,E)">
<h3 id="add(java.lang.Comparable,java.lang.Comparable)">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="RangeSet.html" title="type parameter in RangeSet">E</a>&nbsp;minValue,
<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&nbsp;maxValue)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/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">Adds a range of values to this set. If the specified range overlaps existing ranges, then
the existing ranges will be merged. This may result in smaller <a href="#size()">size</a>
of this set.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>min­Value</code> - the minimal value.</dd>
<dd><code>max­Value</code> - the maximal value.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if this set changed as a result of this method call.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">Illegal­Argument­Exception</a></code> - if <code>min­Value</code> is greater than <code>max­Value</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="remove(java.lang.Object)">
<h3>remove</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">remove</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;object)</span></div>
<div class="block">Removes a range from this set. If the specified range is inside an existing range, then the
existing range may be splitted in two smaller ranges as of <a href="../../measure/Range.html#subtract(org.apache.sis.measure.Range)"><code>Range​.subtract(Range)</code></a>.
In other words, invoking this method may <strong>increase</strong> the
<a href="#size()">size</a> of this set.
<p>The <code>is­Min­Included</code> and <code>is­Max­Included</code> properties of the given range
shall be the complement of the ones given to the constructor of this <code>Range­Set</code>:</p>
<table class="sis">
<caption>Expected bounds inclusion</caption>
<tr><th><code>add(…)</code> values</th> <th><code>remove(…)</code> values</th></tr>
<tr><td><code>[min … max]</code></td> <td><code>(min … max)</code></td></tr>
<tr><td><code>(min … max)</code></td> <td><code>[min … max]</code></td></tr>
<tr><td><code>[min … max)</code></td> <td><code>(min … max]</code></td></tr>
<tr><td><code>(min … max]</code></td> <td><code>[min … max)</code></td></tr>
</table>
<p>The default implementation does nothing if the given object is <code>null</code>, or is not an
instance of <code>Range</code>, or <a href="../../measure/Range.html#isEmpty()">is empty</a>, or its element type is
not equals to the element type of the ranges of this set. Otherwise this method ensures that
the <code>is­Min­Included</code> and <code>is­Max­Included</code> are consistent with the ones given to the
constructor of this <code>Range­Set</code>, then delegates to <a href="#remove(E,E)"><code>remove(Comparable, Comparable)</code></a>.</p></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#remove(java.lang.Object)" title="class or interface in java.util" class="external-link">remove</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="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&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#remove(java.lang.Object)" title="class or interface in java.util" class="external-link">remove</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="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&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#remove(java.lang.Object)" title="class or interface in java.util" class="external-link">remove</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="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>object</code> - the range to remove.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if this set changed as a result of this method call.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/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 <code>is­Min­Included</code> or <code>is­Max­Included</code>
property is not the complement of the one given at this <code>Range­Set</code> constructor.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="remove(E,E)">
<h3 id="remove(java.lang.Comparable,java.lang.Comparable)">remove</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">remove</span><wbr><span class="parameters">(<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&nbsp;minValue,
<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&nbsp;maxValue)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/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">Removes a range of values to this set. If the specified range in inside an existing ranges,
then the existing range may be splitted in two smaller ranges. This may result in greater
<a href="#size()">size</a> of this set.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>min­Value</code> - the minimal value.</dd>
<dd><code>max­Value</code> - the maximal value.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if this set changed as a result of this method call.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">Illegal­Argument­Exception</a></code> - if <code>min­Value</code> is greater than <code>max­Value</code>.</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;object)</span></div>
<div class="block">Returns <code>true</code> if the given object is an instance of <a href="../../measure/Range.html" title="class in org.apache.sis.measure"><code>Range</code></a> compatible
with this set and contained inside one of the range elements of this set.
If this method returns <code>true</code>, then:
<ul>
<li>Invoking <a href="#add(org.apache.sis.measure.Range)"><code>add(Range)</code></a> is guaranteed to have no effect.</li>
<li>Invoking <a href="#remove(java.lang.Object)"><code>remove(Object)</code></a> is guaranteed to modify this set.</li>
</ul>
Conversely, if this method returns <code>false</code>, then:
<ul>
<li>Invoking <a href="#add(org.apache.sis.measure.Range)"><code>add(Range)</code></a> is guaranteed to modify this set.</li>
<li>Invoking <a href="#remove(java.lang.Object)"><code>remove(Object)</code></a> may or may not modify this set.
The consequence of invoking <code>remove(…)</code> is undetermined because it
depends on whether the given range is outside every ranges in this set,
or if it overlaps with at least one range.</li>
</ul>
The default implementation checks the type of the given object, then delegates to
<code><a href="#contains(org.apache.sis.measure.Range,boolean)">contains</a>(object, false)</code>.</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="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&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="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&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="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>object</code> - the object to check for inclusion in this set.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the given object is contained in this set.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="contains(org.apache.sis.measure.Range,boolean)">
<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="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&nbsp;range,
boolean&nbsp;exact)</span></div>
<div class="block">Returns <code>true</code> if this set contains the specified element.
<ul>
<li>If the <code>exact</code> argument is <code>true</code>, then this method searches
for an exact match (i.e. this method doesn't check if the given range is
contained in a larger range).</li>
<li>If the <code>exact</code> argument is <code>false</code>, then this method
behaves as documented in the <a href="#contains(java.lang.Object)"><code>contains(Object)</code></a> method.</li>
</ul></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>range</code> - the range to check for inclusion in this set.</dd>
<dd><code>exact</code> - <code>true</code> for searching for an exact match,
or <code>false</code> for searching for inclusion in any range.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the given object is contained in this set.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="first()">
<h3>first</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;</span>&nbsp;<span class="element-name">first</span>()
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/NoSuchElementException.html" title="class or interface in java.util" class="external-link">NoSuchElementException</a></span></div>
<div class="block">Returns the first (lowest) range currently in this sorted set.</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/SortedSet.html#first()" title="class or interface in java.util" class="external-link">first</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html" title="class or interface in java.util" class="external-link">Sorted­Set</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</code></dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/NoSuchElementException.html" title="class or interface in java.util" class="external-link">No­Such­Element­Exception</a></code> - if this set is empty.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="last()">
<h3>last</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;</span>&nbsp;<span class="element-name">last</span>()
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/NoSuchElementException.html" title="class or interface in java.util" class="external-link">NoSuchElementException</a></span></div>
<div class="block">Returns the last (highest) range currently in this sorted set.</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/SortedSet.html#last()" title="class or interface in java.util" class="external-link">last</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html" title="class or interface in java.util" class="external-link">Sorted­Set</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</code></dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/NoSuchElementException.html" title="class or interface in java.util" class="external-link">No­Such­Element­Exception</a></code> - if the set is empty.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="intersect(org.apache.sis.measure.Range)">
<h3>intersect</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/SortedSet.html" title="class or interface in java.util" class="external-link">SortedSet</a>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</span>&nbsp;<span class="element-name">intersect</span><wbr><span class="parameters">(<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&nbsp;subRange)</span></div>
<div class="block">Returns a view of the portion of this range set which is the intersection of
this <code>Range­Set</code> with the given range. Changes in this <code>Range­Set</code>
will be reflected in the returned view, and conversely.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>sub­Range</code> - the range to intersect with this <code>Range­Set</code>.</dd>
<dt>Returns:</dt>
<dd>a view of the specified range within this range set.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="subSet(org.apache.sis.measure.Range,org.apache.sis.measure.Range)">
<h3>subSet</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/SortedSet.html" title="class or interface in java.util" class="external-link">SortedSet</a>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</span>&nbsp;<span class="element-name">subSet</span><wbr><span class="parameters">(<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&nbsp;lower,
<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&nbsp;upper)</span></div>
<div class="block">Returns a view of the portion of this sorted set whose elements range
from <code>lower</code>, inclusive, to <code>upper</code>, exclusive.
The default implementation is equivalent to the following pseudo-code
(omitting argument checks):
<div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../../copy.svg" alt="Copy snippet"></button>
<pre class="snippet"><code class="language-java">return intersect(new Range&lt;E&gt;(elementType,
lower.minValue, lower.isMinIncluded,
upper.minValue, !upper.isMinIncluded));
</code></pre>
</div>
<div class="note"><b>API note:</b>
This method takes the minimal value of the <code>upper</code> argument instead
than the maximal value because the upper endpoint is exclusive.</div></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/SortedSet.html#subSet(E,E)" title="class or interface in java.util" class="external-link">sub­Set</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html" title="class or interface in java.util" class="external-link">Sorted­Set</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>lower</code> - low endpoint (inclusive) of the sub set.</dd>
<dd><code>upper</code> - high endpoint (exclusive) of the sub set.</dd>
<dt>Returns:</dt>
<dd>a view of the specified range within this sorted set.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="#intersect(org.apache.sis.measure.Range)"><code>intersect(Range)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="headSet(org.apache.sis.measure.Range)">
<h3>headSet</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/SortedSet.html" title="class or interface in java.util" class="external-link">SortedSet</a>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</span>&nbsp;<span class="element-name">headSet</span><wbr><span class="parameters">(<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&nbsp;upper)</span></div>
<div class="block">Returns a view of the portion of this sorted set whose elements are
strictly less than <code>upper</code>.
The default implementation is equivalent to the same pseudo-code than the one
documented in the <a href="#subSet(org.apache.sis.measure.Range,org.apache.sis.measure.Range)"><code>sub­Set(Range, Range)</code></a> method, except that the lower
endpoint is <code>null</code>.</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/SortedSet.html#headSet(E)" title="class or interface in java.util" class="external-link">head­Set</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html" title="class or interface in java.util" class="external-link">Sorted­Set</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>upper</code> - high endpoint (exclusive) of the headSet.</dd>
<dt>Returns:</dt>
<dd>a view of the specified initial range of this sorted set.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="#intersect(org.apache.sis.measure.Range)"><code>intersect(Range)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="tailSet(org.apache.sis.measure.Range)">
<h3>tailSet</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/SortedSet.html" title="class or interface in java.util" class="external-link">SortedSet</a>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</span>&nbsp;<span class="element-name">tailSet</span><wbr><span class="parameters">(<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&nbsp;lower)</span></div>
<div class="block">Returns a view of the portion of this sorted set whose elements are
greater than or equal to <code>lower</code>.
The default implementation is equivalent to the same pseudo-code than the one
documented in the <a href="#subSet(org.apache.sis.measure.Range,org.apache.sis.measure.Range)"><code>sub­Set(Range, Range)</code></a> method, except that the upper
endpoint is <code>null</code>.</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/SortedSet.html#tailSet(E)" title="class or interface in java.util" class="external-link">tail­Set</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/SortedSet.html" title="class or interface in java.util" class="external-link">Sorted­Set</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>lower</code> - low endpoint (inclusive) of the tailSet.</dd>
<dt>Returns:</dt>
<dd>a view of the specified final range of this sorted set.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="#intersect(org.apache.sis.measure.Range)"><code>intersect(Range)</code></a></li>
</ul>
</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="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</span>&nbsp;<span class="element-name">iterator</span>()</div>
<div class="block">Returns an iterator over the elements in this set of ranges.
All elements are <a href="../../measure/Range.html" title="class in org.apache.sis.measure"><code>Range</code></a> objects.</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="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&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="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&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="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&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="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;&gt;</code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="indexOfRange(E)">
<h3 id="indexOfRange(java.lang.Comparable)">indexOfRange</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">indexOfRange</span><wbr><span class="parameters">(<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&nbsp;value)</span></div>
<div class="block">If the specified value is inside a range, returns the index of this range.
Otherwise, returns <code>-1</code>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - the value to search.</dd>
<dt>Returns:</dt>
<dd>the index of the range which contains this value, or -1 if there is no such range.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="indexOfMin(E)">
<h3 id="indexOfMin(java.lang.Comparable)">indexOfMin</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">indexOfMin</span><wbr><span class="parameters">(<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&nbsp;value)</span></div>
<div class="block">Returns the index of the range having a minimum value equal or lower than the specified value.
If the given value is lower than the minimal value of all ranges in this set,
then this method returns -1.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - the minimum value to search, ignoring inclusiveness/exclusiveness.</dd>
<dt>Returns:</dt>
<dd>index of the range having a minimum value equal or lower than the specified value. May be -1.</dd>
<dt>Since:</dt>
<dd>1.4</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="indexOfMax(E)">
<h3 id="indexOfMax(java.lang.Comparable)">indexOfMax</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">indexOfMax</span><wbr><span class="parameters">(<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&nbsp;value)</span></div>
<div class="block">Returns the index of the range having a maximum value equal or greater than the specified value.
If the given value is greater than the maximal value of all ranges in this set,
then this method returns <a href="#size()"><code>size()</code></a>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>value</code> - the maximum value to search, ignoring inclusiveness/exclusiveness.</dd>
<dt>Returns:</dt>
<dd>index of the range having a maximum value equal or greater than the specified value.
May be <a href="#size()"><code>size()</code></a>.</dd>
<dt>Since:</dt>
<dd>1.4</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMinLong(int)">
<h3>getMinLong</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name">getMinLong</span><wbr><span class="parameters">(int&nbsp;index)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a>,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></span></div>
<div class="block">Returns a <a href="../../measure/Range.html#getMinValue()">range minimum value</a> as a <code>long</code>.
The <code>index</code> can be any value from 0 inclusive to the set <a href="#size()"><code>size</code></a>
exclusive. The returned values always increase with <code>index</code>.
Widening conversions are performed as needed.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>index</code> - the range index, from 0 inclusive to <a href="#size()"><code>size</code></a> exclusive.</dd>
<dt>Returns:</dt>
<dd>the minimum value for the range at the specified index.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</a></code> - if <code>index</code> is out of bounds.</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">Class­Cast­Exception</a></code> - if range elements are not convertible to <code>long</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMinDouble(int)">
<h3>getMinDouble</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getMinDouble</span><wbr><span class="parameters">(int&nbsp;index)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a>,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></span></div>
<div class="block">Returns a <a href="../../measure/Range.html#getMinValue()">range minimum value</a> as a <code>double</code>.
The <code>index</code> can be any value from 0 inclusive to the set <a href="#size()"><code>size</code></a>
exclusive. The returned values always increase with <code>index</code>.
Widening conversions are performed as needed.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>index</code> - the range index, from 0 inclusive to <a href="#size()"><code>size</code></a> exclusive.</dd>
<dt>Returns:</dt>
<dd>the minimum value for the range at the specified index.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</a></code> - if <code>index</code> is out of bounds.</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">Class­Cast­Exception</a></code> - if range elements are not convertible to numbers.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../../measure/NumberRange.html#getMinDouble()"><code>Number­Range​.get­Min­Double()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMaxLong(int)">
<h3>getMaxLong</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name">getMaxLong</span><wbr><span class="parameters">(int&nbsp;index)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a>,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></span></div>
<div class="block">Returns a <a href="../../measure/Range.html#getMaxValue()">range maximum value</a> as a <code>long</code>.
The <code>index</code> can be any value from 0 inclusive to the set <a href="#size()"><code>size</code></a>
exclusive. The returned values always increase with <code>index</code>.
Widening conversions are performed as needed.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>index</code> - the range index, from 0 inclusive to <a href="#size()"><code>size</code></a> exclusive.</dd>
<dt>Returns:</dt>
<dd>the maximum value for the range at the specified index.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</a></code> - if <code>index</code> is out of bounds.</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">Class­Cast­Exception</a></code> - if range elements are not convertible to <code>long</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getMaxDouble(int)">
<h3>getMaxDouble</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getMaxDouble</span><wbr><span class="parameters">(int&nbsp;index)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">IndexOutOfBoundsException</a>,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></span></div>
<div class="block">Returns a <a href="../../measure/Range.html#getMaxValue()">range maximum value</a> as a <code>double</code>.
The <code>index</code> can be any value from 0 inclusive to the set's <a href="#size()"><code>size</code></a>
exclusive. The returned values always increase with <code>index</code>.
Widening conversions are performed as needed.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>index</code> - the range index, from 0 inclusive to <a href="#size()"><code>size</code></a> exclusive.</dd>
<dt>Returns:</dt>
<dd>the maximum value for the range at the specified index.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang" class="external-link">Index­Out­Of­Bounds­Exception</a></code> - if <code>index</code> is out of bounds.</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">Class­Cast­Exception</a></code> - if range elements are not convertible to numbers.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../../measure/NumberRange.html#getMaxDouble()"><code>Number­Range​.get­Max­Double()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="newRange(E,E)">
<h3 id="newRange(java.lang.Comparable,java.lang.Comparable)">newRange</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="return-type"><a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;</span>&nbsp;<span class="element-name">newRange</span><wbr><span class="parameters">(<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&nbsp;lower,
<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&nbsp;upper)</span></div>
<div class="block">Returns a new <a href="../../measure/Range.html" title="class in org.apache.sis.measure"><code>Range</code></a> object initialized with the given values.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>lower</code> - the lower value, inclusive.</dd>
<dd><code>upper</code> - the upper value, exclusive.</dd>
<dt>Returns:</dt>
<dd>the new range for the given values.</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/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;object)</span></div>
<div class="block">Compares the specified object with this set of ranges for equality.</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#equals(java.lang.Object)" title="class or interface in java.util" class="external-link">equals</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="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&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#equals(java.lang.Object)" title="class or interface in java.util" class="external-link">equals</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="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;</code></dd>
<dt>Overrides:</dt>
<dd><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></code>&nbsp;in class&nbsp;<code><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">Abstract­Set</a>&lt;<a href="../../measure/Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a> extends <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;? super <a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;&gt;&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>object</code> - the object to compare with this range.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the given object is equal to this range.</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="RangeSet.html" title="class in org.apache.sis.util.collection">RangeSet</a>&lt;<a href="RangeSet.html" title="type parameter in RangeSet">E</a>&gt;</span>&nbsp;<span class="element-name">clone</span>()</div>
<div class="block">Returns a clone of this range set.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><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></code>&nbsp;in class&nbsp;<code><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></code></dd>
<dt>Returns:</dt>
<dd>a clone of this range set.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>