blob: f181e0c5dbf9b28e81e6f94a5ff7d6d8ec6f3dcb [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 -->
<title>MeasurementRange (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.measure, class: MeasurementRange">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.measure.MeasurementRange class">
<meta name="keywords" content="create()">
<meta name="keywords" content="createGreaterThan()">
<meta name="keywords" content="createBestFit()">
<meta name="keywords" content="unit()">
<meta name="keywords" content="convertTo()">
<meta name="keywords" content="castTo()">
<meta name="keywords" content="contains()">
<meta name="keywords" content="intersects()">
<meta name="keywords" content="intersect()">
<meta name="keywords" content="union()">
<meta name="keywords" content="subtract()">
<meta name="keywords" content="equals()">
<meta name="keywords" content="hashCode()">
<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>Field</li>
<li><a href="#constructor-summary">Constr</a></li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li>Field</li>
<li><a href="#constructor-detail">Constr</a></li>
<li><a href="#method-detail">Method</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><a href="../../../../../search.html">SEARCH</a>
<input type="text" id="search-input" disabled placeholder="Search">
<input type="reset" id="reset-button" disabled value="reset">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="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.measure</a></div>
<h1 title="Class MeasurementRange" class="title">Class MeasurementRange&lt;E extends <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">Number</a> &amp; <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="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;E&gt;
<div class="inheritance"><a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a>&lt;E&gt;
<div class="inheritance">MeasurementRange&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 as a subclass of <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>.</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/util/Formattable.html" title="class or interface in java.util" class="external-link">Formattable</a></code>, <code><a href="../util/collection/CheckedContainer.html" title="interface in org.apache.sis.util.collection">Checked­Container</a>&lt;E&gt;</code>, <code><a href="../util/Emptiable.html" title="interface in org.apache.sis.util">Emptiable</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">MeasurementRange&lt;E extends <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">Number</a> &amp; <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="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a>&lt;E&gt;</span></div>
<div class="block">A range of numbers associated with a unit of measurement. All operations performed by this
class (<a href="#union(org.apache.sis.measure.Range)">union</a>, <a href="#intersect(org.apache.sis.measure.Range)">intersection</a>, <i>etc.</i>) are
performed in the unit of measurement of <code>this</code> range object - values of the range
object given in argument are converted if needed before an operation is applied.
<p>Other methods defined in this class:</p>
<ul>
<li>Convenience <code>create(…)</code> static methods for every floating point primitive types.
Usage of <code>Measurement­Range</code> with integer types is possible, but no convenience
method is provided for integers because they are usually not representative of the
nature of physical measurements.</li>
<li><a href="#unit()"><code>unit()</code></a> for getting the unit of measurement associated to this range.</li>
<li><a href="#convertTo(javax.measure.Unit)"><code>convert­To(Unit)</code></a> for converting the unit of measurement.</li>
<li><a href="#castTo(java.lang.Class)"><code>cast­To(Class)</code></a> for casting the range values to another type.</li>
</ul>
<h2 id="null-unit-of-measurement-heading">Null unit of measurement</h2>
The unit of measurement should not be null, otherwise a <a href="NumberRange.html" title="class in org.apache.sis.measure"><code>Number­Range</code></a> should be used
instead of <code>Measurement­Range</code>. Nevertheless this class is tolerant to <code>null</code>
units in order to support situations where a unit of measurement <em>should</em> be specified,
but for some reason is unavailable. If the unit of measurement become known at a later stage,
it can be specified by a call to <a href="#convertTo(javax.measure.Unit)"><code>convert­To(Unit)</code></a>.
<h2 id="immutability-and-thread-safety-heading">Immutability and thread safety</h2>
This class is immutable and thus inherently thread-safe.
Subclasses may or may not be immutable, at implementation choice. But implementers are
encouraged to make sure that subclasses remain immutable for more predictable behavior.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>0.3</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="RangeFormat.html" title="class in org.apache.sis.measure"><code>Range­Format</code></a></li>
<li><a href="../util/collection/RangeSet.html" title="class in org.apache.sis.util.collection"><code>Range­Set</code></a></li>
<li><a href="../../../../../serialized-form.html#org.apache.sis.measure.MeasurementRange">Serialized Form</a></li>
</ul>
</dd>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(java.lang.Class,E,boolean,E,boolean,javax.measure.Unit)" class="member-name-link">Measurement­Range</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="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;&nbsp;type,
<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&nbsp;min­Value,
boolean&nbsp;is­Min­Included,
<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&nbsp;max­Value,
boolean&nbsp;is­Max­Included,
<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;unit)</code></div>
<div class="col-last even-row-color">
<div class="block">Constructs a range of <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> objects.</div>
</div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(java.lang.Class,org.apache.sis.measure.ValueRange,javax.measure.Unit)" class="member-name-link">Measurement­Range</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="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;&nbsp;type,
<a href="ValueRange.html" title="annotation interface in org.apache.sis.measure">Value­Range</a>&nbsp;range,
<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;unit)</code></div>
<div class="col-last odd-row-color">
<div class="block">Constructs a range of the given type with values from the given annotation.</div>
</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.apache.sis.measure.Range,javax.measure.Unit)" class="member-name-link">Measurement­Range</a><wbr>(<a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;&nbsp;range,
<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;unit)</code></div>
<div class="col-last even-row-color">
<div class="block">Constructs a range with the same values than the specified range and the given unit.</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>&lt;N extends <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">Number</a> &amp; <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 N&gt;&gt;<br><a href="MeasurementRange.html" title="class in org.apache.sis.measure">Measurement­Range</a><wbr>&lt;N&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#castTo(java.lang.Class)" class="member-name-link">cast­To</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;N&gt;&nbsp;type)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Casts this range to the specified type.</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(org.apache.sis.measure.Range)" class="member-name-link">contains</a><wbr>(<a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;? extends <a href="MeasurementRange.html" title="type parameter in MeasurementRange">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">Returns <code>true</code> if the supplied range is fully contained within this range.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="MeasurementRange.html" title="class in org.apache.sis.measure">Measurement­Range</a><wbr>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">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="#convertTo(javax.measure.Unit)" class="member-name-link">convert­To</a><wbr>(<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;target­Unit)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Converts this range to the specified unit.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="MeasurementRange.html" title="class in org.apache.sis.measure">Measurement­Range</a><wbr>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html" title="class or interface in java.lang" class="external-link">Double</a>&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(double,boolean,double,boolean,javax.measure.Unit)" class="member-name-link">create</a><wbr>(double&nbsp;min­Value,
boolean&nbsp;is­Min­Included,
double&nbsp;max­Value,
boolean&nbsp;is­Max­Included,
<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;unit)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Constructs a range of <code>double</code> values.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="MeasurementRange.html" title="class in org.apache.sis.measure">Measurement­Range</a><wbr>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Float.html" title="class or interface in java.lang" class="external-link">Float</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#create(float,boolean,float,boolean,javax.measure.Unit)" class="member-name-link">create</a><wbr>(float&nbsp;min­Value,
boolean&nbsp;is­Min­Included,
float&nbsp;max­Value,
boolean&nbsp;is­Max­Included,
<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;unit)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Constructs a range of <code>float</code> values.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="MeasurementRange.html" title="class in org.apache.sis.measure">Measurement­Range</a><wbr>&lt;?&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createBestFit(java.lang.Number,boolean,java.lang.Number,boolean,javax.measure.Unit)" class="member-name-link">create­Best­Fit</a><wbr>(<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">Number</a>&nbsp;min­Value,
boolean&nbsp;is­Min­Included,
<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">Number</a>&nbsp;max­Value,
boolean&nbsp;is­Max­Included,
<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;unit)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Constructs a range using the smallest type of <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> that can hold the given values.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="MeasurementRange.html" title="class in org.apache.sis.measure">Measurement­Range</a><wbr>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html" title="class or interface in java.lang" class="external-link">Double</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createGreaterThan(double,javax.measure.Unit)" class="member-name-link">create­Greater­Than</a><wbr>(double&nbsp;min­Value,
<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;unit)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Constructs a range of <code>double</code> values greater than the given value.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#equals(java.lang.Object)" class="member-name-link">equals</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/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">Compares this measurement range with the specified object for equality.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#hashCode()" class="member-name-link">hash­Code</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a hash code value for this measurement range.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Range.html" title="class in org.apache.sis.measure">Range</a><wbr>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">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="#intersect(org.apache.sis.measure.Range)" class="member-name-link">intersect</a><wbr>(<a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">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">Returns the intersection between this range and the given range.</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="#intersects(org.apache.sis.measure.Range)" class="member-name-link">intersects</a><wbr>(<a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;? extends <a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;&nbsp;range)</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 range intersects the given range.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">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="#subtract(org.apache.sis.measure.Range)" class="member-name-link">subtract</a><wbr>(<a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">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">Returns the range of values that are in this range but not in 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="Range.html" title="class in org.apache.sis.measure">Range</a><wbr>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">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="#union(org.apache.sis.measure.Range)" class="member-name-link">union</a><wbr>(<a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;&nbsp;range)</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 union of this range with the given range.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a><wbr>&lt;?&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#unit()" class="member-name-link">unit</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 unit of measurement, or <code>null</code> if unknown.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-NumberRange">Methods inherited from class&nbsp;<a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a></h3>
<code><a href="NumberRange.html#castOrCopy(org.apache.sis.measure.Range)">cast­Or­Copy</a>, <a href="NumberRange.html#containsAny(java.lang.Number)">contains­Any</a>, <a href="NumberRange.html#containsAny(org.apache.sis.measure.NumberRange)">contains­Any</a>, <a href="NumberRange.html#create(byte,boolean,byte,boolean)">create</a>, <a href="NumberRange.html#create(double,boolean,double,boolean)">create</a>, <a href="NumberRange.html#create(float,boolean,float,boolean)">create</a>, <a href="NumberRange.html#create(int,boolean,int,boolean)">create</a>, <a href="NumberRange.html#create(long,boolean,long,boolean)">create</a>, <a href="NumberRange.html#create(short,boolean,short,boolean)">create</a>, <a href="NumberRange.html#create(java.lang.Class,N)">create</a>, <a href="NumberRange.html#createBestFit(boolean,java.lang.Number,boolean,java.lang.Number,boolean)">create­Best­Fit</a>, <a href="NumberRange.html#createBestFit(java.lang.Number,boolean,java.lang.Number,boolean)">create­Best­Fit</a>, <a href="NumberRange.html#createLeftBounded(int,boolean)">create­Left­Bounded</a>, <a href="NumberRange.html#getMaxDouble()">get­Max­Double</a>, <a href="NumberRange.html#getMaxDouble(boolean)">get­Max­Double</a>, <a href="NumberRange.html#getMedian()">get­Median</a>, <a href="NumberRange.html#getMinDouble()">get­Min­Double</a>, <a href="NumberRange.html#getMinDouble(boolean)">get­Min­Double</a>, <a href="NumberRange.html#getSpan()">get­Span</a>, <a href="NumberRange.html#intersectAny(org.apache.sis.measure.NumberRange)">intersect­Any</a>, <a href="NumberRange.html#intersectsAny(org.apache.sis.measure.NumberRange)">intersects­Any</a>, <a href="NumberRange.html#subtractAny(org.apache.sis.measure.NumberRange)">subtract­Any</a>, <a href="NumberRange.html#transform(org.opengis.referencing.operation.MathTransform1D)">transform</a>, <a href="NumberRange.html#unionAny(org.apache.sis.measure.NumberRange)">union­Any</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Range">Methods inherited from class&nbsp;<a href="Range.html" title="class in org.apache.sis.measure">Range</a></h3>
<code><a href="Range.html#contains(E)">contains</a>, <a href="Range.html#formatTo(java.util.Formatter,int,int,int)">format­To</a>, <a href="Range.html#getElementType()">get­Element­Type</a>, <a href="Range.html#getMaxValue()">get­Max­Value</a>, <a href="Range.html#getMinValue()">get­Min­Value</a>, <a href="Range.html#isBounded()">is­Bounded</a>, <a href="Range.html#isEmpty()">is­Empty</a>, <a href="Range.html#isMaxIncluded()">is­Max­Included</a>, <a href="Range.html#isMinIncluded()">is­Min­Included</a>, <a href="Range.html#toString()">to­String</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Object">Methods inherited from class&nbsp;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">get­Class</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notify­All</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;(org.apache.sis.measure.Range,javax.measure.Unit)">
<h3>MeasurementRange</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">MeasurementRange</span><wbr><span class="parameters">(<a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;&nbsp;range,
<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;unit)</span></div>
<div class="block">Constructs a range with the same values than the specified range and the given unit.
This is a copy constructor, with the addition of a unit of measurement.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>range</code> - the range to copy. The elements must be <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> instances.</dd>
<dd><code>unit</code> - the unit of measurement, or <code>null</code> if unknown.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(java.lang.Class,org.apache.sis.measure.ValueRange,javax.measure.Unit)">
<h3>MeasurementRange</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">MeasurementRange</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="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;&nbsp;type,
<a href="ValueRange.html" title="annotation interface in org.apache.sis.measure">ValueRange</a>&nbsp;range,
<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;unit)</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">Constructs a range of the given type with values from the given annotation.
This constructor does not verify if the given type is wide enough for the values of
the given annotation, because those information are usually static. If nevertheless
the given type is not wide enough, then the values are truncated in the same way
than the Java language casts primitive types.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>type</code> - the element type, restricted to one of <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Byte.html" title="class or interface in java.lang" class="external-link"><code>Byte</code></a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Short.html" title="class or interface in java.lang" class="external-link"><code>Short</code></a>,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link"><code>Integer</code></a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Long.html" title="class or interface in java.lang" class="external-link"><code>Long</code></a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Float.html" title="class or interface in java.lang" class="external-link"><code>Float</code></a> or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html" title="class or interface in java.lang" class="external-link"><code>Double</code></a>.</dd>
<dd><code>range</code> - the range of values.</dd>
<dd><code>unit</code> - the unit of measurement, or <code>null</code> if unknown.</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 given type is not one of the primitive wrappers for numeric types.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(java.lang.Class,E,boolean,E,boolean,javax.measure.Unit)">
<h3 id="&lt;init&gt;(java.lang.Class,java.lang.Number,boolean,java.lang.Number,boolean,javax.measure.Unit)">MeasurementRange</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">MeasurementRange</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="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;&nbsp;type,
<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&nbsp;minValue,
boolean&nbsp;isMinIncluded,
<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&nbsp;maxValue,
boolean&nbsp;isMaxIncluded,
<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;unit)</span></div>
<div class="block">Constructs a range of <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> objects.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>type</code> - the element type, usually one of <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Float.html" title="class or interface in java.lang" class="external-link"><code>Float</code></a> or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html" title="class or interface in java.lang" class="external-link"><code>Double</code></a>.</dd>
<dd><code>min­Value</code> - the minimal value, or <code>null</code> if none.</dd>
<dd><code>is­Min­Included</code> - <code>true</code> if the minimal value is inclusive, or <code>false</code> if exclusive.</dd>
<dd><code>max­Value</code> - the maximal value, or <code>null</code> if none.</dd>
<dd><code>is­Max­Included</code> - <code>true</code> if the maximal value is inclusive, or <code>false</code> if exclusive.</dd>
<dd><code>unit</code> - the unit of measurement, or <code>null</code> if unknown.</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(float,boolean,float,boolean,javax.measure.Unit)">
<h3>create</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="MeasurementRange.html" title="class in org.apache.sis.measure">MeasurementRange</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Float.html" title="class or interface in java.lang" class="external-link">Float</a>&gt;</span>&nbsp;<span class="element-name">create</span><wbr><span class="parameters">(float&nbsp;minValue,
boolean&nbsp;isMinIncluded,
float&nbsp;maxValue,
boolean&nbsp;isMaxIncluded,
<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;unit)</span></div>
<div class="block">Constructs a range of <code>float</code> values.
The minimum and maximum values cannot be NaN but can be infinite.
If the minimum is greater than the maximum, then the range <a href="Range.html#isEmpty()">is empty</a>.
This method may return a shared instance, at implementation choice.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>min­Value</code> - the minimal value, or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Float.html#NEGATIVE_INFINITY" title="class or interface in java.lang" class="external-link"><code>Float​.NEGATIVE_INFINITY</code></a> if none.</dd>
<dd><code>is­Min­Included</code> - <code>true</code> if the minimal value is inclusive, or <code>false</code> if exclusive.</dd>
<dd><code>max­Value</code> - the maximal value, or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Float.html#POSITIVE_INFINITY" title="class or interface in java.lang" class="external-link"><code>Float​.POSITIVE_INFINITY</code></a> if none.</dd>
<dd><code>is­Max­Included</code> - <code>true</code> if the maximal value is inclusive, or <code>false</code> if exclusive.</dd>
<dd><code>unit</code> - the unit of measurement, or <code>null</code> if unknown.</dd>
<dt>Returns:</dt>
<dd>the new range of numeric values for the given endpoints and unit of measurement.</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 <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Float.html#isNaN(float)" title="class or interface in java.lang" class="external-link"><code>Float​.is­Na­N(float)</code></a> is <code>true</code> for a given value.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="create(double,boolean,double,boolean,javax.measure.Unit)">
<h3>create</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="MeasurementRange.html" title="class in org.apache.sis.measure">MeasurementRange</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html" title="class or interface in java.lang" class="external-link">Double</a>&gt;</span>&nbsp;<span class="element-name">create</span><wbr><span class="parameters">(double&nbsp;minValue,
boolean&nbsp;isMinIncluded,
double&nbsp;maxValue,
boolean&nbsp;isMaxIncluded,
<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;unit)</span></div>
<div class="block">Constructs a range of <code>double</code> values.
The minimum and maximum values cannot be NaN but can be infinite.
If the minimum is greater than the maximum, then the range <a href="Range.html#isEmpty()">is empty</a>.
This method may return a shared instance, at implementation choice.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>min­Value</code> - the minimal value, or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NEGATIVE_INFINITY" title="class or interface in java.lang" class="external-link"><code>Double​.NEGATIVE_INFINITY</code></a> if none.</dd>
<dd><code>is­Min­Included</code> - <code>true</code> if the minimal value is inclusive, or <code>false</code> if exclusive.</dd>
<dd><code>max­Value</code> - the maximal value, or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#POSITIVE_INFINITY" title="class or interface in java.lang" class="external-link"><code>Double​.POSITIVE_INFINITY</code></a> if none.</dd>
<dd><code>is­Max­Included</code> - <code>true</code> if the maximal value is inclusive, or <code>false</code> if exclusive.</dd>
<dd><code>unit</code> - the unit of measurement, or <code>null</code> if unknown.</dd>
<dt>Returns:</dt>
<dd>the new range of numeric values for the given endpoints and unit of measurement.</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 <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#isNaN(double)" title="class or interface in java.lang" class="external-link"><code>Double​.is­Na­N(double)</code></a> is <code>true</code> for a given value.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createGreaterThan(double,javax.measure.Unit)">
<h3>createGreaterThan</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="MeasurementRange.html" title="class in org.apache.sis.measure">MeasurementRange</a>&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html" title="class or interface in java.lang" class="external-link">Double</a>&gt;</span>&nbsp;<span class="element-name">createGreaterThan</span><wbr><span class="parameters">(double&nbsp;minValue,
<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;unit)</span></div>
<div class="block">Constructs a range of <code>double</code> values greater than the given value.
The <code>min­Value</code> is often zero for creating a range of strictly positive values.
This method may return a shared instance, at implementation choice.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>min­Value</code> - the minimal value (exclusive), or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NEGATIVE_INFINITY" title="class or interface in java.lang" class="external-link"><code>Double​.NEGATIVE_INFINITY</code></a> if none.</dd>
<dd><code>unit</code> - the unit of measurement, or <code>null</code> if unknown.</dd>
<dt>Returns:</dt>
<dd>the new range of numeric values greater than the given value.</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 <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#isNaN(double)" title="class or interface in java.lang" class="external-link"><code>Double​.is­Na­N(double)</code></a> is <code>true</code> for the given value.</dd>
<dt>Since:</dt>
<dd>0.6</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createBestFit(java.lang.Number,boolean,java.lang.Number,boolean,javax.measure.Unit)">
<h3>createBestFit</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="MeasurementRange.html" title="class in org.apache.sis.measure">MeasurementRange</a>&lt;?&gt;</span>&nbsp;<span class="element-name">createBestFit</span><wbr><span class="parameters">(<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">Number</a>&nbsp;minValue,
boolean&nbsp;isMinIncluded,
<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">Number</a>&nbsp;maxValue,
boolean&nbsp;isMaxIncluded,
<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;unit)</span></div>
<div class="block">Constructs a range using the smallest type of <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> that can hold the given values.
This method performs the same work than <a href="NumberRange.html#createBestFit(java.lang.Number,boolean,java.lang.Number,boolean)"><code>Number­Range​.create­Best­Fit(…)</code></a>
with an additional <code>unit</code> argument.
<p>This method may return a shared instance, at implementation choice.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>min­Value</code> - the minimal value, or <code>null</code> if none.</dd>
<dd><code>is­Min­Included</code> - <code>true</code> if the minimal value is inclusive, or <code>false</code> if exclusive.</dd>
<dd><code>max­Value</code> - the maximal value, or <code>null</code> if none.</dd>
<dd><code>is­Max­Included</code> - <code>true</code> if the maximal value is inclusive, or <code>false</code> if exclusive.</dd>
<dd><code>unit</code> - the unit of measurement, or <code>null</code> if unknown.</dd>
<dt>Returns:</dt>
<dd>the new range, or <code>null</code> if both <code>min­Value</code> and <code>max­Value</code> are <code>null</code>.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="NumberRange.html#createBestFit(java.lang.Number,boolean,java.lang.Number,boolean)"><code>Number­Range​.create­Best­Fit(Number, boolean, Number, boolean)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="unit()">
<h3>unit</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;</span>&nbsp;<span class="element-name">unit</span>()</div>
<div class="block">Returns the unit of measurement, or <code>null</code> if unknown.
In principle the unit should never be null, otherwise a <a href="NumberRange.html" title="class in org.apache.sis.measure"><code>Number­Range</code></a> should have been used
instead of <code>Measurement­Range</code>. Nevertheless this method may return <code>null</code> if a unit
<em>should</em> exist but for some reason is unavailable.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the unit of measurement, or <code>null</code>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="convertTo(javax.measure.Unit)">
<h3>convertTo</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="MeasurementRange.html" title="class in org.apache.sis.measure">MeasurementRange</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;</span>&nbsp;<span class="element-name">convertTo</span><wbr><span class="parameters">(<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;?&gt;&nbsp;targetUnit)</span>
throws <span class="exceptions"><a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/IncommensurableException.html" title="class or interface in javax.measure" class="external-link">IncommensurableException</a></span></div>
<div class="block">Converts this range to the specified unit. If this measurement range has null unit,
then the specified target unit are simply assigned to the returned range with no
other changes.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>target­Unit</code> - the target unit, or <code>null</code> for keeping the unit unchanged.</dd>
<dt>Returns:</dt>
<dd>the converted range, or <code>this</code> if no conversion is needed.</dd>
<dt>Throws:</dt>
<dd><code><a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/IncommensurableException.html" title="class or interface in javax.measure" class="external-link">Incommensurable­Exception</a></code> - if the target unit are not compatible with this <a href="#unit()">range unit</a>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="castTo(java.lang.Class)">
<h3>castTo</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="type-parameters">&lt;N extends <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">Number</a> &amp; <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 N&gt;&gt;</span>
<span class="return-type"><a href="MeasurementRange.html" title="class in org.apache.sis.measure">MeasurementRange</a>&lt;N&gt;</span>&nbsp;<span class="element-name">castTo</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;N&gt;&nbsp;type)</span></div>
<div class="block">Casts this range to the specified type. If the cast from this range type to the given
type is a narrowing conversion, then the cast is performed according the rules of the
Java language: the high-order bytes are silently dropped.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="NumberRange.html#castTo(java.lang.Class)">cast­To</a></code>&nbsp;in class&nbsp;<code><a href="NumberRange.html" title="class in org.apache.sis.measure">Number­Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a> extends <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">Number</a> &amp; <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="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;&gt;</code></dd>
<dt>Type Parameters:</dt>
<dd><code>N</code> - the class to cast to.</dd>
<dt>Parameters:</dt>
<dd><code>type</code> - the class to cast to. Must be one of <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Byte.html" title="class or interface in java.lang" class="external-link"><code>Byte</code></a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Short.html" title="class or interface in java.lang" class="external-link"><code>Short</code></a>,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Integer.html" title="class or interface in java.lang" class="external-link"><code>Integer</code></a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Long.html" title="class or interface in java.lang" class="external-link"><code>Long</code></a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Float.html" title="class or interface in java.lang" class="external-link"><code>Float</code></a> or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html" title="class or interface in java.lang" class="external-link"><code>Double</code></a>.</dd>
<dt>Returns:</dt>
<dd>the casted range, or <code>this</code> if this range already uses the specified type.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="contains(org.apache.sis.measure.Range)">
<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="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;? extends <a href="MeasurementRange.html" title="type parameter in MeasurementRange">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">Returns <code>true</code> if the supplied range is fully contained within this range.
If the given range is an instance of <code>Measurement­Range</code>, then this method converts
the value of the other range to the unit of measurement of this range before to perform
the operation.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="Range.html#contains(org.apache.sis.measure.Range)">contains</a></code>&nbsp;in class&nbsp;<code><a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a> extends <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">Number</a> &amp; <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="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>range</code> - the range to check for inclusion in this range.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the given range is included in this range.</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 given range is an instance of
<code>Measurement­Range</code> using incommensurable unit of measurement.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="intersects(org.apache.sis.measure.Range)">
<h3>intersects</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">intersects</span><wbr><span class="parameters">(<a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;? extends <a href="MeasurementRange.html" title="type parameter in MeasurementRange">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">Returns <code>true</code> if this range intersects the given range.
If the given range is an instance of <code>Measurement­Range</code>, then this method converts
the value of the other range to the unit of measurement of this range before to perform
the operation.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="Range.html#intersects(org.apache.sis.measure.Range)">intersects</a></code>&nbsp;in class&nbsp;<code><a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a> extends <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">Number</a> &amp; <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="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>range</code> - the range to check for intersection with this range.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if the given range intersects this range.</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 given range is an instance of
<code>Measurement­Range</code> using incommensurable unit of measurement.</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="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;</span>&nbsp;<span class="element-name">intersect</span><wbr><span class="parameters">(<a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">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">Returns the intersection between this range and the given range.
If the given range is an instance of <code>Measurement­Range</code>, then this method converts
the value of the other range to the unit of measurement of this range before to perform
the operation.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="Range.html#intersect(org.apache.sis.measure.Range)">intersect</a></code>&nbsp;in class&nbsp;<code><a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a> extends <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">Number</a> &amp; <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="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>range</code> - the range to intersect.</dd>
<dt>Returns:</dt>
<dd>the intersection of this range with the given range.</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 given range is an instance of
<code>Measurement­Range</code> using incommensurable unit of measurement.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="union(org.apache.sis.measure.Range)">
<h3>union</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;</span>&nbsp;<span class="element-name">union</span><wbr><span class="parameters">(<a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">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">Returns the union of this range with the given range.
If the given range is an instance of <code>Measurement­Range</code>, then this method converts
the value of the other range to the unit of measurement of this range before to perform
the operation.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="Range.html#union(org.apache.sis.measure.Range)">union</a></code>&nbsp;in class&nbsp;<code><a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a> extends <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">Number</a> &amp; <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="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>range</code> - the range to add to this range.</dd>
<dt>Returns:</dt>
<dd>the union of this range with the given range.</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 given range is an instance of
<code>Measurement­Range</code> using incommensurable unit of measurement.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="subtract(org.apache.sis.measure.Range)">
<h3>subtract</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;[]</span>&nbsp;<span class="element-name">subtract</span><wbr><span class="parameters">(<a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">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">Returns the range of values that are in this range but not in the given range.
This method returns an array of length 0, 1 or 2:
<ul>
<li>If the given range contains fully this range, returns an array of length 0.</li>
<li>If the given range is in the middle of this range, then the subtraction results in
two disjoint ranges which will be returned as two elements in the array.</li>
<li>Otherwise returns an array of length 1.</li>
</ul>
If the given range is an instance of <code>Measurement­Range</code>, then this method converts
the value of the other range to the unit of measurement of this range before to perform
the operation.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="Range.html#subtract(org.apache.sis.measure.Range)">subtract</a></code>&nbsp;in class&nbsp;<code><a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a> extends <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">Number</a> &amp; <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="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>range</code> - the range to subtract.</dd>
<dt>Returns:</dt>
<dd>this range without the given range, as an array of length 0, 1 or 2.</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 given range is an instance of
<code>Measurement­Range</code> using incommensurable unit of measurement.</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 this measurement range with the specified object for equality. Two <code>Measurement­Range</code> instances
are considered equal if they met all conditions <a href="Range.html#equals(java.lang.Object)">documented in the parent class</a>
and their <a href="#unit()"><code>unit()</code></a> are equal in the sense of <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Objects.html#equals(java.lang.Object,java.lang.Object)" title="class or interface in java.util" class="external-link"><code>Objects​.equals(Object, Object)</code></a>.
Note that this comparison does not distinguish the various <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Float.html#NaN" title="class or interface in java.lang" class="external-link"><code>Float​.Na­N</code></a> or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link"><code>Double​.Na­N</code></a> bit patterns.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="Range.html#equals(java.lang.Object)">equals</a></code>&nbsp;in class&nbsp;<code><a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a> extends <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">Number</a> &amp; <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="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>object</code> - the object to compare with this range for equality.</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="hashCode()">
<h3>hashCode</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">hashCode</span>()</div>
<div class="block">Returns a hash code value for this measurement range.</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="Range.html#hashCode()">hash­Code</a></code>&nbsp;in class&nbsp;<code><a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;<a href="MeasurementRange.html" title="type parameter in MeasurementRange">E</a> extends <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">Number</a> &amp; <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="MeasurementRange.html" title="type parameter in MeasurementRange">E</a>&gt;&gt;</code></dd>
<dt>Returns:</dt>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</div>
</body>
</html>