blob: 2a40e81a7549d88a51f0ac2968d1e56552220c22 [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>ArgumentChecks (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.ArgumentChecks class">
<meta name="keywords" content="ensureNonNull()">
<meta name="keywords" content="ensureNonNullElement()">
<meta name="keywords" content="ensureNonEmpty()">
<meta name="keywords" content="ensureExpectedCount()">
<meta name="keywords" content="ensureCanCast()">
<meta name="keywords" content="ensureValidIndex()">
<meta name="keywords" content="ensureValidIndexRange()">
<meta name="keywords" content="ensurePositive()">
<meta name="keywords" content="ensureStrictlyPositive()">
<meta name="keywords" content="ensureFinite()">
<meta name="keywords" content="ensureBetween()">
<meta name="keywords" content="ensureSizeBetween()">
<meta name="keywords" content="ensureValidUnicodeCodePoint()">
<meta name="keywords" content="ensureDimensionMatches()">
<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="ArgumentChecks (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,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":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/ArgumentChecks.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>Field&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>Field&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 ArgumentChecks" class="title">Class ArgumentChecks</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>ArgumentChecks</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public final class <span class="typeNameLabel">ArgumentChecks</span>
extends <a href="Static.html" title="class in org.apache.sis.util">Static</a></pre>
<div class="block">Static methods for performing argument checks.
Every methods in this class can throw one of the following exceptions:
<table class="sis">
<caption>Exceptions thrown on illegal argument</caption>
<tr>
<th>Exception</th>
<th class="sep">Thrown by</th>
</tr><tr>
<td><a href="NullArgumentException.html" title="class in org.apache.sis.util"><code>NullArgumentException</code></a></td>
<td class="sep">
<a href="#ensureNonNull(java.lang.String,java.lang.Object)"><code>ensure­Non­Null</code></a>,
<a href="#ensureNonEmpty(java.lang.String,java.lang.CharSequence)"><code>ensure­Non­Empty</code></a>.
</td>
</tr><tr>
<td><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>IllegalArgumentException</code></a></td>
<td class="sep">
<a href="#ensureNonEmpty(java.lang.String,java.lang.CharSequence)"><code>ensure­Non­Empty</code></a>,
<a href="#ensurePositive(java.lang.String,int)"><code>ensure­Positive</code></a>,
<a href="#ensureStrictlyPositive(java.lang.String,int)"><code>ensure­Strictly­Positive</code></a>,
<a href="#ensureBetween(java.lang.String,int,int,int)"><code>ensure­Between</code></a>,
<a href="#ensureSizeBetween(java.lang.String,int,int,int)"><code>ensure­Between</code></a>,
<a href="#ensureCanCast(java.lang.String,java.lang.Class,java.lang.Object)"><code>ensure­Can­Cast</code></a>.
</td>
</tr><tr>
<td><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>IndexOutOfBoundsException</code></a></td>
<td class="sep">
<a href="#ensureValidIndex(int,int)"><code>ensure­Valid­Index</code></a>.
</td>
</tr><tr>
<td><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink"><code>MismatchedDimensionException</code></a></td>
<td class="sep">
<a href="#ensureDimensionMatches(java.lang.String,int,org.opengis.geometry.DirectPosition)"><code>ensure­Dimension­Matches</code></a>.
</td>
</tr>
</table>
More specialized <code>ensure­XXX(…)</code> methods are provided in the following classes:
<ul>
<li><a href="../measure/Units.html" title="class in org.apache.sis.measure"><code>Units</code></a>:
<a href="../measure/Units.html#ensureAngular(javax.measure.Unit)"><code>ensure­Angular</code></a>,
<a href="../measure/Units.html#ensureLinear(javax.measure.Unit)"><code>ensure­Linear</code></a>,
<a href="../measure/Units.html#ensureTemporal(javax.measure.Unit)"><code>ensure­Temporal</code></a>,
<a href="../measure/Units.html#ensureScale(javax.measure.Unit)"><code>ensure­Scale</code></a>.</li>
</ul>
<div class="section">Method Arguments</div>
By convention, the value to check is always the last parameter given to every methods
in this class. The other parameters may include the programmatic name of the argument
being checked. This programmatic name is used for building an error message localized
in the <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html?is-external=true#getDefault()" title="class or interface in java.util" class="externalLink">default locale</a> if the check failed.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.3</dd>
<p><font size="-1">Defined in the <code>sis-utility</code> module</font></p>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== 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 void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureBetween(java.lang.String,double,double,double)">ensureBetween</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;name,
double&nbsp;min,
double&nbsp;max,
double&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Ensures that the given floating point value is between the given bounds, inclusive.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureBetween(java.lang.String,float,float,float)">ensureBetween</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;name,
float&nbsp;min,
float&nbsp;max,
float&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Ensures that the given floating point value is between the given bounds, inclusive.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureBetween(java.lang.String,int,int,int)">ensureBetween</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;name,
int&nbsp;min,
int&nbsp;max,
int&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Ensures that the given integer value is between the given bounds, inclusive.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureBetween(java.lang.String,long,long,long)">ensureBetween</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;name,
long&nbsp;min,
long&nbsp;max,
long&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Ensures that the given long value is between the given bounds, inclusive.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureCanCast(java.lang.String,java.lang.Class,java.lang.Object)">ensureCanCast</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;name,
<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;expectedType,
<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>&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Ensures that the specified value is null or an instance assignable to the given type.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureDimensionMatches(java.lang.String,int,double%5B%5D)">ensureDimensionMatches</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;name,
int&nbsp;expected,
double[]&nbsp;vector)</code></th>
<td class="colLast">
<div class="block">Ensures that the given vector, if non-null, has the expected number of dimensions
(taken as its length).</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureDimensionMatches(java.lang.String,int,int%5B%5D)">ensureDimensionMatches</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;name,
int&nbsp;expected,
int[]&nbsp;indices)</code></th>
<td class="colLast">
<div class="block">Ensures that the given array of indices, if non-null, has the expected number of dimensions
(taken as its length).</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureDimensionMatches(java.lang.String,int,org.opengis.geometry.DirectPosition)">ensureDimensionMatches</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;name,
int&nbsp;expected,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">DirectPosition</a>&nbsp;position)</code></th>
<td class="colLast">
<div class="block">Ensures that the given direct position, if non-null, has the expected number of dimensions.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureDimensionMatches(java.lang.String,int,org.opengis.geometry.Envelope)">ensureDimensionMatches</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;name,
int&nbsp;expected,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a>&nbsp;envelope)</code></th>
<td class="colLast">
<div class="block">Ensures that the given envelope, if non-null, has the expected number of dimensions.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureDimensionMatches(java.lang.String,int,org.opengis.referencing.crs.CoordinateReferenceSystem)">ensureDimensionMatches</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;name,
int&nbsp;expected,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/crs/CoordinateReferenceSystem.html?is-external=true" title="class or interface in org.opengis.referencing.crs" class="externalLink">CoordinateReferenceSystem</a>&nbsp;crs)</code></th>
<td class="colLast">
<div class="block">Ensures that the given CRS, if non-null, has the expected number of dimensions.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureDimensionMatches(java.lang.String,int,org.opengis.referencing.cs.CoordinateSystem)">ensureDimensionMatches</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;name,
int&nbsp;expected,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/cs/CoordinateSystem.html?is-external=true" title="class or interface in org.opengis.referencing.cs" class="externalLink">CoordinateSystem</a>&nbsp;cs)</code></th>
<td class="colLast">
<div class="block">Ensures that the given coordinate system, if non-null, has the expected number of dimensions.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureExpectedCount(java.lang.String,int,int)">ensureExpectedCount</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;name,
int&nbsp;expected,
int&nbsp;actual)</code></th>
<td class="colLast">
<div class="block">Ensures that a method receiving a variable number of arguments got the expected count.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureFinite(java.lang.String,double)">ensureFinite</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;name,
double&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Ensures that the given floating point value is not
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isNaN(double)" title="class or interface in java.lang" class="externalLink">NaN</a> neither <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isInfinite(double)" title="class or interface in java.lang" class="externalLink">Double.isInfinite(double)</a>.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureFinite(java.lang.String,float)">ensureFinite</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;name,
float&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Ensures that the given floating point value is not
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#isNaN(float)" title="class or interface in java.lang" class="externalLink">NaN</a> neither <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#isInfinite(float)" title="class or interface in java.lang" class="externalLink">Float.isInfinite(float)</a>.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureNonEmpty(java.lang.String,int%5B%5D,int,int,boolean)">ensureNonEmpty</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;name,
int[]&nbsp;values,
int&nbsp;min,
int&nbsp;max,
boolean&nbsp;distinct)</code></th>
<td class="colLast">
<div class="block">Ensures that the given <code>values</code> array is non-null and non-empty.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureNonEmpty(java.lang.String,java.lang.CharSequence)">ensureNonEmpty</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;name,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a>&nbsp;text)</code></th>
<td class="colLast">
<div class="block">Makes sure that a character sequence is non-null and non-empty.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureNonEmpty(java.lang.String,java.lang.Object%5B%5D)">ensureNonEmpty</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;name,
<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>[]&nbsp;array)</code></th>
<td class="colLast">
<div class="block">Makes sure that an array is non-null and non-empty.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureNonNull(java.lang.String,java.lang.Object)">ensureNonNull</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;name,
<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>&nbsp;object)</code></th>
<td class="colLast">
<div class="block">Makes sure that an argument is non-null.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureNonNullElement(java.lang.String,int,java.lang.Object)">ensureNonNullElement</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;name,
int&nbsp;index,
<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>&nbsp;element)</code></th>
<td class="colLast">
<div class="block">Makes sure that an array element is non-null.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensurePositive(java.lang.String,double)">ensurePositive</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;name,
double&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Ensures that the given floating point value is not
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isNaN(double)" title="class or interface in java.lang" class="externalLink">NaN</a> and is greater than or equals to zero.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensurePositive(java.lang.String,float)">ensurePositive</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;name,
float&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Ensures that the given floating point value is not
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#isNaN(float)" title="class or interface in java.lang" class="externalLink">NaN</a> and is greater than or equals to zero.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensurePositive(java.lang.String,int)">ensurePositive</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;name,
int&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Ensures that the given integer value is greater than or equals to zero.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensurePositive(java.lang.String,long)">ensurePositive</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;name,
long&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Ensures that the given long value is greater than or equals to zero.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureSizeBetween(java.lang.String,int,int,int)">ensureSizeBetween</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;name,
int&nbsp;min,
int&nbsp;max,
int&nbsp;size)</code></th>
<td class="colLast">
<div class="block">Ensures that the given collection size or array length is between the given bounds, inclusive.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureStrictlyPositive(java.lang.String,double)">ensureStrictlyPositive</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;name,
double&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Ensures that the given floating point value is not
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isNaN(double)" title="class or interface in java.lang" class="externalLink">NaN</a> and is greater than zero.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureStrictlyPositive(java.lang.String,float)">ensureStrictlyPositive</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;name,
float&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Ensures that the given floating point value is not
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#isNaN(float)" title="class or interface in java.lang" class="externalLink">NaN</a> and is greater than zero.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureStrictlyPositive(java.lang.String,int)">ensureStrictlyPositive</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;name,
int&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Ensures that the given integer value is greater than zero.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureStrictlyPositive(java.lang.String,long)">ensureStrictlyPositive</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;name,
long&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Ensures that the given long value is greater than zero.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureValidIndex(int,int)">ensureValidIndex</a></span>&#8203;(int&nbsp;upper,
int&nbsp;index)</code></th>
<td class="colLast">
<div class="block">Ensures that the given index is equals or greater than zero and lower than the given
upper value.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureValidIndexRange(int,int,int)">ensureValidIndexRange</a></span>&#8203;(int&nbsp;length,
int&nbsp;lower,
int&nbsp;upper)</code></th>
<td class="colLast">
<div class="block">Ensures that the given index range is valid for a sequence of the given length.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureValidUnicodeCodePoint(java.lang.String,int)">ensureValidUnicodeCodePoint</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;name,
int&nbsp;code)</code></th>
<td class="colLast">
<div class="block">Ensures that the given integer is a valid Unicode code point.</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">
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="ensureNonNull(java.lang.String,java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureNonNull</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureNonNull&#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;name,
<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>&nbsp;object)
throws <a href="NullArgumentException.html" title="class in org.apache.sis.util">NullArgumentException</a></pre>
<div class="block">Makes sure that an argument is non-null. If the given <code>object</code> is null, then a
<a href="NullArgumentException.html" title="class in org.apache.sis.util"><code>Null­Argument­Exception</code></a> is thrown with a localized message containing the given name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>object</code> - the user argument to check against null value.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="NullArgumentException.html" title="class in org.apache.sis.util">Null­Argument­Exception</a></code> - if <code>object</code> is null.</dd>
</dl>
</li>
</ul>
<a id="ensureNonNullElement(java.lang.String,int,java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureNonNullElement</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureNonNullElement&#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;name,
int&nbsp;index,
<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>&nbsp;element)
throws <a href="NullArgumentException.html" title="class in org.apache.sis.util">NullArgumentException</a></pre>
<div class="block">Makes sure that an array element is non-null. If <code>element</code> is null, then a
<a href="NullArgumentException.html" title="class in org.apache.sis.util"><code>Null­Argument­Exception</code></a> is thrown with a localized message containing the
given name and index. The name and index are formatted as below:
<ul>
<li>If the <code>name</code> contains the <code>"[#]"</code> sequence of characters, then the <code>'#'</code> character
is replaced by the <code>index</code> value. For example if <code>name</code> is <code>"axes[#].unit"</code> and the
index is 2, then the formatted message will contain <code>"axes[2].unit"</code>.</li>
<li>If the <code>name</code> does not contain the <code>"[#]"</code> sequence of characters, then <code>index</code> value
is appended between square brackets. For example if <code>name</code> is <code>"axes"</code> and the index is 2,
then the formatted message will contain <code>"axes[2]"</code>.</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>index</code> - the Index of the element to check in an array or a list. Used only if an exception is thrown.</dd>
<dd><code>element</code> - the array or list element to check against null value.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="NullArgumentException.html" title="class in org.apache.sis.util">Null­Argument­Exception</a></code> - if <code>element</code> is null.</dd>
</dl>
</li>
</ul>
<a id="ensureNonEmpty(java.lang.String,java.lang.CharSequence)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureNonEmpty</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureNonEmpty&#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;name,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink">CharSequence</a>&nbsp;text)
throws <a href="NullArgumentException.html" title="class in org.apache.sis.util">NullArgumentException</a>,
<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">Makes sure that a character sequence is non-null and non-empty. If the given <code>text</code> is
null, then a <a href="NullArgumentException.html" title="class in org.apache.sis.util"><code>Null­Argument­Exception</code></a> is thrown. Otherwise if the given <code>text</code> has
a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true#length()" title="class or interface in java.lang" class="externalLink">length</a> equals to 0, then 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>
is thrown.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>text</code> - the user argument to check against null value and empty sequences.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="NullArgumentException.html" title="class in org.apache.sis.util">Null­Argument­Exception</a></code> - if <code>text</code> is null.</dd>
<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>text</code> is empty.</dd>
</dl>
</li>
</ul>
<a id="ensureNonEmpty(java.lang.String,java.lang.Object[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureNonEmpty</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureNonEmpty&#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;name,
<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>[]&nbsp;array)
throws <a href="NullArgumentException.html" title="class in org.apache.sis.util">NullArgumentException</a>,
<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">Makes sure that an array is non-null and non-empty. If the given <code>array</code> is null,
then a <a href="NullArgumentException.html" title="class in org.apache.sis.util"><code>Null­Argument­Exception</code></a> is thrown. Otherwise if the array length is equals
to 0, then 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> is thrown.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>array</code> - the user argument to check against null value and empty array.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="NullArgumentException.html" title="class in org.apache.sis.util">Null­Argument­Exception</a></code> - if <code>array</code> is null.</dd>
<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>array</code> is empty.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
</dl>
</li>
</ul>
<a id="ensureNonEmpty(java.lang.String,int[],int,int,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureNonEmpty</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureNonEmpty&#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;name,
int[]&nbsp;values,
int&nbsp;min,
int&nbsp;max,
boolean&nbsp;distinct)
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">Ensures that the given <code>values</code> array is non-null and non-empty. This method can also ensures that all values
are between the given bounds (inclusive) and are distinct. The distinct values requirement is useful for validating
arrays of spatiotemporal dimension indices, where dimensions can not be repeated.
<p>Note that a successful call to <code>ensure­Non­Empty(name, values, 0, max, true)</code> implies
1 ≦ <code>values​.length</code><code>max</code>.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>values</code> - integer values to validate.</dd>
<dd><code>min</code> - the minimal allowed value (inclusive), or <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"><code>Integer​.MIN_VALUE</code></a> if none.</dd>
<dd><code>max</code> - the maximal allowed value (inclusive), or <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"><code>Integer​.MAX_VALUE</code></a> if none.</dd>
<dd><code>distinct</code> - <code>true</code> if each value must be unique.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="NullArgumentException.html" title="class in org.apache.sis.util">Null­Argument­Exception</a></code> - if <code>values</code> is null.</dd>
<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>values</code> is empty, contains a value lower than <code>min</code>,
contains a value greater than <code>max</code>, or contains duplicated values while <code>distinct</code> is <code>true</code>.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
</dl>
</li>
</ul>
<a id="ensureExpectedCount(java.lang.String,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureExpectedCount</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureExpectedCount&#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;name,
int&nbsp;expected,
int&nbsp;actual)</pre>
<div class="block">Ensures that a method receiving a variable number of arguments got the expected count.
If <code>actual</code> = <code>expected</code>, then this method does nothing.
Otherwise a message saying "Too few" or "Too many arguments" is thrown.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>expected</code> - expected number of arguments.</dd>
<dd><code>actual</code> - actual number of arguments.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
</dl>
</li>
</ul>
<a id="ensureCanCast(java.lang.String,java.lang.Class,java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureCanCast</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureCanCast&#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;name,
<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;expectedType,
<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>&nbsp;value)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<div class="block">Ensures that the specified value is null or an instance assignable to the given type.
If this method does not thrown an exception, then the value can be casted to the class
represented by <code>expected­Type</code> without throwing a <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Class­Cast­Exception</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked, used only if an exception is thrown.
Can be <code>null</code> if the name is unknown.</dd>
<dd><code>expected­Type</code> - the expected type (class or interface).</dd>
<dd><code>value</code> - the value to check, or <code>null</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Illegal­Argument­Exception</a></code> - if <code>value</code> is non-null and is not assignable to the given type.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="collection/Containers.html#property(java.util.Map,java.lang.Object,java.lang.Class)"><code>Containers​.property(Map, Object, Class)</code></a></dd>
</dl>
</li>
</ul>
<a id="ensureValidIndex(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureValidIndex</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureValidIndex&#8203;(int&nbsp;upper,
int&nbsp;index)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></pre>
<div class="block">Ensures that the given index is equals or greater than zero and lower than the given
upper value. This method is designed for methods that expect an index value as the only
argument. For this reason, this method does not take the argument name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>upper</code> - the maximal index value, exclusive.</dd>
<dd><code>index</code> - the index to check.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Index­Out­Of­Bounds­Exception</a></code> - if the given index is negative or not lower than the given upper value.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#ensurePositive(java.lang.String,int)"><code>ensure­Positive(String, int)</code></a></dd>
</dl>
</li>
</ul>
<a id="ensureValidIndexRange(int,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureValidIndexRange</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureValidIndexRange&#8203;(int&nbsp;length,
int&nbsp;lower,
int&nbsp;upper)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IndexOutOfBoundsException</a></pre>
<div class="block">Ensures that the given index range is valid for a sequence of the given length.
This method is designed for methods that expect an index range as their only arguments.
For this reason, this method does not take argument names.
<p>This method verifies only the <code>lower</code> and <code>upper</code> argument values.
It does not <strong>not</strong> verify the validity of the <code>length</code> argument,
because this information is assumed to be provided by the implementation rather than
the user.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>length</code> - the length of the sequence (array, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang" class="externalLink"><code>Char­Sequence</code></a>, <i>etc.</i>).</dd>
<dd><code>lower</code> - the user-specified lower index, inclusive.</dd>
<dd><code>upper</code> - the user-specified upper index, exclusive.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang" class="externalLink">Index­Out­Of­Bounds­Exception</a></code> - if the given [<code>lower</code><code>upper</code>]
range is out of the sequence index range.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#ensureSizeBetween(java.lang.String,int,int,int)"><code>ensure­Size­Between(String, int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a id="ensurePositive(java.lang.String,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensurePositive</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensurePositive&#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;name,
int&nbsp;value)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<div class="block">Ensures that the given integer value is greater than or equals to zero.
This method is used for checking values that are <strong>not</strong> index.
For checking index values, use <a href="#ensureValidIndex(int,int)"><code>ensure­Valid­Index(int, int)</code></a> instead.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked, used only if an exception is thrown.</dd>
<dd><code>value</code> - the user argument to check.</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 value is negative.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#ensureValidIndex(int,int)"><code>ensure­Valid­Index(int, int)</code></a>,
<a href="#ensureStrictlyPositive(java.lang.String,int)"><code>ensure­Strictly­Positive(String, int)</code></a></dd>
</dl>
</li>
</ul>
<a id="ensurePositive(java.lang.String,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensurePositive</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensurePositive&#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;name,
long&nbsp;value)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<div class="block">Ensures that the given long value is greater than or equals to zero.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked, used only if an exception is thrown.</dd>
<dd><code>value</code> - the user argument to check.</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 value is negative.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#ensureStrictlyPositive(java.lang.String,long)"><code>ensure­Strictly­Positive(String, long)</code></a></dd>
</dl>
</li>
</ul>
<a id="ensurePositive(java.lang.String,float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensurePositive</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensurePositive&#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;name,
float&nbsp;value)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<div class="block">Ensures that the given floating point value is not
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#isNaN(float)" title="class or interface in java.lang" class="externalLink">NaN</a> and is greater than or equals to zero. Note that
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#POSITIVE_INFINITY" title="class or interface in java.lang" class="externalLink">positive infinity</a> is considered a valid value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked, used only if an exception is thrown.</dd>
<dd><code>value</code> - the user argument to check.</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 value is NaN or negative.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#ensureStrictlyPositive(java.lang.String,float)"><code>ensure­Strictly­Positive(String, float)</code></a></dd>
</dl>
</li>
</ul>
<a id="ensurePositive(java.lang.String,double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensurePositive</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensurePositive&#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;name,
double&nbsp;value)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<div class="block">Ensures that the given floating point value is not
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isNaN(double)" title="class or interface in java.lang" class="externalLink">NaN</a> and is greater than or equals to zero. Note that
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#POSITIVE_INFINITY" title="class or interface in java.lang" class="externalLink">positive infinity</a> is considered a valid value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked, used only if an exception is thrown.</dd>
<dd><code>value</code> - the user argument to check.</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 value is NaN or negative.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#ensureStrictlyPositive(java.lang.String,double)"><code>ensure­Strictly­Positive(String, double)</code></a></dd>
</dl>
</li>
</ul>
<a id="ensureStrictlyPositive(java.lang.String,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureStrictlyPositive</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureStrictlyPositive&#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;name,
int&nbsp;value)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<div class="block">Ensures that the given integer value is greater than zero.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked, used only if an exception is thrown.</dd>
<dd><code>value</code> - the user argument to check.</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 value is negative or equals to zero.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#ensurePositive(java.lang.String,int)"><code>ensure­Positive(String, int)</code></a></dd>
</dl>
</li>
</ul>
<a id="ensureStrictlyPositive(java.lang.String,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureStrictlyPositive</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureStrictlyPositive&#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;name,
long&nbsp;value)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<div class="block">Ensures that the given long value is greater than zero.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked, used only if an exception is thrown.</dd>
<dd><code>value</code> - the user argument to check.</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 value is negative or equals to zero.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#ensurePositive(java.lang.String,long)"><code>ensure­Positive(String, long)</code></a></dd>
</dl>
</li>
</ul>
<a id="ensureStrictlyPositive(java.lang.String,float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureStrictlyPositive</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureStrictlyPositive&#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;name,
float&nbsp;value)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<div class="block">Ensures that the given floating point value is not
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#isNaN(float)" title="class or interface in java.lang" class="externalLink">NaN</a> and is greater than zero. Note that
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#POSITIVE_INFINITY" title="class or interface in java.lang" class="externalLink">positive infinity</a> is considered a valid value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked, used only if an exception is thrown.</dd>
<dd><code>value</code> - the user argument to check.</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 value is NaN, zero or negative.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#ensurePositive(java.lang.String,float)"><code>ensure­Positive(String, float)</code></a></dd>
</dl>
</li>
</ul>
<a id="ensureStrictlyPositive(java.lang.String,double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureStrictlyPositive</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureStrictlyPositive&#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;name,
double&nbsp;value)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<div class="block">Ensures that the given floating point value is not
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isNaN(double)" title="class or interface in java.lang" class="externalLink">NaN</a> and is greater than zero. Note that
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#POSITIVE_INFINITY" title="class or interface in java.lang" class="externalLink">positive infinity</a> is considered a valid value.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked, used only if an exception is thrown.</dd>
<dd><code>value</code> - the user argument to check.</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 value is NaN, zero or negative.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#ensurePositive(java.lang.String,double)"><code>ensure­Positive(String, double)</code></a></dd>
</dl>
</li>
</ul>
<a id="ensureFinite(java.lang.String,float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureFinite</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureFinite&#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;name,
float&nbsp;value)</pre>
<div class="block">Ensures that the given floating point value is not
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#isNaN(float)" title="class or interface in java.lang" class="externalLink">NaN</a> neither <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Float.html?is-external=true#isInfinite(float)" title="class or interface in java.lang" class="externalLink">Float.isInfinite(float)</a>.
The value can be negative, zero or positive.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked, used only if an exception is thrown.</dd>
<dd><code>value</code> - the user argument to check.</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 value is NaN or infinite.</dd>
</dl>
</li>
</ul>
<a id="ensureFinite(java.lang.String,double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureFinite</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureFinite&#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;name,
double&nbsp;value)</pre>
<div class="block">Ensures that the given floating point value is not
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isNaN(double)" title="class or interface in java.lang" class="externalLink">NaN</a> neither <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true#isInfinite(double)" title="class or interface in java.lang" class="externalLink">Double.isInfinite(double)</a>.
The value can be negative, zero or positive.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked, used only if an exception is thrown.</dd>
<dd><code>value</code> - the user argument to check.</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 value is NaN or infinite.</dd>
</dl>
</li>
</ul>
<a id="ensureBetween(java.lang.String,int,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureBetween</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureBetween&#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;name,
int&nbsp;min,
int&nbsp;max,
int&nbsp;value)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<div class="block">Ensures that the given integer value is between the given bounds, inclusive.
This is a general-purpose method for checking integer arguments.
Note that the following specialized methods are provided for common kinds
of integer range checks:
<ul>
<li><a href="#ensureSizeBetween(java.lang.String,int,int,int)"><code>ensure­Size­Between(…)</code></a>
if the <code>value</code> argument is a collection size or an array length.</li>
<li><a href="#ensureValidIndex(int,int)"><code>ensure­Valid­Index(…)</code></a> if the <code>value</code>
argument is an index in a list or an array.</li>
</ul></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>min</code> - the minimal value, inclusive.</dd>
<dd><code>max</code> - the maximal value, inclusive.</dd>
<dd><code>value</code> - the user argument to check.</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 value is not in the given range.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#ensureSizeBetween(java.lang.String,int,int,int)"><code>ensure­Size­Between(String, int, int, int)</code></a>,
<a href="#ensureValidIndex(int,int)"><code>ensure­Valid­Index(int, int)</code></a>,
<a href="#ensureValidIndexRange(int,int,int)"><code>ensure­Valid­Index­Range(int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a id="ensureBetween(java.lang.String,long,long,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureBetween</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureBetween&#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;name,
long&nbsp;min,
long&nbsp;max,
long&nbsp;value)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<div class="block">Ensures that the given long value is between the given bounds, inclusive.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>min</code> - the minimal value, inclusive.</dd>
<dd><code>max</code> - the maximal value, inclusive.</dd>
<dd><code>value</code> - the user argument to check.</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 value is not in the given range.</dd>
</dl>
</li>
</ul>
<a id="ensureBetween(java.lang.String,float,float,float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureBetween</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureBetween&#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;name,
float&nbsp;min,
float&nbsp;max,
float&nbsp;value)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<div class="block">Ensures that the given floating point value is between the given bounds, inclusive.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>min</code> - the minimal value, inclusive.</dd>
<dd><code>max</code> - the maximal value, inclusive.</dd>
<dd><code>value</code> - the user argument to check.</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 value is NaN or not in the given range.</dd>
</dl>
</li>
</ul>
<a id="ensureBetween(java.lang.String,double,double,double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureBetween</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureBetween&#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;name,
double&nbsp;min,
double&nbsp;max,
double&nbsp;value)
throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></pre>
<div class="block">Ensures that the given floating point value is between the given bounds, inclusive.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>min</code> - the minimal value, inclusive.</dd>
<dd><code>max</code> - the maximal value, inclusive.</dd>
<dd><code>value</code> - the user argument to check.</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 value is NaN or not in the given range.</dd>
</dl>
</li>
</ul>
<a id="ensureSizeBetween(java.lang.String,int,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureSizeBetween</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureSizeBetween&#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;name,
int&nbsp;min,
int&nbsp;max,
int&nbsp;size)
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">Ensures that the given collection size or array length is between the given bounds, inclusive.
This method performs the same check than <a href="#ensureBetween(java.lang.String,int,int,int)"><code>ensure­Between(…)</code></a>, but the error message is different in case of failure.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>min</code> - the minimal size (inclusive), or 0 if none.</dd>
<dd><code>max</code> - the maximal size (inclusive), or <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"><code>Integer​.MAX_VALUE</code></a> if none.</dd>
<dd><code>size</code> - the user collection size or array length to be checked.</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 value is not in the given range.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#ensureBetween(java.lang.String,int,int,int)"><code>ensure­Between(String, int, int, int)</code></a>,
<a href="#ensureValidIndexRange(int,int,int)"><code>ensure­Valid­Index­Range(int, int, int)</code></a></dd>
</dl>
</li>
</ul>
<a id="ensureValidUnicodeCodePoint(java.lang.String,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureValidUnicodeCodePoint</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureValidUnicodeCodePoint&#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;name,
int&nbsp;code)
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">Ensures that the given integer is a valid Unicode code point. The range of valid code points goes
from <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Character.html?is-external=true#MIN_CODE_POINT" title="class or interface in java.lang" class="externalLink"><code>U+0000</code></a> to <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Character.html?is-external=true#MAX_CODE_POINT" title="class or interface in java.lang" class="externalLink"><code>U+10FFFF</code></a> inclusive.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>code</code> - the Unicode code point to verify.</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 value is not a valid Unicode code point.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.4</dd>
</dl>
</li>
</ul>
<a id="ensureDimensionMatches(java.lang.String,int,org.opengis.referencing.crs.CoordinateReferenceSystem)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureDimensionMatches</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureDimensionMatches&#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;name,
int&nbsp;expected,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/crs/CoordinateReferenceSystem.html?is-external=true" title="class or interface in org.opengis.referencing.crs" class="externalLink">CoordinateReferenceSystem</a>&nbsp;crs)
throws <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></pre>
<div class="block">Ensures that the given CRS, if non-null, has the expected number of dimensions.
This method does nothing if the given coordinate reference system is null.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>expected</code> - the expected number of dimensions.</dd>
<dd><code>crs</code> - the coordinate reference system to check for its dimension, or <code>null</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Mismatched­Dimension­Exception</a></code> - if the given coordinate reference system is non-null
and does not have the expected number of dimensions.</dd>
</dl>
</li>
</ul>
<a id="ensureDimensionMatches(java.lang.String,int,org.opengis.referencing.cs.CoordinateSystem)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureDimensionMatches</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureDimensionMatches&#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;name,
int&nbsp;expected,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/cs/CoordinateSystem.html?is-external=true" title="class or interface in org.opengis.referencing.cs" class="externalLink">CoordinateSystem</a>&nbsp;cs)
throws <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></pre>
<div class="block">Ensures that the given coordinate system, if non-null, has the expected number of dimensions.
This method does nothing if the given coordinate system is null.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>expected</code> - the expected number of dimensions.</dd>
<dd><code>cs</code> - the coordinate system to check for its dimension, or <code>null</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Mismatched­Dimension­Exception</a></code> - if the given coordinate system is non-null
and does not have the expected number of dimensions.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.6</dd>
</dl>
</li>
</ul>
<a id="ensureDimensionMatches(java.lang.String,int,int[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureDimensionMatches</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureDimensionMatches&#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;name,
int&nbsp;expected,
int[]&nbsp;indices)
throws <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></pre>
<div class="block">Ensures that the given array of indices, if non-null, has the expected number of dimensions
(taken as its length). This method does nothing if the given array is null.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>expected</code> - the expected number of dimensions.</dd>
<dd><code>indices</code> - the array of indices to check for its number of dimensions, or <code>null</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Mismatched­Dimension­Exception</a></code> - if the given array of indices is non-null and does not have
the expected number of dimensions (taken as its length).</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0</dd>
</dl>
</li>
</ul>
<a id="ensureDimensionMatches(java.lang.String,int,double[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureDimensionMatches</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureDimensionMatches&#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;name,
int&nbsp;expected,
double[]&nbsp;vector)
throws <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></pre>
<div class="block">Ensures that the given vector, if non-null, has the expected number of dimensions
(taken as its length). This method does nothing if the given vector is null.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>expected</code> - the expected number of dimensions.</dd>
<dd><code>vector</code> - the vector to check for its number of dimensions, or <code>null</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Mismatched­Dimension­Exception</a></code> - if the given vector is non-null and does not have the
expected number of dimensions (taken as its length).</dd>
</dl>
</li>
</ul>
<a id="ensureDimensionMatches(java.lang.String,int,org.opengis.geometry.DirectPosition)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureDimensionMatches</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureDimensionMatches&#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;name,
int&nbsp;expected,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/DirectPosition.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">DirectPosition</a>&nbsp;position)
throws <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></pre>
<div class="block">Ensures that the given direct position, if non-null, has the expected number of dimensions.
This method does nothing if the given direct position is null.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>expected</code> - the expected number of dimensions.</dd>
<dd><code>position</code> - the direct position to check for its dimension, or <code>null</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Mismatched­Dimension­Exception</a></code> - if the given direct position is non-null and does
not have the expected number of dimensions.</dd>
</dl>
</li>
</ul>
<a id="ensureDimensionMatches(java.lang.String,int,org.opengis.geometry.Envelope)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ensureDimensionMatches</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;ensureDimensionMatches&#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;name,
int&nbsp;expected,
<a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/Envelope.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Envelope</a>&nbsp;envelope)
throws <a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">MismatchedDimensionException</a></pre>
<div class="block">Ensures that the given envelope, if non-null, has the expected number of dimensions.
This method does nothing if the given envelope is null.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the argument to be checked. Used only if an exception is thrown.</dd>
<dd><code>expected</code> - the expected number of dimensions.</dd>
<dd><code>envelope</code> - the envelope to check for its dimension, or <code>null</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://www.geoapi.org/3.0/javadoc/org/opengis/geometry/MismatchedDimensionException.html?is-external=true" title="class or interface in org.opengis.geometry" class="externalLink">Mismatched­Dimension­Exception</a></code> - if the given envelope is non-null and does
not have the expected number of dimensions.</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/ArgumentChecks.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>Field&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>Field&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>