| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 --> |
| <title>NumberRange (Apache SIS 1.0 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2019-09-20"> |
| <meta name="keywords" content="org.apache.sis.measure.NumberRange class"> |
| <meta name="keywords" content="create()"> |
| <meta name="keywords" content="createBestFit()"> |
| <meta name="keywords" content="createLeftBounded()"> |
| <meta name="keywords" content="castOrCopy()"> |
| <meta name="keywords" content="castTo()"> |
| <meta name="keywords" content="getMinDouble()"> |
| <meta name="keywords" content="getMaxDouble()"> |
| <meta name="keywords" content="containsAny()"> |
| <meta name="keywords" content="intersectsAny()"> |
| <meta name="keywords" content="intersectAny()"> |
| <meta name="keywords" content="unionAny()"> |
| <meta name="keywords" content="subtractAny()"> |
| <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="../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="NumberRange (Apache SIS 1.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":9,"i1":10,"i2":10,"i3":10,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../"; |
| var useModuleDirectories = false; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/NumberRange.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.sis.measure</a></div> |
| <h2 title="Class NumberRange" class="title">Class NumberRange<E extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a> & <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><? super E>></h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="Range.html" title="class in org.apache.sis.measure">Range</a><E></li> |
| <li> |
| <ul class="inheritance"> |
| <li>NumberRange<E></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>E</code> - the type of range elements as a subclass of <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Number</code></a>.</dd> |
| </dl> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io" class="externalLink">Serializable</a></code>, <code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Formattable.html?is-external=true" title="class or interface in java.util" class="externalLink">Formattable</a></code>, <code><a href="../util/collection/CheckedContainer.html" title="interface in org.apache.sis.util.collection">CheckedContainer</a><E></code>, <code><a href="../util/Emptiable.html" title="interface in org.apache.sis.util">Emptiable</a></code></dd> |
| </dl> |
| <dl> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><code><a href="MeasurementRange.html" title="class in org.apache.sis.measure">MeasurementRange</a></code></dd> |
| </dl> |
| <hr> |
| <pre>public class <span class="typeNameLabel">NumberRange<E extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a> & <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><? super E>></span> |
| extends <a href="Range.html" title="class in org.apache.sis.measure">Range</a><E></pre> |
| <div class="block">A range of numbers capable of widening conversions when performing range operations. |
| <code>NumberRange</code> has no unit of measurement. For a range of physical measurements |
| with unit of measure, see <a href="MeasurementRange.html" title="class in org.apache.sis.measure"><code>MeasurementRange</code></a>. |
| |
| <p><code>NumberRange</code> has some capability to convert different number types before to |
| perform operations. In order to provide both this flexibility and the safety of generic |
| types, most operations in this class are defined in two versions:</p> |
| <ul> |
| <li>Methods inherited from the <code>Range</code> parent class |
| (<a href="Range.html#contains(org.apache.sis.measure.Range)"><code>contains</code></a>, <a href="Range.html#intersect(org.apache.sis.measure.Range)"><code>intersect</code></a>, |
| <a href="Range.html#intersects(org.apache.sis.measure.Range)"><code>intersects</code></a>, <a href="Range.html#union(org.apache.sis.measure.Range)"><code>union</code></a> and |
| <a href="Range.html#subtract(org.apache.sis.measure.Range)"><code>subtract</code></a>) requires argument or range elements |
| of type <code><E></code>. No type conversion is performed.</li> |
| |
| <li>Methods defined in this class with the <code>Any</code> suffix |
| (<a href="#containsAny(org.apache.sis.measure.NumberRange)"><code>containsAny</code></a>, <a href="#intersectAny(org.apache.sis.measure.NumberRange)"><code>intersectAny</code></a>, |
| <a href="#intersectsAny(org.apache.sis.measure.NumberRange)"><code>intersectsAny</code></a>, <a href="#unionAny(org.apache.sis.measure.NumberRange)"><code>unionAny</code></a> and |
| <a href="#subtractAny(org.apache.sis.measure.NumberRange)"><code>subtractAny</code></a>) are more lenient on the argument or range element |
| type <code><E></code>. Widening conversions are performed as needed.</li> |
| </ul> |
| |
| The methods from the parent class are preferable when the ranges are known to contain elements |
| of the same type, since they avoid the cost of type checks and conversions. The method in this |
| class are convenient when the parameterized type is unknown (<code><?></code>). |
| |
| <p>Other methods defined in this class:</p> |
| <ul> |
| <li>Convenience <code>create(…)</code> static methods for every numeric primitive types.</li> |
| <li><a href="#castTo(java.lang.Class)"><code>castTo(Class)</code></a> for casting the range values to an other type.</li> |
| </ul> |
| |
| <div class="section">Relationship with standards</div> |
| <code>NumberRange</code> is the SIS class closest to the |
| <a href="http://en.wikipedia.org/wiki/Interval_%28mathematics%29">mathematical definition of interval</a>. |
| It is closely related, while not identical, to the ISO 19123 (<cite>Coverage geometry and functions</cite>) |
| definition of "ranges". At the difference of the parent <a href="Range.html" title="class in org.apache.sis.measure"><code>Range</code></a> class, which can be used only with |
| discrete coverages, the <code>NumberRange</code> class can |
| also be used with continuous coverages. |
| |
| <div class="section">Immutability and thread safety</div> |
| This class and the <a href="MeasurementRange.html" title="class in org.apache.sis.measure"><code>MeasurementRange</code></a> subclasses are immutable, and thus inherently thread-safe. |
| Other subclasses may or may not be immutable, at implementation choice. But implementers are encouraged |
| to make sure that all subclasses remain immutable for more predictable behavior. |
| |
| <div class="section">Shared instances</div> |
| <i><b>Note:</b> following is implementation details provided for information purpose. |
| The caching policy may change in any SIS version.</i> |
| |
| <p>All <code>create</code> static methods may return a shared instance. Those methods are preferred |
| to the constructors when the range is expected to have a long lifetime, typically as instance |
| given to <a href="../parameter/DefaultParameterDescriptor.html" title="class in org.apache.sis.parameter">parameter descriptor</a>. |
| Other methods do not check for shared instances, since the created object is often temporary.</p></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.3</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="RangeFormat.html" title="class in org.apache.sis.measure"><code>RangeFormat</code></a>, |
| <a href="../util/collection/RangeSet.html" title="class in org.apache.sis.util.collection"><code>RangeSet</code></a>, |
| <a href="http://en.wikipedia.org/wiki/Interval_%28mathematics%29">Wikipedia: Interval</a>, |
| <a href="../../../../serialized-form.html#org.apache.sis.measure.NumberRange">Serialized Form</a></dd> |
| |
| <p><font size="-1">Defined in the <code>sis-utility</code> module</font></p> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.lang.Class,E,boolean,E,boolean)">NumberRange</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><<a href="NumberRange.html" title="type parameter in NumberRange">E</a>> type, |
| <a href="NumberRange.html" title="type parameter in NumberRange">E</a> minValue, |
| boolean isMinIncluded, |
| <a href="NumberRange.html" title="type parameter in NumberRange">E</a> maxValue, |
| boolean isMaxIncluded)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a range of <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Number</code></a> objects.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.lang.Class,org.apache.sis.measure.ValueRange)">NumberRange</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><<a href="NumberRange.html" title="type parameter in NumberRange">E</a>> type, |
| <a href="ValueRange.html" title="annotation in org.apache.sis.measure">ValueRange</a> range)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a range of the given type with values from the given annotation.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.sis.measure.Range)">NumberRange</a></span>​(<a href="Range.html" title="class in org.apache.sis.measure">Range</a><<a href="NumberRange.html" title="type parameter in NumberRange">E</a>> range)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a range with the same type and the same values than the specified range.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static <N extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a> & <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><? super N>><br><a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><N></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#castOrCopy(org.apache.sis.measure.Range)">castOrCopy</a></span>​(<a href="Range.html" title="class in org.apache.sis.measure">Range</a><N> range)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the specified <a href="Range.html" title="class in org.apache.sis.measure"><code>Range</code></a> as a <code>NumberRange</code> object.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><N extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a> & <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><? super N>><br><a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><N></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#castTo(java.lang.Class)">castTo</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><N> type)</code></th> |
| <td class="colLast"> |
| <div class="block">Casts this range to the specified type.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#containsAny(java.lang.Number)">containsAny</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a> value)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if this range contains the given value.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#containsAny(org.apache.sis.measure.NumberRange)">containsAny</a></span>​(<a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?> range)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if the supplied range is fully contained within this range.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Byte.html?is-external=true" title="class or interface in java.lang" class="externalLink">Byte</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(byte,boolean,byte,boolean)">create</a></span>​(byte minValue, |
| boolean isMinIncluded, |
| byte maxValue, |
| boolean isMaxIncluded)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a range of <code>byte</code> values.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang" class="externalLink">Double</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(double,boolean,double,boolean)">create</a></span>​(double minValue, |
| boolean isMinIncluded, |
| double maxValue, |
| boolean isMaxIncluded)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a range of <code>double</code> values.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true" title="class or interface in java.lang" class="externalLink">Float</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(float,boolean,float,boolean)">create</a></span>​(float minValue, |
| boolean isMinIncluded, |
| float maxValue, |
| boolean isMaxIncluded)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a range of <code>float</code> values.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang" class="externalLink">Integer</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(int,boolean,int,boolean)">create</a></span>​(int minValue, |
| boolean isMinIncluded, |
| int maxValue, |
| boolean isMaxIncluded)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a range of <code>int</code> values.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang" class="externalLink">Long</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(long,boolean,long,boolean)">create</a></span>​(long minValue, |
| boolean isMinIncluded, |
| long maxValue, |
| boolean isMaxIncluded)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a range of <code>long</code> values.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Short.html?is-external=true" title="class or interface in java.lang" class="externalLink">Short</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(short,boolean,short,boolean)">create</a></span>​(short minValue, |
| boolean isMinIncluded, |
| short maxValue, |
| boolean isMaxIncluded)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a range of <code>short</code> values.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static <N extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a> & <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><? super N>><br><a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><N></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create(java.lang.Class,N)">create</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><N> type, |
| N value)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a range containing a single value of the given type.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createBestFit(java.lang.Number,boolean,java.lang.Number,boolean)">createBestFit</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a> minValue, |
| boolean isMinIncluded, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a> maxValue, |
| boolean isMaxIncluded)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a range using the smallest type of <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Number</code></a> that can hold the given values.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang" class="externalLink">Integer</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createLeftBounded(int,boolean)">createLeftBounded</a></span>​(int minValue, |
| boolean isMinIncluded)</code></th> |
| <td class="colLast"> |
| <div class="block">Constructs a range of <code>int</code> values without upper bound.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxDouble()">getMaxDouble</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the <a href="Range.html#getMaxValue()">maximum value</a> as a <code>double</code>.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxDouble(boolean)">getMaxDouble</a></span>​(boolean inclusive)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the <a href="#getMaxDouble()">maximum value</a> with the specified inclusive or exclusive state.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMinDouble()">getMinDouble</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the <a href="Range.html#getMinValue()">minimum value</a> as a <code>double</code>.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMinDouble(boolean)">getMinDouble</a></span>​(boolean inclusive)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the <a href="#getMinDouble()">minimum value</a> with the specified inclusive or exclusive state.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code><a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intersectAny(org.apache.sis.measure.NumberRange)">intersectAny</a></span>​(<a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?> range)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the union of this range with the given range.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intersectsAny(org.apache.sis.measure.NumberRange)">intersectsAny</a></span>​(<a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?> range)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if the supplied range intersects this range.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code><a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?>[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#subtractAny(org.apache.sis.measure.NumberRange)">subtractAny</a></span>​(<a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?> range)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the range of values that are in this range but not in the given range.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code><a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unionAny(org.apache.sis.measure.NumberRange)">unionAny</a></span>​(<a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?> range)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the union of this range with the given range.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.Range"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class <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#contains(org.apache.sis.measure.Range)">contains</a>, <a href="Range.html#equals(java.lang.Object)">equals</a>, <a href="Range.html#formatTo(java.util.Formatter,int,int,int)">formatTo</a>, <a href="Range.html#getElementType()">getElementType</a>, <a href="Range.html#getMaxValue()">getMaxValue</a>, <a href="Range.html#getMinValue()">getMinValue</a>, <a href="Range.html#hashCode()">hashCode</a>, <a href="Range.html#intersect(org.apache.sis.measure.Range)">intersect</a>, <a href="Range.html#intersects(org.apache.sis.measure.Range)">intersects</a>, <a href="Range.html#isBounded()">isBounded</a>, <a href="Range.html#isEmpty()">isEmpty</a>, <a href="Range.html#isMaxIncluded()">isMaxIncluded</a>, <a href="Range.html#isMinIncluded()">isMinIncluded</a>, <a href="Range.html#subtract(org.apache.sis.measure.Range)">subtract</a>, <a href="Range.html#toString()">toString</a>, <a href="Range.html#union(org.apache.sis.measure.Range)">union</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>(org.apache.sis.measure.Range)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>NumberRange</h4> |
| <pre>public NumberRange​(<a href="Range.html" title="class in org.apache.sis.measure">Range</a><<a href="NumberRange.html" title="type parameter in NumberRange">E</a>> range)</pre> |
| <div class="block">Constructs a range with the same type and the same values than the specified range. |
| This is a copy constructor.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>range</code> - the range to copy. The elements must be <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Number</code></a> instances.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="<init>(java.lang.Class,org.apache.sis.measure.ValueRange)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>NumberRange</h4> |
| <pre>public NumberRange​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><<a href="NumberRange.html" title="type parameter in NumberRange">E</a>> type, |
| <a href="ValueRange.html" title="annotation in org.apache.sis.measure">ValueRange</a> range) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre> |
| <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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>type</code> - the element type, restricted to one of <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Byte.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Byte</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Short.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Short</code></a>, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Integer</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Long</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Float</code></a> or <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Double</code></a>.</dd> |
| <dd><code>range</code> - the range of values.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the given type is not one of the primitive wrappers for numeric types.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="<init>(java.lang.Class,java.lang.Number,boolean,java.lang.Number,boolean)"> |
| <!-- --> |
| </a><a id="<init>(java.lang.Class,E,boolean,E,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>NumberRange</h4> |
| <pre>public NumberRange​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><<a href="NumberRange.html" title="type parameter in NumberRange">E</a>> type, |
| <a href="NumberRange.html" title="type parameter in NumberRange">E</a> minValue, |
| boolean isMinIncluded, |
| <a href="NumberRange.html" title="type parameter in NumberRange">E</a> maxValue, |
| boolean isMaxIncluded)</pre> |
| <div class="block">Constructs a range of <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Number</code></a> objects.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>type</code> - the element type, usually one of <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Byte.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Byte</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Short.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Short</code></a>, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Integer</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Long</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Float</code></a> or <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Double</code></a>.</dd> |
| <dd><code>minValue</code> - the minimal value, or <code>null</code> if none.</dd> |
| <dd><code>isMinIncluded</code> - <code>true</code> if the minimal value is inclusive, or <code>false</code> if exclusive.</dd> |
| <dd><code>maxValue</code> - the maximal value, or <code>null</code> if none.</dd> |
| <dd><code>isMaxIncluded</code> - <code>true</code> if the maximal value is inclusive, or <code>false</code> if exclusive.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section role="region"> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="create(java.lang.Class,java.lang.Number)"> |
| <!-- --> |
| </a><a id="create(java.lang.Class,N)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre class="methodSignature">public static <N extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a> & <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><? super N>> <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><N> create​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><N> type, |
| N value)</pre> |
| <div class="block">Constructs a range containing a single value of the given type. |
| The given value is used as the minimum and maximum values, inclusive.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>N</code> - compile-time value of <code>type</code>.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>type</code> - the element type, usually one of <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Byte.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Byte</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Short.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Short</code></a>, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Integer</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Long</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Float</code></a> or <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Double</code></a>.</dd> |
| <dd><code>value</code> - the value, or <code>null</code> for creating an unbounded range.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a range containing the given value as its inclusive minimum and maximum.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="create(byte,boolean,byte,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre class="methodSignature">public static <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Byte.html?is-external=true" title="class or interface in java.lang" class="externalLink">Byte</a>> create​(byte minValue, |
| boolean isMinIncluded, |
| byte maxValue, |
| boolean isMaxIncluded)</pre> |
| <div class="block">Constructs a range of <code>byte</code> values. |
| 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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>minValue</code> - the minimal value.</dd> |
| <dd><code>isMinIncluded</code> - <code>true</code> if the minimal value is inclusive, or <code>false</code> if exclusive.</dd> |
| <dd><code>maxValue</code> - the maximal value.</dd> |
| <dd><code>isMaxIncluded</code> - <code>true</code> if the maximal value is inclusive, or <code>false</code> if exclusive.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the new range of numeric values for the given endpoints.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="create(short,boolean,short,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre class="methodSignature">public static <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Short.html?is-external=true" title="class or interface in java.lang" class="externalLink">Short</a>> create​(short minValue, |
| boolean isMinIncluded, |
| short maxValue, |
| boolean isMaxIncluded)</pre> |
| <div class="block">Constructs a range of <code>short</code> values. |
| 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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>minValue</code> - the minimal value.</dd> |
| <dd><code>isMinIncluded</code> - <code>true</code> if the minimal value is inclusive, or <code>false</code> if exclusive.</dd> |
| <dd><code>maxValue</code> - the maximal value.</dd> |
| <dd><code>isMaxIncluded</code> - <code>true</code> if the maximal value is inclusive, or <code>false</code> if exclusive.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the new range of numeric values for the given endpoints.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="create(int,boolean,int,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre class="methodSignature">public static <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang" class="externalLink">Integer</a>> create​(int minValue, |
| boolean isMinIncluded, |
| int maxValue, |
| boolean isMaxIncluded)</pre> |
| <div class="block">Constructs a range of <code>int</code> values. |
| 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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>minValue</code> - the minimal value.</dd> |
| <dd><code>isMinIncluded</code> - <code>true</code> if the minimal value is inclusive, or <code>false</code> if exclusive.</dd> |
| <dd><code>maxValue</code> - the maximal value.</dd> |
| <dd><code>isMaxIncluded</code> - <code>true</code> if the maximal value is inclusive, or <code>false</code> if exclusive.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the new range of numeric values for the given endpoints.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#createLeftBounded(int,boolean)"><code>createLeftBounded(int, boolean)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="create(long,boolean,long,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre class="methodSignature">public static <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang" class="externalLink">Long</a>> create​(long minValue, |
| boolean isMinIncluded, |
| long maxValue, |
| boolean isMaxIncluded)</pre> |
| <div class="block">Constructs a range of <code>long</code> values. |
| 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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>minValue</code> - the minimal value.</dd> |
| <dd><code>isMinIncluded</code> - <code>true</code> if the minimal value is inclusive, or <code>false</code> if exclusive.</dd> |
| <dd><code>maxValue</code> - the maximal value.</dd> |
| <dd><code>isMaxIncluded</code> - <code>true</code> if the maximal value is inclusive, or <code>false</code> if exclusive.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the new range of numeric values for the given endpoints.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="create(float,boolean,float,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre class="methodSignature">public static <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true" title="class or interface in java.lang" class="externalLink">Float</a>> create​(float minValue, |
| boolean isMinIncluded, |
| float maxValue, |
| boolean isMaxIncluded)</pre> |
| <div class="block">Constructs a range of <code>float</code> values. |
| The minimum and maximum values can not 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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>minValue</code> - the minimal value, or <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#NEGATIVE_INFINITY" title="class or interface in java.lang" class="externalLink"><code>Float.NEGATIVE_INFINITY</code></a> if none.</dd> |
| <dd><code>isMinIncluded</code> - <code>true</code> if the minimal value is inclusive, or <code>false</code> if exclusive.</dd> |
| <dd><code>maxValue</code> - the maximal value, or <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#POSITIVE_INFINITY" title="class or interface in java.lang" class="externalLink"><code>Float.POSITIVE_INFINITY</code></a> if none.</dd> |
| <dd><code>isMaxIncluded</code> - <code>true</code> if the maximal value is inclusive, or <code>false</code> if exclusive.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the new range of numeric values for the given endpoints.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#isNaN(float)" title="class or interface in java.lang" class="externalLink"><code>Float.isNaN(float)</code></a> is <code>true</code> for a given value.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="create(double,boolean,double,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>create</h4> |
| <pre class="methodSignature">public static <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang" class="externalLink">Double</a>> create​(double minValue, |
| boolean isMinIncluded, |
| double maxValue, |
| boolean isMaxIncluded)</pre> |
| <div class="block">Constructs a range of <code>double</code> values. |
| The minimum and maximum values can not 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> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>minValue</code> - the minimal value, or <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#NEGATIVE_INFINITY" title="class or interface in java.lang" class="externalLink"><code>Double.NEGATIVE_INFINITY</code></a> if none.</dd> |
| <dd><code>isMinIncluded</code> - <code>true</code> if the minimal value is inclusive, or <code>false</code> if exclusive.</dd> |
| <dd><code>maxValue</code> - the maximal value, or <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#POSITIVE_INFINITY" title="class or interface in java.lang" class="externalLink"><code>Double.POSITIVE_INFINITY</code></a> if none.</dd> |
| <dd><code>isMaxIncluded</code> - <code>true</code> if the maximal value is inclusive, or <code>false</code> if exclusive.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the new range of numeric values for the given endpoints.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isNaN(double)" title="class or interface in java.lang" class="externalLink"><code>Double.isNaN(double)</code></a> is <code>true</code> for a given value.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createBestFit(java.lang.Number,boolean,java.lang.Number,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createBestFit</h4> |
| <pre class="methodSignature">public static <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?> createBestFit​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a> minValue, |
| boolean isMinIncluded, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a> maxValue, |
| boolean isMaxIncluded)</pre> |
| <div class="block">Constructs a range using the smallest type of <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Number</code></a> that can hold the given values. |
| The given numbers do not need to be of the same type since they will |
| be <a href="../util/Numbers.html#cast(java.lang.Number,java.lang.Class)">casted</a> as needed. |
| More specifically this method returns: |
| |
| <ul> |
| <li><code>NumberRange<Byte></code> if the given values are integers between |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Byte.html?is-external=true#MIN_VALUE" title="class or interface in java.lang" class="externalLink">-128</a> and <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Byte.html?is-external=true#MAX_VALUE" title="class or interface in java.lang" class="externalLink">127</a> inclusive.</li> |
| <li><code>NumberRange<Short></code> if the given values are integers between |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Short.html?is-external=true#MIN_VALUE" title="class or interface in java.lang" class="externalLink">-32768</a> and <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Short.html?is-external=true#MAX_VALUE" title="class or interface in java.lang" class="externalLink">32767</a> inclusive.</li> |
| <li><code>NumberRange<Integer></code> if the given values are integers between |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true#MIN_VALUE" title="class or interface in java.lang" class="externalLink">-2147483648</a> and <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true#MAX_VALUE" title="class or interface in java.lang" class="externalLink">2147483647</a> inclusive.</li> |
| <li><code>NumberRange<Long></code> if the given values are integers in the range of <code>long</code> values.</li> |
| <li><code>NumberRange<Float></code> if the given values can be casted to <code>float</code> values without data lost.</li> |
| <li><code>NumberRange<Double></code> if none of the above types is suitable.</li> |
| </ul> |
| |
| This method may return a shared instance, at implementation choice.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>minValue</code> - the minimal value, or <code>null</code> if none.</dd> |
| <dd><code>isMinIncluded</code> - <code>true</code> if the minimal value is inclusive, or <code>false</code> if exclusive.</dd> |
| <dd><code>maxValue</code> - the maximal value, or <code>null</code> if none.</dd> |
| <dd><code>isMaxIncluded</code> - <code>true</code> if the maximal value is inclusive, or <code>false</code> if exclusive.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the new range, or <code>null</code> if both <code>minValue</code> and <code>maxValue</code> are <code>null</code>.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the given numbers are not primitive wrappers for numeric types.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="createLeftBounded(int,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createLeftBounded</h4> |
| <pre class="methodSignature">public static <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang" class="externalLink">Integer</a>> createLeftBounded​(int minValue, |
| boolean isMinIncluded)</pre> |
| <div class="block">Constructs a range of <code>int</code> values without upper bound. |
| This method may return a shared instance, at implementation choice. |
| |
| <div class="note"><b>Note:</b> for creating left-bounded ranges of floating point values, |
| use one of the <code>create(…)</code> methods with a <code>POSITIVE_INFINITY</code> constant. |
| We do not provide variants for other integer types because this method is typically invoked for |
| defining the <a href="../feature/DefaultFeatureType.html" title="class in org.apache.sis.feature">multiplicity of an attribute</a>.</div></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>minValue</code> - the minimal value.</dd> |
| <dd><code>isMinIncluded</code> - <code>true</code> if the minimal value is inclusive, or <code>false</code> if exclusive.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the new range of numeric values from <code>minValue</code> to positive infinity.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.5</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="#create(int,boolean,int,boolean)"><code>create(int, boolean, int, boolean)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="castOrCopy(org.apache.sis.measure.Range)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>castOrCopy</h4> |
| <pre class="methodSignature">public static <N extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a> & <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><? super N>> <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><N> castOrCopy​(<a href="Range.html" title="class in org.apache.sis.measure">Range</a><N> range)</pre> |
| <div class="block">Returns the specified <a href="Range.html" title="class in org.apache.sis.measure"><code>Range</code></a> as a <code>NumberRange</code> object. |
| If the specified range is already an instance of <code>NumberRange</code>, then it is returned unchanged. |
| Otherwise a new number range is created using the <a href="#%3Cinit%3E(org.apache.sis.measure.Range)">copy constructor</a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>N</code> - the type of elements in the given range.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>range</code> - the range to cast or copy.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the same range than <code>range</code> as a <code>NumberRange</code> object.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="castTo(java.lang.Class)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>castTo</h4> |
| <pre class="methodSignature">public <N extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a> & <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html?is-external=true" title="class or interface in java.lang" class="externalLink">Comparable</a><? super N>> <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><N> castTo​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><N> type) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre> |
| <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> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>N</code> - the class to cast to.</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>type</code> - the class to cast to. Must be one of <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Byte.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Byte</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Short.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Short</code></a>, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Integer</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Long</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Float</code></a> or <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Double</code></a>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the casted range, or <code>this</code> if this range already uses the specified type.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the given type is not one of the primitive wrappers for numeric types.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getMinDouble()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMinDouble</h4> |
| <pre class="methodSignature">public double getMinDouble()</pre> |
| <div class="block">Returns the <a href="Range.html#getMinValue()">minimum value</a> as a <code>double</code>. |
| If this range is unbounded, then <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#NEGATIVE_INFINITY" title="class or interface in java.lang" class="externalLink"><code>Double.NEGATIVE_INFINITY</code></a> is returned.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the minimum value.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getMinDouble(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMinDouble</h4> |
| <pre class="methodSignature">public double getMinDouble​(boolean inclusive)</pre> |
| <div class="block">Returns the <a href="#getMinDouble()">minimum value</a> with the specified inclusive or exclusive state. |
| If this range is unbounded, then <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#NEGATIVE_INFINITY" title="class or interface in java.lang" class="externalLink"><code>Double.NEGATIVE_INFINITY</code></a> is returned.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>inclusive</code> - <code>true</code> for the minimum value inclusive, or |
| <code>false</code> for the minimum value exclusive.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the minimum value, inclusive or exclusive as requested.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getMaxDouble()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMaxDouble</h4> |
| <pre class="methodSignature">public double getMaxDouble()</pre> |
| <div class="block">Returns the <a href="Range.html#getMaxValue()">maximum value</a> as a <code>double</code>. |
| If this range is unbounded, then <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#POSITIVE_INFINITY" title="class or interface in java.lang" class="externalLink"><code>Double.POSITIVE_INFINITY</code></a> is returned.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the maximum value.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getMaxDouble(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMaxDouble</h4> |
| <pre class="methodSignature">public double getMaxDouble​(boolean inclusive)</pre> |
| <div class="block">Returns the <a href="#getMaxDouble()">maximum value</a> with the specified inclusive or exclusive state. |
| If this range is unbounded, then <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#POSITIVE_INFINITY" title="class or interface in java.lang" class="externalLink"><code>Double.POSITIVE_INFINITY</code></a> is returned.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>inclusive</code> - <code>true</code> for the maximum value inclusive, or |
| <code>false</code> for the maximum value exclusive.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the maximum value, inclusive or exclusive as requested.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="containsAny(java.lang.Number)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>containsAny</h4> |
| <pre class="methodSignature">public boolean containsAny​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Number.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number</a> value) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre> |
| <div class="block">Returns <code>true</code> if this range contains the given value. |
| This method converts <code>this</code> or the given argument to the widest numeric type, |
| then performs the same work than <a href="Range.html#contains(E)"><code>Range.contains(Comparable)</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>value</code> - the value to check for inclusion in this range.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the given value is included in this range.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the given range can not be converted to a valid type |
| through widening conversion.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="containsAny(org.apache.sis.measure.NumberRange)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>containsAny</h4> |
| <pre class="methodSignature">public boolean containsAny​(<a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?> range) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre> |
| <div class="block">Returns <code>true</code> if the supplied range is fully contained within this range. |
| This method converts <code>this</code> or the given argument to the widest numeric type, |
| then delegates to <a href="Range.html#contains(org.apache.sis.measure.Range)"><code>Range.contains(Range)</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>range</code> - the range to check for inclusion in this range.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the given range is included in this range.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the given range can not be converted to a valid type |
| through widening conversion, or if the units of measurement are not convertible.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="intersectsAny(org.apache.sis.measure.NumberRange)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>intersectsAny</h4> |
| <pre class="methodSignature">public boolean intersectsAny​(<a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?> range) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre> |
| <div class="block">Returns <code>true</code> if the supplied range intersects this range. |
| This method converts <code>this</code> or the given argument to the widest numeric type, |
| then delegates to <a href="Range.html#intersects(org.apache.sis.measure.Range)"><code>Range.intersects(Range)</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>range</code> - the range to check for intersection with this range.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the given range intersects this range.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the given range can not be converted to a valid type |
| through widening conversion, or if the units of measurement are not convertible.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="intersectAny(org.apache.sis.measure.NumberRange)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>intersectAny</h4> |
| <pre class="methodSignature">public <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?> intersectAny​(<a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?> range) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre> |
| <div class="block">Returns the union of this range with the given range. |
| This method converts <code>this</code> or the given argument to the widest numeric type, |
| then delegates to <a href="Range.html#intersect(org.apache.sis.measure.Range)"><code>Range.intersect(Range)</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>range</code> - the range to add to this range.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the union of this range with the given range.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the given range can not be converted to a valid type |
| through widening conversion, or if the units of measurement are not convertible.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="unionAny(org.apache.sis.measure.NumberRange)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unionAny</h4> |
| <pre class="methodSignature">public <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?> unionAny​(<a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?> range) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre> |
| <div class="block">Returns the union of this range with the given range. |
| This method converts <code>this</code> or the given argument to the widest numeric type, |
| then delegates to <a href="Range.html#union(org.apache.sis.measure.Range)"><code>Range.union(Range)</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>range</code> - the range to add to this range.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the union of this range with the given range.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the given range can not be converted to a valid type |
| through widening conversion, or if the units of measurement are not convertible.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="subtractAny(org.apache.sis.measure.NumberRange)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>subtractAny</h4> |
| <pre class="methodSignature">public <a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?>[] subtractAny​(<a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a><?> range) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre> |
| <div class="block">Returns the range of values that are in this range but not in the given range. |
| This method converts <code>this</code> or the given argument to the widest numeric type, |
| then delegates to <a href="Range.html#subtract(org.apache.sis.measure.Range)"><code>Range.subtract(Range)</code></a>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>range</code> - the range to subtract.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>this range without the given range, as an array of length 0, 1 or 2.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if the given range can not be converted to a valid type |
| through widening conversion, or if the units of measurement are not convertible.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/NumberRange.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2010–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |