blob: fd6e64bb75955d2340f564210943156f91498153 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 -->
<title>org.apache.sis.measure (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 package">
<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="org.apache.sis.measure (Apache SIS 1.0 API)";
}
}
catch(err) {
}
//-->
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 class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-use.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&nbsp;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>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<main role="main">
<div class="header">
<h1 title="Package" class="title">Package&nbsp;org.apache.sis.measure</h1>
</div>
<div class="contentContainer">
<section role="region"><a id="package.description">
<!-- -->
</a>
<div class="block">Units of measurements, values related to measurement (like angles and ranges) and their formatters.
A key class in this package is <a href="Units.html" title="class in org.apache.sis.measure"><code>Units</code></a>, which provides static constants
for about 50 units of measurement including all the SI base units
(<a href="Units.html#METRE">metre</a>,
<a href="Units.html#KILOGRAM">kilogram</a>
<a href="Units.html#SECOND">second</a>,
<a href="Units.html#AMPERE">ampere</a>,
<a href="Units.html#KELVIN">kelvin</a>,
<a href="Units.html#MOLE">mole</a> and
<a href="Units.html#CANDELA">candela</a>)
together with some derived units
(<a href="Units.html#SQUARE_METRE">square metre</a>,
<a href="Units.html#CUBIC_METRE">cubic metre</a>,
<a href="Units.html#METRES_PER_SECOND">metres per second</a>,
<a href="Units.html#HERTZ">hertz</a>,
<a href="Units.html#PASCAL">pascal</a>,
<a href="Units.html#NEWTON">newton</a>,
<a href="Units.html#JOULE">joule</a>,
<a href="Units.html#WATT">watt</a>,
<a href="Units.html#TESLA">tesla</a>,
<i>etc.</i>)
and some dimensionless units
(<a href="Units.html#RADIAN">radian</a>,
<a href="Units.html#STERADIAN">steradian</a>,
<a href="Units.html#PIXEL">pixel</a>,
<a href="Units.html#UNITY">unity</a>).
In relation to units of measurement, this package also defines:
<ul>
<li><a href="Quantities.html" title="class in org.apache.sis.measure">Quantities</a>
as a <code>double</code> value value associated to a <code>Unit</code> instance.</li>
<li><a href="Angle.html" title="class in org.apache.sis.measure"><code>Angle</code></a> and its subclasses
(<a href="Longitude.html" title="class in org.apache.sis.measure"><code>Longitude</code></a>,
<a href="Latitude.html" title="class in org.apache.sis.measure"><code>Latitude</code></a>,
<a href="ElevationAngle.html" title="class in org.apache.sis.measure"><code>Elevation­Angle</code></a>)</li>
<li><a href="Range.html" title="class in org.apache.sis.measure"><code>Range</code></a> and its subclasses
(<a href="NumberRange.html" title="class in org.apache.sis.measure"><code>Number­Range</code></a>,
<a href="MeasurementRange.html" title="class in org.apache.sis.measure"><code>Measurement­Range</code></a>) or annotation
(<a href="ValueRange.html" title="annotation in org.apache.sis.measure"><code>Value­Range</code></a>)</li>
<li>Parsers and formatters
(<a href="AngleFormat.html" title="class in org.apache.sis.measure"><code>Angle­Format</code></a>,
<a href="RangeFormat.html" title="class in org.apache.sis.measure"><code>Range­Format</code></a>,
<a href="UnitFormat.html" title="class in org.apache.sis.measure"><code>Unit­Format</code></a>)</li>
</ul>
Apache SIS supports arithmetic operations on units and on quantities.
The unit (including SI prefix) and the quantity type resulting from
those arithmetic operations are automatically inferred.
For example this line of code:
<blockquote><pre>System.out.<b>println</b>( Units.PASCAL.<b>multiply</b>(1000) );</pre></blockquote>
prints <cite>"kPa"</cite>, i.e. the kilo prefix has been automatically applied
(SI prefixes are applied on SI units only, not on other systems).
Other example:
<blockquote><pre>Force f = Quantities.<b>create</b>(4, Units.NEWTON);
Length d = Quantities.<b>create</b>(6, Units.MILLIMETRE);
Time t = Quantities.<b>create</b>(3, Units.SECOND);
Quantity&lt;?&gt; e = f.<b>multiply</b>(d).<b>divide</b>(t);
System.out.<b>println</b>(e);
System.out.<b>println</b>(<font color="orangered">"Instance of Power: "</font> + (e <font color="green">instanceof</font> Power));</pre></blockquote>
prints <cite>"8 mW"</cite> and <cite>"Instance of Power: true"</cite>,
i.e. Apache SIS detects that the result of N⋅m∕s is Watt,
inherits the milli prefix from millimetre and creates an instance
of <a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/quantity/Power.html?is-external=true" title="class or interface in javax.measure.quantity" class="externalLink"><code>Power</code></a>, not just <code>Quantity&lt;Power&gt;</code> (the generic parent).
<p><a href="Units.html#valueOf(java.lang.String)">Parsing</a> and formatting use Unicode symbols by default, as in µg/m².
Parenthesis are recognized at parsing time and used for denominators at formatting time, as in kg/(m²⋅s).
While uncommon, Apache SIS accepts fractional powers as in m^⅔.
Some sentences like <cite>"100 feet"</cite>, <cite>"square metre"</cite> and <cite>"degree Kelvin"</cite>
are also recognized at parsing time.</p></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.3</dd>
<p><font size="-1">Defined in the <code>sis-utility</code> module</font></p>
</dl>
</section>
<ul class="blockList">
<li class="blockList">
<table class="typeSummary">
<caption><span>Interface Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Interface</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="AngularVelocity.html" title="interface in org.apache.sis.measure">AngularVelocity</a></th>
<td class="colLast">
<div class="block">The rate of change of an angular displacement with respect to time.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="Salinity.html" title="interface in org.apache.sis.measure">Salinity</a></th>
<td class="colLast">
<div class="block">The Practical Salinity Scale (PSS-78).</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<table class="typeSummary">
<caption><span>Class Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="Angle.html" title="class in org.apache.sis.measure">Angle</a></th>
<td class="colLast">
<div class="block">An angle in decimal degrees.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="AngleFormat.html" title="class in org.apache.sis.measure">AngleFormat</a></th>
<td class="colLast">
<div class="block">Parses and formats angles according a specified pattern.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="AngleFormat.Field.html" title="class in org.apache.sis.measure">AngleFormat.Field</a></th>
<td class="colLast">
<div class="block">Constants that are used as attribute keys in the iterator returned from
<a href="AngleFormat.html#formatToCharacterIterator(java.lang.Object)"><code>Angle­Format​.format­To­Character­Iterator(Object)</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="ElevationAngle.html" title="class in org.apache.sis.measure">ElevationAngle</a></th>
<td class="colLast">
<div class="block">The angular height of an object measured from the horizontal plane.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="Latitude.html" title="class in org.apache.sis.measure">Latitude</a></th>
<td class="colLast">
<div class="block">A latitude angle in decimal degrees.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="Longitude.html" title="class in org.apache.sis.measure">Longitude</a></th>
<td class="colLast">
<div class="block">A longitude angle in decimal degrees.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="MeasurementRange.html" title="class in org.apache.sis.measure">MeasurementRange</a>&lt;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> &amp; <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>&lt;? super E&gt;&gt;</th>
<td class="colLast">
<div class="block">A range of numbers associated with a unit of measurement.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="NumberRange.html" title="class in org.apache.sis.measure">NumberRange</a>&lt;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> &amp; <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>&lt;? super E&gt;&gt;</th>
<td class="colLast">
<div class="block">A range of numbers capable of widening conversions when performing range operations.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="Quantities.html" title="class in org.apache.sis.measure">Quantities</a></th>
<td class="colLast">
<div class="block">Provides static methods working on <a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Quantity.html?is-external=true" title="class or interface in javax.measure" class="externalLink"><code>Quantity</code></a> instances.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="Range.html" title="class in org.apache.sis.measure">Range</a>&lt;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>&lt;? super E&gt;&gt;</th>
<td class="colLast">
<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.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="RangeFormat.html" title="class in org.apache.sis.measure">RangeFormat</a></th>
<td class="colLast">
<div class="block">Parses and formats <a href="Range.html" title="class in org.apache.sis.measure"><code>Range</code></a> instances according the given locale.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="RangeFormat.Field.html" title="class in org.apache.sis.measure">RangeFormat.Field</a></th>
<td class="colLast">
<div class="block">Constants that are used as attribute keys in the iterator returned from
<a href="RangeFormat.html#formatToCharacterIterator(java.lang.Object)"><code>Range­Format​.format­To­Character­Iterator(Object)</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="UnitFormat.html" title="class in org.apache.sis.measure">UnitFormat</a></th>
<td class="colLast">
<div class="block">Parses and formats units of measurement as SI symbols, URI in OGC namespace or other symbols.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="Units.html" title="class in org.apache.sis.measure">Units</a></th>
<td class="colLast">
<div class="block">Provides constants for various Units of Measurement together with static methods working on <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"><code>Unit</code></a> instances.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="UnitServices.html" title="class in org.apache.sis.measure">UnitServices</a></th>
<td class="colLast">
<div class="block">The central point from which all unit services (parsing, formatting, listing, <i>etc</i>) can be obtained.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<table class="typeSummary">
<caption><span>Enum Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Enum</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="UnitFormat.Style.html" title="enum in org.apache.sis.measure">UnitFormat.Style</a></th>
<td class="colLast">
<div class="block">Identify whether unit formatting uses ASCII symbols, Unicode symbols or full localized names.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<table class="typeSummary">
<caption><span>Annotation Types Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Annotation Type</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="ValueRange.html" title="annotation in org.apache.sis.measure">ValueRange</a></th>
<td class="colLast">
<div class="block">The range of values assignable to a field, or to a JavaBean property.</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</div>
</main>
<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 class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-use.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&nbsp;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>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2010&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>