blob: bf3c03c5ca4618ea331fb7951ac226aa5711070c [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>Numbers (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.util.Numbers class">
<meta name="keywords" content="BIG_DECIMAL">
<meta name="keywords" content="BIG_INTEGER">
<meta name="keywords" content="FRACTION">
<meta name="keywords" content="DOUBLE">
<meta name="keywords" content="FLOAT">
<meta name="keywords" content="LONG">
<meta name="keywords" content="INTEGER">
<meta name="keywords" content="SHORT">
<meta name="keywords" content="BYTE">
<meta name="keywords" content="CHARACTER">
<meta name="keywords" content="BOOLEAN">
<meta name="keywords" content="OTHER">
<meta name="keywords" content="isFloat()">
<meta name="keywords" content="isInteger()">
<meta name="keywords" content="primitiveBitCount()">
<meta name="keywords" content="primitiveToWrapper()">
<meta name="keywords" content="wrapperToPrimitive()">
<meta name="keywords" content="widestClass()">
<meta name="keywords" content="narrowestClass()">
<meta name="keywords" content="narrowestNumber()">
<meta name="keywords" content="cast()">
<meta name="keywords" content="wrap()">
<meta name="keywords" content="valueOf()">
<meta name="keywords" content="valueOfNil()">
<meta name="keywords" content="getEnumConstant()">
<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="Numbers (Apache SIS 1.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static 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/Numbers.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>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</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">&nbsp;</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>&nbsp;<a href="package-summary.html">org.apache.sis.util</a></div>
<h2 title="Class Numbers" class="title">Class Numbers</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="Static.html" title="class in org.apache.sis.util">Static</a></li>
<li>
<ul class="inheritance">
<li>Numbers</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public final class <span class="typeNameLabel">Numbers</span>
extends <a href="Static.html" title="class in org.apache.sis.util">Static</a></pre>
<div class="block">Static methods working with <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, and a few primitive types by extension.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.3</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../math/MathFunctions.html" title="class in org.apache.sis.math"><code>Math­Functions</code></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">
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#BIG_DECIMAL">BIG_DECIMAL</a></span></code></th>
<td class="colLast">
<div class="block">Constant of value 11 used in <code>switch</code> statements or as index in arrays.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#BIG_INTEGER">BIG_INTEGER</a></span></code></th>
<td class="colLast">
<div class="block">Constant of value 10 used in <code>switch</code> statements or as index in arrays.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#BOOLEAN">BOOLEAN</a></span></code></th>
<td class="colLast">
<div class="block">Constant of value 1 used in <code>switch</code> statements or as index in arrays.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#BYTE">BYTE</a></span></code></th>
<td class="colLast">
<div class="block">Constant of value 3 used in <code>switch</code> statements or as index in arrays.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#CHARACTER">CHARACTER</a></span></code></th>
<td class="colLast">
<div class="block">Constant of value 2 used in <code>switch</code> statements or as index in arrays.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DOUBLE">DOUBLE</a></span></code></th>
<td class="colLast">
<div class="block">Constant of value 9 used in <code>switch</code> statements or as index in arrays.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FLOAT">FLOAT</a></span></code></th>
<td class="colLast">
<div class="block">Constant of value 8 used in <code>switch</code> statements or as index in arrays.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#FRACTION">FRACTION</a></span></code></th>
<td class="colLast">
<div class="block">Constant of value 7 used in <code>switch</code> statements or as index in arrays.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#INTEGER">INTEGER</a></span></code></th>
<td class="colLast">
<div class="block">Constant of value 5 used in <code>switch</code> statements or as index in arrays.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#LONG">LONG</a></span></code></th>
<td class="colLast">
<div class="block">Constant of value 6 used in <code>switch</code> statements or as index in arrays.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#OTHER">OTHER</a></span></code></th>
<td class="colLast">
<div class="block">Constant of value 0 used in <code>switch</code> statements or as index in arrays.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#SHORT">SHORT</a></span></code></th>
<td class="colLast">
<div class="block">Constant of value 4 used in <code>switch</code> statements or as index in arrays.</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">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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 &lt;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>&gt;<br>N</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#cast(java.lang.Number,java.lang.Class)">cast</a></span>&#8203;(<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>&nbsp;number,
<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>&lt;N&gt;&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Casts a number to the specified type.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static byte</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getEnumConstant(java.lang.Class)">getEnumConstant</a></span>&#8203;(<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>&lt;?&gt;&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Returns a numeric constant for the given type.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isFloat(java.lang.Class)">isFloat</a></span>&#8203;(<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>&lt;?&gt;&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if the given <code>type</code> is a floating point type.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isInteger(java.lang.Class)">isInteger</a></span>&#8203;(<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>&lt;?&gt;&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Returns <code>true</code> if the given <code>type</code> is an integer type.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static <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>&lt;? 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>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#narrowestClass(java.lang.Class,java.lang.Class)">narrowestClass</a></span>&#8203;(<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>&lt;? 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>&gt;&nbsp;c1,
<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>&lt;? 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>&gt;&nbsp;c2)</code></th>
<td class="colLast">
<div class="block">Returns the narrowest of the given types.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <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>&lt;? 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>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#narrowestClass(java.lang.Number)">narrowestClass</a></span>&#8203;(<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>&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Returns the smallest class capable to hold the specified value.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <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>&lt;? 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>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#narrowestClass(java.lang.Number,java.lang.Number)">narrowestClass</a></span>&#8203;(<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>&nbsp;n1,
<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>&nbsp;n2)</code></th>
<td class="colLast">
<div class="block">Returns the narrowest type of two numbers.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <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></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#narrowestNumber(java.lang.Number)">narrowestNumber</a></span>&#8203;(<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>&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Returns the given number wrapped in the smallest class capable to hold the specified value.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static <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></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#narrowestNumber(java.lang.String)">narrowestNumber</a></span>&#8203;(<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>&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Returns the smallest number capable to hold the specified value.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#primitiveBitCount(java.lang.Class)">primitiveBitCount</a></span>&#8203;(<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>&lt;?&gt;&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Returns the number of bits used by primitive of the specified type.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static <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>&lt;?&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#primitiveToWrapper(java.lang.Class)">primitiveToWrapper</a></span>&#8203;(<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>&lt;?&gt;&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Changes a primitive class to its wrapper (for example <code>int</code> to <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>).</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;T</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#valueOf(java.lang.String,java.lang.Class)">valueOf</a></span>&#8203;(<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>&nbsp;value,
<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>&lt;T&gt;&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Converts the specified string into a value object.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;T</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#valueOfNil(java.lang.Class)">valueOfNil</a></span>&#8203;(<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>&lt;T&gt;&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Returns a <code>Na­N</code>, zero, empty or <code>null</code> value of the given type.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static <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>&lt;? 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>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#widestClass(java.lang.Class,java.lang.Class)">widestClass</a></span>&#8203;(<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>&lt;? 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>&gt;&nbsp;c1,
<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>&lt;? 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>&gt;&nbsp;c2)</code></th>
<td class="colLast">
<div class="block">Returns the widest of the given types.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static <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>&lt;? 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>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#widestClass(java.lang.Number,java.lang.Number)">widestClass</a></span>&#8203;(<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>&nbsp;n1,
<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>&nbsp;n2)</code></th>
<td class="colLast">
<div class="block">Returns the widest type of two numbers.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static &lt;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>&gt;<br>N</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#wrap(double,java.lang.Class)">wrap</a></span>&#8203;(double&nbsp;value,
<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>&lt;N&gt;&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Wraps the given floating-point value in a <code>Number</code> of the specified class.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static &lt;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>&gt;<br>N</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#wrap(long,java.lang.Class)">wrap</a></span>&#8203;(long&nbsp;value,
<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>&lt;N&gt;&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Wraps the given integer value in a <code>Number</code> of the specified class.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static <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>&lt;?&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#wrapperToPrimitive(java.lang.Class)">wrapperToPrimitive</a></span>&#8203;(<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>&lt;?&gt;&nbsp;type)</code></th>
<td class="colLast">
<div class="block">Changes a wrapper class to its primitive (for example <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> to <code>int</code>).</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;<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#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</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">get­Class</a>, <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">hash­Code</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">notify­All</a>, <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">to­String</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">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="BIG_DECIMAL">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BIG_DECIMAL</h4>
<pre>public static final&nbsp;byte BIG_DECIMAL</pre>
<div class="block">Constant of value 11 used in <code>switch</code> statements or as index in arrays.
This enumeration provides the following guarantees (some Apache SIS codes rely on them):
<ul>
<li><code>OTHER</code> value is 0.</li>
<li>Primitive types are enumerated in this exact order
(from lower value to higher value, but not necessarily as consecutive values):
<code>BYTE</code>, <code>SHORT</code>, <code>INTEGER</code>, <code>LONG</code>, <code>FLOAT</code>, <code>DOUBLE</code>.</li>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/math/package-summary.html?is-external=true" class="externalLink"><code>java​.math</code></a> types of greater capacity than primitive types (<code>BIG_DECIMAL</code>
and <code>BIG_INTEGER</code>) have higher enumeration values.</li>
<li><a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a> is considered as a kind of floating point value.</li>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.util.Numbers.BIG_DECIMAL">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="BIG_INTEGER">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BIG_INTEGER</h4>
<pre>public static final&nbsp;byte BIG_INTEGER</pre>
<div class="block">Constant of value 10 used in <code>switch</code> statements or as index in arrays.
This enumeration provides the following guarantees (some Apache SIS codes rely on them):
<ul>
<li><code>OTHER</code> value is 0.</li>
<li>Primitive types are enumerated in this exact order
(from lower value to higher value, but not necessarily as consecutive values):
<code>BYTE</code>, <code>SHORT</code>, <code>INTEGER</code>, <code>LONG</code>, <code>FLOAT</code>, <code>DOUBLE</code>.</li>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/math/package-summary.html?is-external=true" class="externalLink"><code>java​.math</code></a> types of greater capacity than primitive types (<code>BIG_DECIMAL</code>
and <code>BIG_INTEGER</code>) have higher enumeration values.</li>
<li><a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a> is considered as a kind of floating point value.</li>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.util.Numbers.BIG_INTEGER">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="FRACTION">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FRACTION</h4>
<pre>public static final&nbsp;byte FRACTION</pre>
<div class="block">Constant of value 7 used in <code>switch</code> statements or as index in arrays.
This enumeration provides the following guarantees (some Apache SIS codes rely on them):
<ul>
<li><code>OTHER</code> value is 0.</li>
<li>Primitive types are enumerated in this exact order
(from lower value to higher value, but not necessarily as consecutive values):
<code>BYTE</code>, <code>SHORT</code>, <code>INTEGER</code>, <code>LONG</code>, <code>FLOAT</code>, <code>DOUBLE</code>.</li>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/math/package-summary.html?is-external=true" class="externalLink"><code>java​.math</code></a> types of greater capacity than primitive types (<code>BIG_DECIMAL</code>
and <code>BIG_INTEGER</code>) have higher enumeration values.</li>
<li><a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a> is considered as a kind of floating point value.</li>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.util.Numbers.FRACTION">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="DOUBLE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DOUBLE</h4>
<pre>public static final&nbsp;byte DOUBLE</pre>
<div class="block">Constant of value 9 used in <code>switch</code> statements or as index in arrays.
This enumeration provides the following guarantees (some Apache SIS codes rely on them):
<ul>
<li><code>OTHER</code> value is 0.</li>
<li>Primitive types are enumerated in this exact order
(from lower value to higher value, but not necessarily as consecutive values):
<code>BYTE</code>, <code>SHORT</code>, <code>INTEGER</code>, <code>LONG</code>, <code>FLOAT</code>, <code>DOUBLE</code>.</li>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/math/package-summary.html?is-external=true" class="externalLink"><code>java​.math</code></a> types of greater capacity than primitive types (<code>BIG_DECIMAL</code>
and <code>BIG_INTEGER</code>) have higher enumeration values.</li>
<li><a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a> is considered as a kind of floating point value.</li>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.util.Numbers.DOUBLE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="FLOAT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FLOAT</h4>
<pre>public static final&nbsp;byte FLOAT</pre>
<div class="block">Constant of value 8 used in <code>switch</code> statements or as index in arrays.
This enumeration provides the following guarantees (some Apache SIS codes rely on them):
<ul>
<li><code>OTHER</code> value is 0.</li>
<li>Primitive types are enumerated in this exact order
(from lower value to higher value, but not necessarily as consecutive values):
<code>BYTE</code>, <code>SHORT</code>, <code>INTEGER</code>, <code>LONG</code>, <code>FLOAT</code>, <code>DOUBLE</code>.</li>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/math/package-summary.html?is-external=true" class="externalLink"><code>java​.math</code></a> types of greater capacity than primitive types (<code>BIG_DECIMAL</code>
and <code>BIG_INTEGER</code>) have higher enumeration values.</li>
<li><a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a> is considered as a kind of floating point value.</li>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.util.Numbers.FLOAT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="LONG">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LONG</h4>
<pre>public static final&nbsp;byte LONG</pre>
<div class="block">Constant of value 6 used in <code>switch</code> statements or as index in arrays.
This enumeration provides the following guarantees (some Apache SIS codes rely on them):
<ul>
<li><code>OTHER</code> value is 0.</li>
<li>Primitive types are enumerated in this exact order
(from lower value to higher value, but not necessarily as consecutive values):
<code>BYTE</code>, <code>SHORT</code>, <code>INTEGER</code>, <code>LONG</code>, <code>FLOAT</code>, <code>DOUBLE</code>.</li>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/math/package-summary.html?is-external=true" class="externalLink"><code>java​.math</code></a> types of greater capacity than primitive types (<code>BIG_DECIMAL</code>
and <code>BIG_INTEGER</code>) have higher enumeration values.</li>
<li><a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a> is considered as a kind of floating point value.</li>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.util.Numbers.LONG">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="INTEGER">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>INTEGER</h4>
<pre>public static final&nbsp;byte INTEGER</pre>
<div class="block">Constant of value 5 used in <code>switch</code> statements or as index in arrays.
This enumeration provides the following guarantees (some Apache SIS codes rely on them):
<ul>
<li><code>OTHER</code> value is 0.</li>
<li>Primitive types are enumerated in this exact order
(from lower value to higher value, but not necessarily as consecutive values):
<code>BYTE</code>, <code>SHORT</code>, <code>INTEGER</code>, <code>LONG</code>, <code>FLOAT</code>, <code>DOUBLE</code>.</li>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/math/package-summary.html?is-external=true" class="externalLink"><code>java​.math</code></a> types of greater capacity than primitive types (<code>BIG_DECIMAL</code>
and <code>BIG_INTEGER</code>) have higher enumeration values.</li>
<li><a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a> is considered as a kind of floating point value.</li>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.util.Numbers.INTEGER">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="SHORT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SHORT</h4>
<pre>public static final&nbsp;byte SHORT</pre>
<div class="block">Constant of value 4 used in <code>switch</code> statements or as index in arrays.
This enumeration provides the following guarantees (some Apache SIS codes rely on them):
<ul>
<li><code>OTHER</code> value is 0.</li>
<li>Primitive types are enumerated in this exact order
(from lower value to higher value, but not necessarily as consecutive values):
<code>BYTE</code>, <code>SHORT</code>, <code>INTEGER</code>, <code>LONG</code>, <code>FLOAT</code>, <code>DOUBLE</code>.</li>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/math/package-summary.html?is-external=true" class="externalLink"><code>java​.math</code></a> types of greater capacity than primitive types (<code>BIG_DECIMAL</code>
and <code>BIG_INTEGER</code>) have higher enumeration values.</li>
<li><a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a> is considered as a kind of floating point value.</li>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.util.Numbers.SHORT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="BYTE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BYTE</h4>
<pre>public static final&nbsp;byte BYTE</pre>
<div class="block">Constant of value 3 used in <code>switch</code> statements or as index in arrays.
This enumeration provides the following guarantees (some Apache SIS codes rely on them):
<ul>
<li><code>OTHER</code> value is 0.</li>
<li>Primitive types are enumerated in this exact order
(from lower value to higher value, but not necessarily as consecutive values):
<code>BYTE</code>, <code>SHORT</code>, <code>INTEGER</code>, <code>LONG</code>, <code>FLOAT</code>, <code>DOUBLE</code>.</li>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/math/package-summary.html?is-external=true" class="externalLink"><code>java​.math</code></a> types of greater capacity than primitive types (<code>BIG_DECIMAL</code>
and <code>BIG_INTEGER</code>) have higher enumeration values.</li>
<li><a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a> is considered as a kind of floating point value.</li>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.util.Numbers.BYTE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="CHARACTER">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CHARACTER</h4>
<pre>public static final&nbsp;byte CHARACTER</pre>
<div class="block">Constant of value 2 used in <code>switch</code> statements or as index in arrays.
This enumeration provides the following guarantees (some Apache SIS codes rely on them):
<ul>
<li><code>OTHER</code> value is 0.</li>
<li>Primitive types are enumerated in this exact order
(from lower value to higher value, but not necessarily as consecutive values):
<code>BYTE</code>, <code>SHORT</code>, <code>INTEGER</code>, <code>LONG</code>, <code>FLOAT</code>, <code>DOUBLE</code>.</li>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/math/package-summary.html?is-external=true" class="externalLink"><code>java​.math</code></a> types of greater capacity than primitive types (<code>BIG_DECIMAL</code>
and <code>BIG_INTEGER</code>) have higher enumeration values.</li>
<li><a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a> is considered as a kind of floating point value.</li>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.util.Numbers.CHARACTER">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="BOOLEAN">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BOOLEAN</h4>
<pre>public static final&nbsp;byte BOOLEAN</pre>
<div class="block">Constant of value 1 used in <code>switch</code> statements or as index in arrays.
This enumeration provides the following guarantees (some Apache SIS codes rely on them):
<ul>
<li><code>OTHER</code> value is 0.</li>
<li>Primitive types are enumerated in this exact order
(from lower value to higher value, but not necessarily as consecutive values):
<code>BYTE</code>, <code>SHORT</code>, <code>INTEGER</code>, <code>LONG</code>, <code>FLOAT</code>, <code>DOUBLE</code>.</li>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/math/package-summary.html?is-external=true" class="externalLink"><code>java​.math</code></a> types of greater capacity than primitive types (<code>BIG_DECIMAL</code>
and <code>BIG_INTEGER</code>) have higher enumeration values.</li>
<li><a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a> is considered as a kind of floating point value.</li>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.util.Numbers.BOOLEAN">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="OTHER">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>OTHER</h4>
<pre>public static final&nbsp;byte OTHER</pre>
<div class="block">Constant of value 0 used in <code>switch</code> statements or as index in arrays.
This enumeration provides the following guarantees (some Apache SIS codes rely on them):
<ul>
<li><code>OTHER</code> value is 0.</li>
<li>Primitive types are enumerated in this exact order
(from lower value to higher value, but not necessarily as consecutive values):
<code>BYTE</code>, <code>SHORT</code>, <code>INTEGER</code>, <code>LONG</code>, <code>FLOAT</code>, <code>DOUBLE</code>.</li>
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/math/package-summary.html?is-external=true" class="externalLink"><code>java​.math</code></a> types of greater capacity than primitive types (<code>BIG_DECIMAL</code>
and <code>BIG_INTEGER</code>) have higher enumeration values.</li>
<li><a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a> is considered as a kind of floating point value.</li>
</ul></div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.sis.util.Numbers.OTHER">Constant Field Values</a></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="isFloat(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isFloat</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isFloat&#8203;(<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>&lt;?&gt;&nbsp;type)</pre>
<div class="block">Returns <code>true</code> if the given <code>type</code> is a floating point type. The floating point types
are <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>, <code>float</code>, <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>, <code>double</code> and <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Decimal</code></a>.
<a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a> is also considered as a kind of floating point values.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - the primitive type or wrapper class to test (can be <code>null</code>).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if <code>type</code> is one of the known types capable to represent floating point numbers.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#isInteger(java.lang.Class)"><code>is­Integer(Class)</code></a></dd>
</dl>
</li>
</ul>
<a id="isInteger(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isInteger</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isInteger&#8203;(<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>&lt;?&gt;&nbsp;type)</pre>
<div class="block">Returns <code>true</code> if the given <code>type</code> is an integer type. The integer types are
<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>, <code>byte</code>, <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>, <code>short</code>, <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>, <code>int</code>,
<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>, <code>long</code> and <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Integer</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - the primitive type or wrapper class to test (can be <code>null</code>).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if <code>type</code> is an integer type.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#isFloat(java.lang.Class)"><code>is­Float(Class)</code></a></dd>
</dl>
</li>
</ul>
<a id="primitiveBitCount(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>primitiveBitCount</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;primitiveBitCount&#8203;(<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>&lt;?&gt;&nbsp;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">Returns the number of bits used by primitive of the specified type.
The given type must be a primitive type or its wrapper class.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - the primitive type (can be <code>null</code>).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of bits, or 0 if <code>type</code> is null.</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">Illegal­Argument­Exception</a></code> - if the given type is not one of the types supported by this <code>Numbers</code> class.</dd>
</dl>
</li>
</ul>
<a id="primitiveToWrapper(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>primitiveToWrapper</h4>
<pre class="methodSignature">public static&nbsp;<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>&lt;?&gt;&nbsp;primitiveToWrapper&#8203;(<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>&lt;?&gt;&nbsp;type)</pre>
<div class="block">Changes a primitive class to its wrapper (for example <code>int</code> to <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>).
If the specified class is not a primitive type, then it is returned unchanged.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - the primitive type (can be <code>null</code>).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the type as a wrapper.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#wrapperToPrimitive(java.lang.Class)"><code>wrapper­To­Primitive(Class)</code></a></dd>
</dl>
</li>
</ul>
<a id="wrapperToPrimitive(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrapperToPrimitive</h4>
<pre class="methodSignature">public static&nbsp;<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>&lt;?&gt;&nbsp;wrapperToPrimitive&#8203;(<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>&lt;?&gt;&nbsp;type)</pre>
<div class="block">Changes a wrapper class to its primitive (for example <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> to <code>int</code>).
If the specified class is not a wrapper type, then it is returned unchanged.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - the wrapper type (can be <code>null</code>).</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the type as a primitive.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#primitiveToWrapper(java.lang.Class)"><code>primitive­To­Wrapper(Class)</code></a></dd>
</dl>
</li>
</ul>
<a id="widestClass(java.lang.Number,java.lang.Number)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>widestClass</h4>
<pre class="methodSignature">public static&nbsp;<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>&lt;? 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>&gt;&nbsp;widestClass&#8203;(<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>&nbsp;n1,
<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>&nbsp;n2)
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 widest type of two numbers. Numbers <code>n1</code> and <code>n2</code> can be instance 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>, <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>,
<a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Integer</code></a> or <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Decimal</code></a> types.
<p>If one of the given argument is null, then this method returns the class of the non-null argument.
If both arguments are null, then this method returns <code>null</code>.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>n1</code> - the first number, or <code>null</code>.</dd>
<dd><code>n2</code> - the second number, or <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the widest type of the given numbers, or <code>null</code> if both <code>n1</code> and <code>n2</code> are null.</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">Illegal­Argument­Exception</a></code> - if a number is not an instance of a supported type.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#widestClass(java.lang.Number,java.lang.Number)"><code>widest­Class(Number, Number)</code></a>,
<a href="#narrowestClass(java.lang.Number,java.lang.Number)"><code>narrowest­Class(Number, Number)</code></a></dd>
</dl>
</li>
</ul>
<a id="widestClass(java.lang.Class,java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>widestClass</h4>
<pre class="methodSignature">public static&nbsp;<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>&lt;? 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>&gt;&nbsp;widestClass&#8203;(<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>&lt;? 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>&gt;&nbsp;c1,
<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>&lt;? 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>&gt;&nbsp;c2)
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 widest of the given types. Classes <code>c1</code> and <code>c2</code> can be
<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>, <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>,
<a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Integer</code></a> or <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Decimal</code></a> types.
<p>If one of the given argument is null, then this method returns the non-null argument.
If both arguments are null, then this method returns <code>null</code>.</p>
<div class="note"><b>Example:</b>
in the following code, <code>type</code> is set to <code>Long​.class</code>:
<blockquote><pre>Class&lt;?&gt; type = <b>widestClass</b>(Short.<font color="green">class</font>, Long.<font color="green">class</font>);</pre></blockquote>
</div></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>c1</code> - the first number type, or <code>null</code>.</dd>
<dd><code>c2</code> - the second number type, or <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the widest of the given types, or <code>null</code> if both <code>c1</code> and <code>c2</code> are null.</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">Illegal­Argument­Exception</a></code> - if one of the given types is not supported by this <code>Numbers</code> class.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#widestClass(java.lang.Class,java.lang.Class)"><code>widest­Class(Class, Class)</code></a>,
<a href="#narrowestClass(java.lang.Number,java.lang.Number)"><code>narrowest­Class(Number, Number)</code></a></dd>
</dl>
</li>
</ul>
<a id="narrowestClass(java.lang.Number,java.lang.Number)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>narrowestClass</h4>
<pre class="methodSignature">public static&nbsp;<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>&lt;? 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>&gt;&nbsp;narrowestClass&#8203;(<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>&nbsp;n1,
<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>&nbsp;n2)
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 narrowest type of two numbers. Numbers <code>n1</code> and <code>n2</code> can be instance 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>, <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>,
<a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Integer</code></a> or <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Decimal</code></a> types.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>n1</code> - the first number, or <code>null</code>.</dd>
<dd><code>n2</code> - the second number, or <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the narrowest type of the given numbers, or <code>null</code> if both <code>n1</code> and <code>n2</code> are null.</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">Illegal­Argument­Exception</a></code> - if a number is not an instance of a supported type.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#narrowestClass(java.lang.Class,java.lang.Class)"><code>narrowest­Class(Class, Class)</code></a>,
<a href="#widestClass(java.lang.Class,java.lang.Class)"><code>widest­Class(Class, Class)</code></a></dd>
</dl>
</li>
</ul>
<a id="narrowestClass(java.lang.Class,java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>narrowestClass</h4>
<pre class="methodSignature">public static&nbsp;<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>&lt;? 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>&gt;&nbsp;narrowestClass&#8203;(<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>&lt;? 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>&gt;&nbsp;c1,
<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>&lt;? 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>&gt;&nbsp;c2)
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 narrowest of the given types. Classes <code>c1</code> and <code>c2</code> can be
<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>, <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>,
<a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Integer</code></a> or <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Decimal</code></a> types.
<p>If one of the given argument is null, then this method returns the non-null argument.
If both arguments are null, then this method returns <code>null</code>.</p>
<div class="note"><b>Example:</b>
in the following code, <code>type</code> is set to <code>Short​.class</code>:
<blockquote><pre>Class&lt;?&gt; type = <b>widestClass</b>(Short.<font color="green">class</font>, Long.<font color="green">class</font>);</pre></blockquote>
</div></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>c1</code> - the first number type, or <code>null</code>.</dd>
<dd><code>c2</code> - the second number type, or <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the narrowest of the given types, or <code>null</code> if both <code>c1</code> and <code>c2</code> are null.</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">Illegal­Argument­Exception</a></code> - if one of the given types is not supported by this <code>Numbers</code> class.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#narrowestClass(java.lang.Number,java.lang.Number)"><code>narrowest­Class(Number, Number)</code></a>,
<a href="#widestClass(java.lang.Class,java.lang.Class)"><code>widest­Class(Class, Class)</code></a></dd>
</dl>
</li>
</ul>
<a id="narrowestClass(java.lang.Number)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>narrowestClass</h4>
<pre class="methodSignature">public static&nbsp;<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>&lt;? 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>&gt;&nbsp;narrowestClass&#8203;(<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>&nbsp;value)</pre>
<div class="block">Returns the smallest class capable to hold the specified value.
This method applies the following choices, in that order:
<ul>
<li>If the given value is <code>null</code>, then this method returns <code>null</code>.</li>
<li>Otherwise if the given value can not be casted from <code>double</code> to another type
without precision lost, return <code>Double​.class</code>.</li>
<li>Otherwise if the given value can not be casted from <code>float</code> to another type
without precision lost, return <code>Float​.class</code>.</li>
<li>Otherwise if the given value is 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>, then this method returns <code>Byte​.class</code>;</li>
<li>Otherwise if the given value is 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>, then this method returns <code>Short​.class</code>;</li>
<li>Otherwise if the given value is 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>, then this method returns <code>Integer​.class</code>;</li>
<li>Otherwise this method returns <code>Long​.class</code>;</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the value to be wrapped in a finer (if possible) <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>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the narrowest type capable to hold the given value.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#narrowestNumber(java.lang.Number)"><code>narrowest­Number(Number)</code></a></dd>
</dl>
</li>
</ul>
<a id="narrowestNumber(java.lang.Number)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>narrowestNumber</h4>
<pre class="methodSignature">public static&nbsp;<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>&nbsp;narrowestNumber&#8203;(<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>&nbsp;value)</pre>
<div class="block">Returns the given number wrapped in the smallest class capable to hold the specified value.
This method is equivalent to the following code, in a slightly more efficient way:
<blockquote><pre><font color="green">return</font> <b>cast</b>(value, <b>narrowestClass</b>(value));</pre></blockquote></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the value to be wrapped in a finer (if possible) <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>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the narrowest type capable to hold the given value.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#narrowestClass(java.lang.Number)"><code>narrowest­Class(Number)</code></a>,
<a href="#cast(java.lang.Number,java.lang.Class)"><code>cast(Number, Class)</code></a></dd>
</dl>
</li>
</ul>
<a id="narrowestNumber(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>narrowestNumber</h4>
<pre class="methodSignature">public static&nbsp;<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>&nbsp;narrowestNumber&#8203;(<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>&nbsp;value)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NumberFormatException.html?is-external=true" title="class or interface in java.lang" class="externalLink">NumberFormatException</a></pre>
<div class="block">Returns the smallest number capable to hold the specified value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the value to be wrapped in 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>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the narrowest type capable to hold the given value.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NumberFormatException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number­Format­Exception</a></code> - if the given value can not be parsed as a number.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#narrowestNumber(java.lang.Number)"><code>narrowest­Number(Number)</code></a></dd>
</dl>
</li>
</ul>
<a id="cast(java.lang.Number,java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cast</h4>
<pre class="methodSignature">public static&nbsp;&lt;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>&gt;&nbsp;N&nbsp;cast&#8203;(<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>&nbsp;number,
<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>&lt;N&gt;&nbsp;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 a number to the specified type. The target type can 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>, <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>,
<a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Integer</code></a> or <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Decimal</code></a>.
This method makes the following choice:
<ul>
<li>If the given value is <code>null</code> or an instance of the given type, then it is returned unchanged.</li>
<li>Otherwise if the given type is <code>Double​.class</code>, then this method returns
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#valueOf(double)" title="class or interface in java.lang" class="externalLink">Double​.value­Of</a>(number​.double­Value())</code>;</li>
<li>Otherwise if the given type is <code>Float​.class</code>, then this method returns
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#valueOf(float)" title="class or interface in java.lang" class="externalLink">Float​.value­Of</a>(number​.float­Value())</code>;</li>
<li>And likewise for all remaining known types.</li>
</ul>
This method does not verify if the given type is wide enough for the given value,
because the type has typically been calculated by <a href="#widestClass(java.lang.Class,java.lang.Class)"><code>widest­Class(Class, Class)</code></a>
or <a href="#narrowestClass(java.lang.Number)"><code>narrowest­Class(Number)</code></a>. If nevertheless the given type is not wide enough,
then the behavior depends on the implementation of the corresponding
<code>Number​.foo­Value()</code> method - typically, the value is just rounded or truncated.</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>number</code> - the number to cast, or <code>null</code>.</dd>
<dd><code>type</code> - the destination type.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number casted to the given type, or <code>null</code> if the given value was null.</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">Illegal­Argument­Exception</a></code> - if the given type is not supported by this <code>Numbers</code> class,
or the type is <a href="#FRACTION"><code>FRACTION</code></a> and the given number can not be converted to that type.</dd>
</dl>
</li>
</ul>
<a id="wrap(double,java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrap</h4>
<pre class="methodSignature">public static&nbsp;&lt;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>&gt;&nbsp;N&nbsp;wrap&#8203;(double&nbsp;value,
<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>&lt;N&gt;&nbsp;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">Wraps the given floating-point value in a <code>Number</code> of the specified class.
The given type shall 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>, <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>, <a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Integer</code></a> and <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Decimal</code></a> classes.
Furthermore, the given value shall be convertible to the given class without precision lost,
otherwise 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>Illegal­Argument­Exception</code></a> will be thrown.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>N</code> - the wrapper class.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the value to wrap.</dd>
<dd><code>type</code> - the desired wrapper class.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value wrapped in an object of the given class.</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">Illegal­Argument­Exception</a></code> - if the given type is not supported by this <code>Numbers</code> class,
or if the given value can not be wrapped in an instance of the given class without precision lost.</dd>
</dl>
</li>
</ul>
<a id="wrap(long,java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrap</h4>
<pre class="methodSignature">public static&nbsp;&lt;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>&gt;&nbsp;N&nbsp;wrap&#8203;(long&nbsp;value,
<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>&lt;N&gt;&nbsp;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">Wraps the given integer value in a <code>Number</code> of the specified class.
The given type shall 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>, <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>, <a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Integer</code></a> and <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Decimal</code></a> classes.
Furthermore, the given value shall be convertible to the given class without precision lost,
otherwise 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>Illegal­Argument­Exception</code></a> will be thrown.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>N</code> - the wrapper class.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the value to wrap.</dd>
<dd><code>type</code> - the desired wrapper class.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value wrapped in an object of the given class.</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">Illegal­Argument­Exception</a></code> - if the given type is not supported by this <code>Numbers</code> class,
or if the given value can not be wrapped in an instance of the given class without precision lost.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.8</dd>
</dl>
</li>
</ul>
<a id="valueOf(java.lang.String,java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>valueOf</h4>
<pre class="methodSignature">public static&nbsp;&lt;T&gt;&nbsp;T&nbsp;valueOf&#8203;(<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>&nbsp;value,
<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>&lt;T&gt;&nbsp;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>,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NumberFormatException.html?is-external=true" title="class or interface in java.lang" class="externalLink">NumberFormatException</a></pre>
<div class="block">Converts the specified string into a value object.
The value object can be an instance of <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Decimal</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html?is-external=true" title="class or interface in java.math" class="externalLink"><code>Big­Integer</code></a>, <a href="../math/Fraction.html" title="class in org.apache.sis.math"><code>Fraction</code></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"><code>Double</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>, <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/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/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/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/Boolean.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Boolean</code></a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Character.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Character</code></a> or <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"><code>String</code></a> according the specified type.
This method makes the following choice:
<ul>
<li>If the given type is <code>Double​.class</code>, then this method returns
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#valueOf(java.lang.String)" title="class or interface in java.lang" class="externalLink">Double​.value­Of</a>(value)</code>;</li>
<li>If the given type is <code>Float​.class</code>, then this method returns
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#valueOf(java.lang.String)" title="class or interface in java.lang" class="externalLink">Float​.value­Of</a>(value)</code>;</li>
<li>And likewise for all remaining known types.</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the requested type.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the value to parse.</dd>
<dd><code>type</code> - the requested type.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value object, or <code>null</code> if <code>value</code> was null.</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">Illegal­Argument­Exception</a></code> - if <code>type</code> is not a recognized type.</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NumberFormatException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Number­Format­Exception</a></code> - if <code>type</code> is 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>
and the string value is not parsable as a number of the specified type.</dd>
</dl>
</li>
</ul>
<a id="valueOfNil(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>valueOfNil</h4>
<pre class="methodSignature">public static&nbsp;&lt;T&gt;&nbsp;T&nbsp;valueOfNil&#8203;(<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>&lt;T&gt;&nbsp;type)</pre>
<div class="block">Returns a <code>Na­N</code>, zero, empty or <code>null</code> value of the given type. This method
tries to return the closest value that can be interpreted as <cite>"none"</cite>, which
is usually not the same than <cite>"zero"</cite>. More specifically:
<ul>
<li>If the given type is a floating point <strong>primitive</strong> type (<code>float</code>
or <code>double</code>), then this method returns <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​.Na­N</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​.Na­N</code></a>
depending on the given type.</li>
<li>If the given type is an integer <strong>primitive</strong> type or the character type
(<code>long</code>, <code>int</code>, <code>short</code>, <code>byte</code> or <code>char</code>), then this
method returns the zero value of the given type.</li>
<li>If the given type is the <code>boolean</code> <strong>primitive</strong> type, then this
method returns <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true#FALSE" title="class or interface in java.lang" class="externalLink"><code>Boolean​.FALSE</code></a>.</li>
<li>If the given type is an array or a collection, then this method returns an empty
array or collection. The given type is honored on a <cite>best effort</cite> basis.</li>
<li>For all other cases, including the wrapper classes of primitive types, this method
returns <code>null</code>.</li>
</ul>
Despite being defined in the <code>Numbers</code> class, the scope of this method has been
extended to array and collection types because those objects can also be seen as
mathematical concepts.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - the compile-time type of the requested object.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - the type of the object for which to get a nil value.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an object of the given type which represents a nil value, or <code>null</code>.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../xml/NilObject.html" title="interface in org.apache.sis.xml"><code>Nil­Object</code></a></dd>
</dl>
</li>
</ul>
<a id="getEnumConstant(java.lang.Class)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getEnumConstant</h4>
<pre class="methodSignature">public static&nbsp;byte&nbsp;getEnumConstant&#8203;(<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>&lt;?&gt;&nbsp;type)</pre>
<div class="block">Returns a numeric constant for the given type.
The constants are <a href="#BIG_DECIMAL"><code>BIG_DECIMAL</code></a>, <a href="#BIG_INTEGER"><code>BIG_INTEGER</code></a>, <a href="#FRACTION"><code>FRACTION</code></a>,
<a href="#DOUBLE"><code>DOUBLE</code></a>, <a href="#FLOAT"><code>FLOAT</code></a>, <a href="#LONG"><code>LONG</code></a>, <a href="#INTEGER"><code>INTEGER</code></a>,
<a href="#SHORT"><code>SHORT</code></a>, <a href="#BYTE"><code>BYTE</code></a>, <a href="#CHARACTER"><code>CHARACTER</code></a>, <a href="#BOOLEAN"><code>BOOLEAN</code></a>, or <a href="#OTHER"><code>OTHER</code></a>
constants for the given type. This is a commodity for usage in <code>switch</code> statements.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>type</code> - a type (usually either a primitive type or its wrapper), or <code>null</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the constant for the given type, or <a href="#OTHER"><code>OTHER</code></a> if unknown.</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/Numbers.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>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</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 &#169; 2010&#x2013;2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>