| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 --> |
| <title>Range (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.Range class"> |
| <meta name="keywords" content="getElementType()"> |
| <meta name="keywords" content="getMinValue()"> |
| <meta name="keywords" content="isMinIncluded()"> |
| <meta name="keywords" content="getMaxValue()"> |
| <meta name="keywords" content="isMaxIncluded()"> |
| <meta name="keywords" content="isEmpty()"> |
| <meta name="keywords" content="isBounded()"> |
| <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()"> |
| <meta name="keywords" content="toString()"> |
| <meta name="keywords" content="formatTo()"> |
| <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="Range (Apache SIS 1.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10}; |
| var tabs = {65535:["t0","All 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/Range.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 Range" class="title">Class Range<E extends <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>Range<E></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, typically a <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> subclass or <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Date</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="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a></code></dd> |
| </dl> |
| <hr> |
| <pre>public class <span class="typeNameLabel">Range<E extends <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="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> |
| implements <a href="../util/collection/CheckedContainer.html" title="interface in org.apache.sis.util.collection">CheckedContainer</a><E>, <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>, <a href="../util/Emptiable.html" title="interface in org.apache.sis.util">Emptiable</a>, <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></pre> |
| <div class="block">A set of minimum and maximum values of a certain class, allowing |
| a user to determine if a value of the same class is contained inside the range. |
| The minimum and maximum values do not have to be included in the range, and |
| can be null. If the minimum or maximum values are null, the range is said to |
| be unbounded on that endpoint. If both the minimum and maximum are null, |
| the range is completely unbounded and all values of that class are contained |
| within the range. Null values are always considered <em>exclusive</em>, |
| since iterations over the values will never reach the infinite endpoint. |
| |
| <p>The minimal and maximal values (the <cite>endpoints</cite>) may be inclusive or exclusive. |
| Numeric ranges where both endpoints are inclusive are called <cite>closed intervals</cite> |
| and are represented by square brackets, for example "<code>[0 … 255]</code>". |
| Numeric ranges where both endpoints are exclusive are called <cite>open intervals</cite> |
| and are represented by parenthesis, for example "<code>(0 … 256)</code>".</p> |
| |
| <div class="section">Type and value of range elements</div> |
| To be a member of a <code>Range</code>, the <code><E></code> type defining the range must implement the |
| <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"><code>Comparable</code></a> interface. All argument values given to the methods of this class shall be |
| or contain instances of that <code><E></code> type. The type is enforced by parameterized type, |
| but some subclasses may put additional constraints. For example <a href="MeasurementRange.html" title="class in org.apache.sis.measure"><code>MeasurementRange</code></a> will |
| additionally checks the units of measurement. Consequently every methods defined in this class |
| may throw an <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"><code>IllegalArgumentException</code></a> if a given argument does not met some constraint |
| beyond the type. |
| |
| <div class="section">Relationship with ISO 19123 definition of range</div> |
| The ISO 19123 standard (<cite>Coverage geometry and functions</cite>) defines the range as the set |
| (either finite or transfinite) of feature attribute |
| values associated by a function (the coverage) with the |
| elements of the coverage domain. In other words, if we see a coverage as a function, then a range |
| is the set of possible return values. |
| |
| <p>The characteristics of the spatial domain are defined by the ISO 19123 standard whereas the |
| characteristics of the attribute range are not part of that standard. In Apache SIS, those |
| characteristics are described by the <code>SampleDimension</code> class, |
| which may contain one or many <code>Range</code> instances. Consequently this <code>Range</code> class |
| is closely related, but not identical, to the ISO 19123 definition or range.</p> |
| |
| <p>Ranges are not necessarily numeric. Numeric and non-numeric ranges can be associated to |
| discrete coverages, while typically only |
| numeric ranges can be associated to continuous coverages.</p> |
| |
| <div class="section">Immutability and thread safety</div> |
| This class and the <a href="NumberRange.html" title="class in org.apache.sis.measure"><code>NumberRange</code></a> / <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> |
| <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="../../../../serialized-form.html#org.apache.sis.measure.Range">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)">Range</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="Range.html" title="type parameter in Range">E</a>> elementType, |
| <a href="Range.html" title="type parameter in Range">E</a> minValue, |
| boolean isMinIncluded, |
| <a href="Range.html" title="type parameter in Range">E</a> maxValue, |
| boolean isMaxIncluded)</code></th> |
| <td class="colLast"> |
| <div class="block">Creates a new range bounded by the given endpoint values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(org.apache.sis.measure.Range)">Range</a></span>​(<a href="Range.html" title="class in org.apache.sis.measure">Range</a><<a href="Range.html" title="type parameter in Range">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="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>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#contains(E)">contains</a></span>​(<a href="Range.html" title="type parameter in Range">E</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="i1" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#contains(org.apache.sis.measure.Range)">contains</a></span>​(<a href="Range.html" title="class in org.apache.sis.measure">Range</a><? extends <a href="Range.html" title="type parameter in Range">E</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="i2" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equals(java.lang.Object)">equals</a></span>​(<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> object)</code></th> |
| <td class="colLast"> |
| <div class="block">Compares this range with the given object for equality.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#formatTo(java.util.Formatter,int,int,int)">formatTo</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html?is-external=true" title="class or interface in java.util" class="externalLink">Formatter</a> formatter, |
| int flags, |
| int width, |
| int precision)</code></th> |
| <td class="colLast"> |
| <div class="block">Formats this range using the provider formatter.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><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="Range.html" title="type parameter in Range">E</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getElementType()">getElementType</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the base type of elements in this range.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="Range.html" title="type parameter in Range">E</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxValue()">getMaxValue</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the maximal value, or <code>null</code> if this range has no upper limit.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="Range.html" title="type parameter in Range">E</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMinValue()">getMinValue</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the minimal value, or <code>null</code> if this range has no lower limit.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hashCode()">hashCode</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a hash code value for this range.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="Range.html" title="class in org.apache.sis.measure">Range</a><<a href="Range.html" title="type parameter in Range">E</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intersect(org.apache.sis.measure.Range)">intersect</a></span>​(<a href="Range.html" title="class in org.apache.sis.measure">Range</a><<a href="Range.html" title="type parameter in Range">E</a>> range)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the intersection between this range and the given range.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intersects(org.apache.sis.measure.Range)">intersects</a></span>​(<a href="Range.html" title="class in org.apache.sis.measure">Range</a><? extends <a href="Range.html" title="type parameter in Range">E</a>> range)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if this range intersects the given range.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isBounded()">isBounded</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if this range is both left-bounded and right-bounded.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isEmpty()">isEmpty</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if this range is empty.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isMaxIncluded()">isMaxIncluded</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if the <a href="#getMaxValue()">maximal value</a> is inclusive, |
| or <code>false</code> if exclusive.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isMinIncluded()">isMinIncluded</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns <code>true</code> if the <a href="#getMinValue()">minimal value</a> is inclusive, |
| or <code>false</code> if exclusive.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code><a href="Range.html" title="class in org.apache.sis.measure">Range</a><<a href="Range.html" title="type parameter in Range">E</a>>[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#subtract(org.apache.sis.measure.Range)">subtract</a></span>​(<a href="Range.html" title="class in org.apache.sis.measure">Range</a><<a href="Range.html" title="type parameter in Range">E</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="i15" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a unlocalized string representation of this range.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code><a href="Range.html" title="class in org.apache.sis.measure">Range</a><<a href="Range.html" title="type parameter in Range">E</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#union(org.apache.sis.measure.Range)">union</a></span>​(<a href="Range.html" title="class in org.apache.sis.measure">Range</a><<a href="Range.html" title="type parameter in Range">E</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.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>Range</h4> |
| <pre>public Range​(<a href="Range.html" title="class in org.apache.sis.measure">Range</a><<a href="Range.html" title="type parameter in Range">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.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="<init>(java.lang.Class,java.lang.Comparable,boolean,java.lang.Comparable,boolean)"> |
| <!-- --> |
| </a><a id="<init>(java.lang.Class,E,boolean,E,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>Range</h4> |
| <pre>public Range​(<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="Range.html" title="type parameter in Range">E</a>> elementType, |
| <a href="Range.html" title="type parameter in Range">E</a> minValue, |
| boolean isMinIncluded, |
| <a href="Range.html" title="type parameter in Range">E</a> maxValue, |
| boolean isMaxIncluded)</pre> |
| <div class="block">Creates a new range bounded by the given endpoint values. |
| If the given minimum value is greater than the maximum value, then the range <a href="#isEmpty()">is empty</a>. |
| |
| <div class="note"><b>Assertion:</b> |
| This constructor verifies the <code>minValue</code> and <code>maxValue</code> arguments type if Java assertions |
| are enabled. This verification is not performed in normal execution because theoretically unnecessary |
| unless Java generic types have been tricked.</div></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>elementType</code> - the base type of the range elements.</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="getElementType()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getElementType</h4> |
| <pre class="methodSignature">public <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="Range.html" title="type parameter in Range">E</a>> getElementType()</pre> |
| <div class="block">Returns the base type of elements in this range. |
| This is the type specified at construction time.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../util/collection/CheckedContainer.html#getElementType()">getElementType</a></code> in interface <code><a href="../util/collection/CheckedContainer.html" title="interface in org.apache.sis.util.collection">CheckedContainer</a><<a href="Range.html" title="type parameter in Range">E</a> extends <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 <a href="Range.html" title="type parameter in Range">E</a>>></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the element type.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getMinValue()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMinValue</h4> |
| <pre class="methodSignature">public <a href="Range.html" title="type parameter in Range">E</a> getMinValue()</pre> |
| <div class="block">Returns the minimal value, or <code>null</code> if this range has no lower limit. |
| If non-null, the returned value is either inclusive or exclusive depending on |
| the boolean returned by <a href="#isMinIncluded()"><code>isMinIncluded()</code></a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the minimal value, or <code>null</code> if this range is unbounded on the lower side.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isMinIncluded()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isMinIncluded</h4> |
| <pre class="methodSignature">public boolean isMinIncluded()</pre> |
| <div class="block">Returns <code>true</code> if the <a href="#getMinValue()">minimal value</a> is inclusive, |
| or <code>false</code> if exclusive. Note that <code>null</code> values are always considered |
| exclusive.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the minimal value is inclusive, or <code>false</code> if exclusive.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getMaxValue()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMaxValue</h4> |
| <pre class="methodSignature">public <a href="Range.html" title="type parameter in Range">E</a> getMaxValue()</pre> |
| <div class="block">Returns the maximal value, or <code>null</code> if this range has no upper limit. |
| If non-null, the returned value is either inclusive or exclusive depending on |
| the boolean returned by <a href="#isMaxIncluded()"><code>isMaxIncluded()</code></a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the maximal value, or <code>null</code> if this range is unbounded on the upper side.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isMaxIncluded()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isMaxIncluded</h4> |
| <pre class="methodSignature">public boolean isMaxIncluded()</pre> |
| <div class="block">Returns <code>true</code> if the <a href="#getMaxValue()">maximal value</a> is inclusive, |
| or <code>false</code> if exclusive. Note that <code>null</code> values are always considered |
| exclusive.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the maximal value is inclusive, or <code>false</code> if exclusive.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isEmpty()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isEmpty</h4> |
| <pre class="methodSignature">public final boolean isEmpty()</pre> |
| <div class="block">Returns <code>true</code> if this range is empty. A range is empty if the |
| <a href="#getMinValue()">minimum value</a> is greater than the |
| <a href="#getMaxValue()">maximum value</a>, or if they are equal while |
| at least one of them is exclusive. |
| |
| <div class="note"><b>API note:</b> |
| This method is final because often used by the internal implementation. |
| Making the method final ensures that the other methods behave consistently.</div></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../util/Emptiable.html#isEmpty()">isEmpty</a></code> in interface <code><a href="../util/Emptiable.html" title="interface in org.apache.sis.util">Emptiable</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if this range is empty.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isBounded()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isBounded</h4> |
| <pre class="methodSignature">public boolean isBounded()</pre> |
| <div class="block">Returns <code>true</code> if this range is both left-bounded and right-bounded. |
| A <code>true</code> return value guarantees that: |
| |
| <ol> |
| <li>both <a href="#getMinValue()"><code>getMinValue()</code></a> and <a href="#getMaxValue()"><code>getMaxValue()</code></a> will return non-null values;</li> |
| <li>if minimum and maximum values are numbers, then those numbers are finite.</li> |
| </ol></div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>whether this range is left- and right-bounded.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.0</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="contains(java.lang.Comparable)"> |
| <!-- --> |
| </a><a id="contains(E)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>contains</h4> |
| <pre class="methodSignature">public boolean contains​(<a href="Range.html" title="type parameter in Range">E</a> value)</pre> |
| <div class="block">Returns <code>true</code> if this range contains the given value. A range never contains the |
| <code>null</code> value. This is consistent with the <a href="#skip-navbar_top">class javadoc</a> |
| stating that null <a href="#getMinValue()">minimum</a> or <a href="#getMaxValue()">maximum</a> |
| values are exclusive.</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> |
| </dl> |
| </li> |
| </ul> |
| <a id="contains(org.apache.sis.measure.Range)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>contains</h4> |
| <pre class="methodSignature">public boolean contains​(<a href="Range.html" title="class in org.apache.sis.measure">Range</a><? extends <a href="Range.html" title="type parameter in Range">E</a>> range)</pre> |
| <div class="block">Returns <code>true</code> if the supplied range is fully contained within this range.</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 is incompatible, |
| for example because of incommensurable units of measurement.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="intersects(org.apache.sis.measure.Range)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>intersects</h4> |
| <pre class="methodSignature">public boolean intersects​(<a href="Range.html" title="class in org.apache.sis.measure">Range</a><? extends <a href="Range.html" title="type parameter in Range">E</a>> range)</pre> |
| <div class="block">Returns <code>true</code> if this range intersects the given range.</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 is incompatible, |
| for example because of incommensurable units of measurement.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="intersect(org.apache.sis.measure.Range)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>intersect</h4> |
| <pre class="methodSignature">public <a href="Range.html" title="class in org.apache.sis.measure">Range</a><<a href="Range.html" title="type parameter in Range">E</a>> intersect​(<a href="Range.html" title="class in org.apache.sis.measure">Range</a><<a href="Range.html" title="type parameter in Range">E</a>> range)</pre> |
| <div class="block">Returns the intersection between this range and the given range.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>range</code> - the range to intersect.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the intersection 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 is incompatible, |
| for example because of incommensurable units of measurement.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="union(org.apache.sis.measure.Range)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>union</h4> |
| <pre class="methodSignature">public <a href="Range.html" title="class in org.apache.sis.measure">Range</a><<a href="Range.html" title="type parameter in Range">E</a>> union​(<a href="Range.html" title="class in org.apache.sis.measure">Range</a><<a href="Range.html" title="type parameter in Range">E</a>> range)</pre> |
| <div class="block">Returns the union of this range with the given range.</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 is incompatible, |
| for example because of incommensurable units of measurement.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="subtract(org.apache.sis.measure.Range)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>subtract</h4> |
| <pre class="methodSignature">public <a href="Range.html" title="class in org.apache.sis.measure">Range</a><<a href="Range.html" title="type parameter in Range">E</a>>[] subtract​(<a href="Range.html" title="class in org.apache.sis.measure">Range</a><<a href="Range.html" title="type parameter in Range">E</a>> range)</pre> |
| <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></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 is incompatible, |
| for example because of incommensurable units of measurement.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="equals(java.lang.Object)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>equals</h4> |
| <pre class="methodSignature">public boolean equals​(<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> object)</pre> |
| <div class="block">Compares this range with the given object for equality. |
| Two ranges are considered equal if they met the following conditions: |
| |
| <ul> |
| <li>They are of the same <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">class</a>.</li> |
| <li>They have the same <a href="#getElementType()">element type</a>.</li> |
| <li>Both ranges <a href="#isEmpty()">are empty</a>, <strong>or</strong> (if at least one range is non-empty): |
| <ul> |
| <li>They have equal <a href="#getMinValue()">minimum</a> value in the sense of <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink"><code>Object.equals(Object)</code></a>.</li> |
| <li>They have equal <a href="#getMaxValue()">maximum</a> value in the sense of <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink"><code>Object.equals(Object)</code></a>.</li> |
| <li>They have equal <a href="#isMinIncluded()">inclusive minimum</a> flag.</li> |
| <li>They have equal <a href="#isMaxIncluded()">inclusive maximum</a> flag.</li> |
| </ul> |
| <li>Any other requirement added by subclasses. |
| In particular <a href="MeasurementRange.html" title="class in org.apache.sis.measure"><code>MeasurementRange</code></a> compares also the units of measurement.</li> |
| </ul> |
| |
| Note that this method may return <code>true</code> even if the bounds are not strictly identical. |
| In particular this method returns <code>true</code> if the ranges are empty regardless their minimum and maximum values, |
| and also returns <code>true</code> if the bounds are wrappers for some <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#NaN" title="class or interface in java.lang" class="externalLink"><code>Float.NaN</code></a> or <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#NaN" title="class or interface in java.lang" class="externalLink"><code>Double.NaN</code></a> values |
| even if their <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#doubleToRawLongBits(double)" title="class or interface in java.lang" class="externalLink">raw bits pattern</a> are not the same. |
| The later is because <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink"><code>Float.equals(Object)</code></a> and <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink"><code>Double.equals(Object)</code></a> consider all NaN values as equal.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a></code> in class <code><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></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>object</code> - the object to compare with this range for equality.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>true</code> if the given object is equal to this range.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="hashCode()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hashCode</h4> |
| <pre class="methodSignature">public int hashCode()</pre> |
| <div class="block">Returns a hash code value for this range.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a></code> in class <code><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></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="toString()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> toString()</pre> |
| <div class="block">Returns a unlocalized string representation of this range. This method complies to the format |
| described in the <a href="http://en.wikipedia.org/wiki/ISO_31-11">ISO 31-11</a> standard, |
| except that the minimal and maximal values are separated by the "<code>…</code>" character |
| instead than coma. More specifically, the string representation is defined as below: |
| |
| <ul> |
| <li>If the range <a href="#isEmpty()">is empty</a>, then this method returns "<code>{}</code>".</li> |
| <li>Otherwise if the minimal value is equals to the maximal value, then the string |
| representation of that value is returned inside braces as in "<code>{value}</code>".</li> |
| <li>Otherwise the string representation of the minimal and maximal values are formatted |
| like "<code>[min … max]</code>" for inclusive endpoints or "<code>(min … max)</code>" for exclusive |
| endpoints, or a mix of both styles. The "<code>∞</code>" symbol is used in place of |
| <code>min</code> or <code>max</code> for unbounded ranges.</li> |
| </ul> |
| |
| If this range is a <a href="MeasurementRange.html" title="class in org.apache.sis.measure"><code>MeasurementRange</code></a>, then the <a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html?is-external=true" title="class or interface in javax.measure" class="externalLink">unit of measurement</a> |
| is appended to the above string representation except for empty ranges.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a></code> in class <code><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></code></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="http://en.wikipedia.org/wiki/ISO_31-11">Wikipedia: ISO 31-11</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="formatTo(java.util.Formatter,int,int,int)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>formatTo</h4> |
| <pre class="methodSignature">public void formatTo​(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html?is-external=true" title="class or interface in java.util" class="externalLink">Formatter</a> formatter, |
| int flags, |
| int width, |
| int precision)</pre> |
| <div class="block">Formats this range using the provider formatter. This method is invoked when an |
| <code>Range</code> object is formatted using the <code>"%s"</code> conversion specifier of |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Formatter.html?is-external=true" title="class or interface in java.util" class="externalLink"><code>Formatter</code></a>. Users don't need to invoke this method explicitly. |
| |
| <p>If the alternate flags is present (as in <code>"%#s"</code>), then the range will |
| be formatted using the <a href="RangeFormat.html#isAlternateForm()">alternate form</a> |
| for exclusive bounds.</p></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Formattable.html?is-external=true#formatTo(java.util.Formatter,int,int,int)" title="class or interface in java.util" class="externalLink">formatTo</a></code> in interface <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></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>formatter</code> - the formatter in which to format this angle.</dd> |
| <dd><code>flags</code> - <a href="https://docs.oracle.com/javase/8/docs/api/java/util/FormattableFlags.html?is-external=true#LEFT_JUSTIFY" title="class or interface in java.util" class="externalLink"><code>FormattableFlags.LEFT_JUSTIFY</code></a> for left alignment, or 0 for right alignment.</dd> |
| <dd><code>width</code> - minimal number of characters to write, padding with <code>' '</code> if necessary.</dd> |
| <dd><code>precision</code> - maximal number of characters to write, or -1 if no limit.</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/Range.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> |