commons-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r949864 [16/48] - in /websites/production/commons/content/proper/commons-lang: ./ apidocs/ apidocs/org/apache/commons/lang3/ apidocs/org/apache/commons/lang3/builder/ apidocs/org/apache/commons/lang3/time/ apidocs/src-html/org/apache/common...
Date Fri, 01 May 2015 20:55:53 GMT
Modified: websites/production/commons/content/proper/commons-lang/cobertura/org.apache.commons.lang3.ArrayUtils.html
==============================================================================
--- websites/production/commons/content/proper/commons-lang/cobertura/org.apache.commons.lang3.ArrayUtils.html (original)
+++ websites/production/commons/content/proper/commons-lang/cobertura/org.apache.commons.lang3.ArrayUtils.html Fri May  1 20:55:51 2015
@@ -12,8 +12,8 @@
 <div class="separator">&nbsp;</div>
 <table class="report">
 <thead><tr>  <td class="heading">Classes in this File</td>  <td class="heading"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Line Coverage</a></td>  <td class="heading"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Branch Coverage</a></td>  <td class="heading"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">Complexity</a></td></tr></thead>
-  <tr><td><a href="org.apache.commons.lang3.ArrayUtils.html">ArrayUtils</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">99%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:99px"><span class="text">1442/1443</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">98%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:98px"><span class="text">988/1000</span></div></div></td></tr></table></td><td class="value"><span class="hidden">3.795275590551181;</span>3,795</td></tr>
-  <tr><td><a href="org.apache.commons.lang3.ArrayUtils.html">ArrayUtils$1</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">100%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:100px"><span class="text">2/2</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">3.795275590551181;</span>3,795</td></tr>
+  <tr><td><a href="org.apache.commons.lang3.ArrayUtils.html">ArrayUtils</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">94%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:94px"><span class="text">1732/1830</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">91%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:91px"><span class="text">1162/1270</span></div></div></td></tr></table></td><td class="value"><span class="hidden">4.1;</span>4,1</td></tr>
+  <tr><td><a href="org.apache.commons.lang3.ArrayUtils.html">ArrayUtils$1</a></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40">100%</td><td class="percentgraph"><div class="percentgraph"><div class="greenbar" style="width:100px"><span class="text">2/2</span></div></div></td></tr></table></td><td><table cellpadding="0px" cellspacing="0px" class="percentgraph"><tr class="percentgraph"><td align="right" class="percentgraph" width="40"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></td><td class="percentgraph"><div class="percentgraph"><div class="na" style="width:100px"><span class="text"><a class="dfn" href="help.html" onclick="popupwindow('help.html'); return false;">N/A</a></span></div></div></td></tr></table></td><td class="value"><span class="hidden">4.1;</span>4,1</td></tr>
 
 </table>
 <div class="separator">&nbsp;</div>
@@ -3324,8444 +3324,10395 @@
 <tr>  <td class="numLine">&nbsp;1849</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;</pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1850</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="comment">// IndexOf search</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;    <span class="comment">// Swap</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1851</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="comment">// ----------------------------------------------------------------------</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;    <span class="comment">//-----------------------------------------------------------------------</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1852</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1853</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="comment">// Object IndexOf</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Swaps two elements in the given array.&lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1854</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="comment">//-----------------------------------------------------------------------</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1855</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;There is no special handling for multi-dimensional arrays.&lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1856</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Finds the index of the given object in the array.&lt;/p&gt;</span></pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1857</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1857</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method does nothing for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1858</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * </span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1859</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Examples:</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1860</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to search through for the object, may be {@code null}</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;ul&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1861</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param objectToFind  the object to find, may be {@code null}</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap(["1", "2", "3"], 0, 2) -&gt; ["3", "2", "1"]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1862</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the index of the object within the array,</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap(["1", "2", "3"], 0, 0) -&gt; ["1", "2", "3"]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1863</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap(["1", "2", "3"], 1, 0) -&gt; ["2", "1", "3"]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1864</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap(["1", "2", "3"], 0, 5) -&gt; ArrayOutOfBoundsException&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1865</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">int</span> indexOf(<span class="keyword">final</span> Object[] array, <span class="keyword">final</span> Object objectToFind) {</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1866</td>  <td class="nbHitsCovered">&nbsp;1149</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> indexOf(array, objectToFind, 0);</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;/ul&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1866</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1867</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1868</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array the array to swap, may be {@code null}</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1869</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset1 the index of the first element to swap</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1870</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Finds the index of the given object in the array starting at the given index.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset2 the index of the second element to swap</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1871</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ArrayIndexOutOfBoundsException if one of the indices is out of range</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1872</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1873</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1874</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;A negative startIndex is treated as zero. A startIndex larger than the array</span></pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1875</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * length will return {@link #INDEX_NOT_FOUND} ({@code -1}).&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> swap(<span class="keyword">final</span> Object[] array, <span class="keyword">int</span> offset1, <span class="keyword">int</span> offset2) {</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1874</td>  <td class="nbHitsUncovered"><a title="Line 1874: Conditional coverage 50% (1/2).">&nbsp;2</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1874: Conditional coverage 50% (1/2).">        <span class="keyword">if</span> (array == <span class="keyword">null</span>) {</a></span></pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1875</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span>;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1876</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1877</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to search through for the object, may be {@code null}</span></pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1878</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param objectToFind  the object to find, may be {@code null}</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1877</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        swap(array, offset1, offset2, 1);</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1878</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1879</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param startIndex  the index to start searching at</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1880</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the index of the object within the array starting at the index,</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1881</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Swaps two elements in the given array.&lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1882</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1883</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">int</span> indexOf(<span class="keyword">final</span> Object[] array, <span class="keyword">final</span> Object objectToFind, <span class="keyword">int</span> startIndex) {</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1884</td>  <td class="nbHitsCovered"><a title="Line 1884: Conditional coverage 100% (2/2).">&nbsp;1182</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1884: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> (array == <span class="keyword">null</span>) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1885</td>  <td class="nbHitsCovered">&nbsp;73</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> INDEX_NOT_FOUND;</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method does nothing for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1884</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1885</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Examples:</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1886</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1887</td>  <td class="nbHitsCovered"><a title="Line 1887: Conditional coverage 100% (2/2).">&nbsp;1109</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1887: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> (startIndex &lt; 0) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1888</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            startIndex = 0;</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;ul&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1887</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([true, false, true], 0, 2) -&gt; [true, false, true]&lt;/li&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1888</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([true, false, true], 0, 0) -&gt; [true, false, true]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1889</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1890</td>  <td class="nbHitsCovered"><a title="Line 1890: Conditional coverage 100% (2/2).">&nbsp;1109</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1890: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> (objectToFind == <span class="keyword">null</span>) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1891</td>  <td class="nbHitsCovered"><a title="Line 1891: Conditional coverage 100% (2/2).">&nbsp;19</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1891: Conditional coverage 100% (2/2).">            <span class="keyword">for</span> (<span class="keyword">int</span> i = startIndex; i &lt; array.length; i++) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1892</td>  <td class="nbHitsCovered"><a title="Line 1892: Conditional coverage 100% (2/2).">&nbsp;18</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1892: Conditional coverage 100% (2/2).">                <span class="keyword">if</span> (array[i] == <span class="keyword">null</span>) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1893</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;                    <span class="keyword">return</span> i;</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([true, false, true], 1, 0) -&gt; [false, true, true]&lt;/li&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1890</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([true, false, true], 0, 5) -&gt; ArrayOutOfBoundsException&lt;/li&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1891</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;/ul&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1892</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1893</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * </span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1894</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;                }</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to swap, may be {@code null}</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1895</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1896</td>  <td class="nbHitsUncovered"><a title="Line 1896: Conditional coverage 50% (1/2).">&nbsp;1104</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1896: Conditional coverage 50% (1/2).">        } <span class="keyword">else</span> <span class="keyword">if</span> (array.getClass().getComponentType().isInstance(objectToFind)) {</a></span></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1897</td>  <td class="nbHitsCovered"><a title="Line 1897: Conditional coverage 100% (2/2).">&nbsp;1241</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1897: Conditional coverage 100% (2/2).">            <span class="keyword">for</span> (<span class="keyword">int</span> i = startIndex; i &lt; array.length; i++) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1898</td>  <td class="nbHitsCovered"><a title="Line 1898: Conditional coverage 100% (2/2).">&nbsp;268</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1898: Conditional coverage 100% (2/2).">                <span class="keyword">if</span> (objectToFind.equals(array[i])) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1899</td>  <td class="nbHitsCovered">&nbsp;131</td>  <td class="src"><pre class="src">&nbsp;                    <span class="keyword">return</span> i;</pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1900</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;                }</pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1901</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset1 the index of the first element to swap</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1896</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset2 the index of the second element to swap</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1897</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ArrayIndexOutOfBoundsException if one of the indices is out of range</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1898</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1899</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> swap(<span class="keyword">final</span> <span class="keyword">long</span>[] array, <span class="keyword">int</span> offset1, <span class="keyword">int</span> offset2) {</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1900</td>  <td class="nbHitsUncovered"><a title="Line 1900: Conditional coverage 50% (1/2).">&nbsp;2</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1900: Conditional coverage 50% (1/2).">        <span class="keyword">if</span> (array == <span class="keyword">null</span>) {</a></span></pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1901</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span>;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1902</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1903</td>  <td class="nbHitsCovered">&nbsp;974</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> INDEX_NOT_FOUND;</pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1904</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1903</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        swap(array, offset1, offset2, 1);</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1904</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1905</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;</pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1906</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1907</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Finds the last index of the given object within the array.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Swaps two elements in the given array.&lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1908</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1909</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method does nothing for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1910</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1911</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to travers backwords looking for the object, may be {@code null}</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Examples:</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1912</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param objectToFind  the object to find, may be {@code null}</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;ul&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1913</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the last index of the object within the array,</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 2) -&gt; [3, 2, 1]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1914</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 0) -&gt; [1, 2, 3]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1915</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 1, 0) -&gt; [2, 1, 3]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1916</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">int</span> lastIndexOf(<span class="keyword">final</span> Object[] array, <span class="keyword">final</span> Object objectToFind) {</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1917</td>  <td class="nbHitsCovered">&nbsp;8</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> lastIndexOf(array, objectToFind, Integer.MAX_VALUE);</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 5) -&gt; ArrayOutOfBoundsException&lt;/li&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1917</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;/ul&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1918</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1919</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1920</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to swap, may be {@code null}</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1921</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Finds the last index of the given object in the array starting at the given index.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset1 the index of the first element to swap</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1922</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset2 the index of the second element to swap</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1923</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ArrayIndexOutOfBoundsException if one of the indices is out of range</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1924</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1925</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;A negative startIndex will return {@link #INDEX_NOT_FOUND} ({@code -1}). A startIndex larger than</span></pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1926</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * the array length will search from the end of the array.&lt;/p&gt;</span></pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1927</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> swap(<span class="keyword">final</span> <span class="keyword">int</span>[] array, <span class="keyword">int</span> offset1, <span class="keyword">int</span> offset2) {</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1926</td>  <td class="nbHitsUncovered"><a title="Line 1926: Conditional coverage 50% (1/2).">&nbsp;2</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1926: Conditional coverage 50% (1/2).">        <span class="keyword">if</span> (array == <span class="keyword">null</span>) {</a></span></pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1927</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span>;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1928</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to traverse for looking for the object, may be {@code null}</span></pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1929</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param objectToFind  the object to find, may be {@code null}</span></pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1930</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param startIndex  the start index to travers backwards from</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1929</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        swap(array, offset1, offset2, 1);</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1930</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1931</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the last index of the object within the array,</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1932</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1933</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Swaps two elements in the given array.&lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1934</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">int</span> lastIndexOf(<span class="keyword">final</span> Object[] array, <span class="keyword">final</span> Object objectToFind, <span class="keyword">int</span> startIndex) {</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1935</td>  <td class="nbHitsCovered"><a title="Line 1935: Conditional coverage 100% (2/2).">&nbsp;20</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1935: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> (array == <span class="keyword">null</span>) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1936</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> INDEX_NOT_FOUND;</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1935</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method does nothing for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1936</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1937</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1938</td>  <td class="nbHitsCovered"><a title="Line 1938: Conditional coverage 100% (2/2).">&nbsp;16</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1938: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> (startIndex &lt; 0) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1939</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> INDEX_NOT_FOUND;</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1940</td>  <td class="nbHitsCovered"><a title="Line 1940: Conditional coverage 100% (2/2).">&nbsp;14</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1940: Conditional coverage 100% (2/2).">        } <span class="keyword">else</span> <span class="keyword">if</span> (startIndex &gt;= array.length) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1941</td>  <td class="nbHitsCovered">&nbsp;7</td>  <td class="src"><pre class="src">&nbsp;            startIndex = array.length - 1;</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Examples:</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1938</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;ul&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1939</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 2) -&gt; [3, 2, 1]&lt;/li&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1940</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 0) -&gt; [1, 2, 3]&lt;/li&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1941</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 1, 0) -&gt; [2, 1, 3]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1942</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1943</td>  <td class="nbHitsCovered"><a title="Line 1943: Conditional coverage 100% (2/2).">&nbsp;14</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1943: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> (objectToFind == <span class="keyword">null</span>) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1944</td>  <td class="nbHitsCovered"><a title="Line 1944: Conditional coverage 100% (2/2).">&nbsp;8</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1944: Conditional coverage 100% (2/2).">            <span class="keyword">for</span> (<span class="keyword">int</span> i = startIndex; i &gt;= 0; i--) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1945</td>  <td class="nbHitsCovered"><a title="Line 1945: Conditional coverage 100% (2/2).">&nbsp;7</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1945: Conditional coverage 100% (2/2).">                <span class="keyword">if</span> (array[i] == <span class="keyword">null</span>) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1946</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;                    <span class="keyword">return</span> i;</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 5) -&gt; ArrayOutOfBoundsException&lt;/li&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1943</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;/ul&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1944</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1945</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * </span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1946</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to swap, may be {@code null}</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1947</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;                }</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset1 the index of the first element to swap</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1948</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1949</td>  <td class="nbHitsUncovered"><a title="Line 1949: Conditional coverage 50% (1/2).">&nbsp;11</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1949: Conditional coverage 50% (1/2).">        } <span class="keyword">else</span> <span class="keyword">if</span> (array.getClass().getComponentType().isInstance(objectToFind)) {</a></span></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1950</td>  <td class="nbHitsCovered"><a title="Line 1950: Conditional coverage 100% (2/2).">&nbsp;38</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1950: Conditional coverage 100% (2/2).">            <span class="keyword">for</span> (<span class="keyword">int</span> i = startIndex; i &gt;= 0; i--) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1951</td>  <td class="nbHitsCovered"><a title="Line 1951: Conditional coverage 100% (2/2).">&nbsp;35</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1951: Conditional coverage 100% (2/2).">                <span class="keyword">if</span> (objectToFind.equals(array[i])) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1952</td>  <td class="nbHitsCovered">&nbsp;8</td>  <td class="src"><pre class="src">&nbsp;                    <span class="keyword">return</span> i;</pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1953</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;                }</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset2 the index of the second element to swap</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1949</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ArrayIndexOutOfBoundsException if one of the indices is out of range</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1950</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1951</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> swap(<span class="keyword">final</span> <span class="keyword">short</span>[] array, <span class="keyword">int</span> offset1, <span class="keyword">int</span> offset2) {</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1952</td>  <td class="nbHitsUncovered"><a title="Line 1952: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1952: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (array == <span class="keyword">null</span>) {</a></span></pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1953</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span>;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1954</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1955</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1956</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> INDEX_NOT_FOUND;</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1955</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        swap(array, offset1, offset2, 1);</span></pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1956</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1957</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1958</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;</pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1959</td>  <td class="nbHits">&nbsp;</td>
+<tr>  <td class="numLine">&nbsp;1958</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1959</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Swaps two elements in the given array.&lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1960</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Checks if the object is in the given array.&lt;/p&gt;</span></pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1961</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1961</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method does nothing for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1962</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;The method returns {@code false} if a {@code null} array is passed in.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * </span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1963</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Examples:</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1964</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to search through</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;ul&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1965</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param objectToFind  the object to find</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 2) -&gt; [3, 2, 1]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1966</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return {@code true} if the array contains the object</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 0) -&gt; [1, 2, 3]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1967</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 1, 0) -&gt; [2, 1, 3]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1968</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">boolean</span> contains(<span class="keyword">final</span> Object[] array, <span class="keyword">final</span> Object objectToFind) {</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1969</td>  <td class="nbHitsCovered"><a title="Line 1969: Conditional coverage 100% (2/2).">&nbsp;1129</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 1969: Conditional coverage 100% (2/2).">        <span class="keyword">return</span> indexOf(array, objectToFind) != INDEX_NOT_FOUND;</a></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 5) -&gt; ArrayOutOfBoundsException&lt;/li&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1969</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;/ul&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1970</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1971</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1972</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="comment">// long IndexOf</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to swap, may be {@code null}</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1973</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="comment">//-----------------------------------------------------------------------</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset1 the index of the first element to swap</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1974</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset2 the index of the second element to swap</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1975</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Finds the index of the given value in the array.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ArrayIndexOutOfBoundsException if one of the indices is out of range</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1976</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1977</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1978</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1979</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to search through for the object, may be {@code null}</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> swap(<span class="keyword">final</span> <span class="keyword">char</span>[] array, <span class="keyword">int</span> offset1, <span class="keyword">int</span> offset2) {</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1978</td>  <td class="nbHitsUncovered"><a title="Line 1978: Conditional coverage 50% (1/2).">&nbsp;4</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 1978: Conditional coverage 50% (1/2).">        <span class="keyword">if</span> (array == <span class="keyword">null</span>) {</a></span></pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1979</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span>;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1980</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param valueToFind  the value to find</span></pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1981</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the index of the value within the array,</span></pre></td></tr>
-<tr>  <td class="numLine">&nbsp;1982</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1981</td>  <td class="nbHitsCovered">&nbsp;4</td>  <td class="src"><pre class="src">&nbsp;        swap(array, offset1, offset2, 1);</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;1982</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1983</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1984</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">int</span> indexOf(<span class="keyword">final</span> <span class="keyword">long</span>[] array, <span class="keyword">final</span> <span class="keyword">long</span> valueToFind) {</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;1985</td>  <td class="nbHitsCovered">&nbsp;23</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> indexOf(array, valueToFind, 0);</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;1985</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Swaps two elements in the given array.&lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1986</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1987</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method does nothing for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1988</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1989</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Finds the index of the given value in the array starting at the given index.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Examples:</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1990</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;ul&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1991</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 2) -&gt; [3, 2, 1]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1992</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 0) -&gt; [1, 2, 3]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1993</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;A negative startIndex is treated as zero. A startIndex larger than the array</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 1, 0) -&gt; [2, 1, 3]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1994</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * length will return {@link #INDEX_NOT_FOUND} ({@code -1}).&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 5) -&gt; ArrayOutOfBoundsException&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1995</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;/ul&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1996</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to search through for the object, may be {@code null}</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1997</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param valueToFind  the value to find</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * </span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1998</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param startIndex  the index to start searching at</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to swap, may be {@code null}</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;1999</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the index of the value within the array,</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset1 the index of the first element to swap</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2000</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset2 the index of the second element to swap</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2001</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ArrayIndexOutOfBoundsException if one of the indices is out of range</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2002</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">int</span> indexOf(<span class="keyword">final</span> <span class="keyword">long</span>[] array, <span class="keyword">final</span> <span class="keyword">long</span> valueToFind, <span class="keyword">int</span> startIndex) {</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2003</td>  <td class="nbHitsCovered"><a title="Line 2003: Conditional coverage 100% (2/2).">&nbsp;53</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2003: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> (array == <span class="keyword">null</span>) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2004</td>  <td class="nbHitsCovered">&nbsp;5</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> INDEX_NOT_FOUND;</pre></td></tr>
-<tr>  <td class="numLine">&nbsp;2005</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2006</td>  <td class="nbHitsCovered"><a title="Line 2006: Conditional coverage 100% (2/2).">&nbsp;48</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2006: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> (startIndex &lt; 0) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2007</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            startIndex = 0;</pre></td></tr>
-<tr>  <td class="numLine">&nbsp;2008</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2009</td>  <td class="nbHitsCovered"><a title="Line 2009: Conditional coverage 100% (2/2).">&nbsp;96</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2009: Conditional coverage 100% (2/2).">        <span class="keyword">for</span> (<span class="keyword">int</span> i = startIndex; i &lt; array.length; i++) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2010</td>  <td class="nbHitsCovered"><a title="Line 2010: Conditional coverage 100% (2/2).">&nbsp;82</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2010: Conditional coverage 100% (2/2).">            <span class="keyword">if</span> (valueToFind == array[i]) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2011</td>  <td class="nbHitsCovered">&nbsp;34</td>  <td class="src"><pre class="src">&nbsp;                <span class="keyword">return</span> i;</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;2003</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> swap(<span class="keyword">final</span> <span class="keyword">byte</span>[] array, <span class="keyword">int</span> offset1, <span class="keyword">int</span> offset2) {</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;2004</td>  <td class="nbHitsUncovered"><a title="Line 2004: Conditional coverage 0% (0/2).">&nbsp;0</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2004: Conditional coverage 0% (0/2).">        <span class="keyword">if</span> (array == <span class="keyword">null</span>) {</a></span></pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;2005</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span>;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;2006</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;2007</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;        swap(array, offset1, offset2, 1);</span></pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;2008</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;    }</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;2009</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
+<tr>  <td class="numLine">&nbsp;2010</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;2011</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Swaps two elements in the given array.&lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2012</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2013</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2014</td>  <td class="nbHitsCovered">&nbsp;14</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> INDEX_NOT_FOUND;</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method does nothing for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;2014</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2015</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Examples:</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2016</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;ul&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2017</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 2) -&gt; [3, 2, 1]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2018</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Finds the last index of the given value within the array.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 0) -&gt; [1, 2, 3]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2019</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 1, 0) -&gt; [2, 1, 3]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2020</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 5) -&gt; ArrayOutOfBoundsException&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2021</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;/ul&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2022</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to travers backwords looking for the object, may be {@code null}</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2023</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param valueToFind  the object to find</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * </span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2024</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the last index of the value within the array,</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to swap, may be {@code null}</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2025</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset1 the index of the first element to swap</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2026</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset2 the index of the second element to swap</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2027</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">int</span> lastIndexOf(<span class="keyword">final</span> <span class="keyword">long</span>[] array, <span class="keyword">final</span> <span class="keyword">long</span> valueToFind) {</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2028</td>  <td class="nbHitsCovered">&nbsp;6</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> lastIndexOf(array, valueToFind, Integer.MAX_VALUE);</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ArrayIndexOutOfBoundsException if one of the indices is out of range</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;2028</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2029</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
-<tr>  <td class="numLine">&nbsp;2030</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
-<tr>  <td class="numLine">&nbsp;2031</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> swap(<span class="keyword">final</span> <span class="keyword">double</span>[] array, <span class="keyword">int</span> offset1, <span class="keyword">int</span> offset2) {</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;2030</td>  <td class="nbHitsUncovered"><a title="Line 2030: Conditional coverage 50% (1/2).">&nbsp;2</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2030: Conditional coverage 50% (1/2).">        <span class="keyword">if</span> (array == <span class="keyword">null</span>) {</a></span></pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;2031</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span>;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2032</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Finds the last index of the given value in the array starting at the given index.&lt;/p&gt;</span></pre></td></tr>
-<tr>  <td class="numLine">&nbsp;2033</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
-<tr>  <td class="numLine">&nbsp;2034</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;2033</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        swap(array, offset1, offset2, 1);</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;2034</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2035</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;</pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2036</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;A negative startIndex will return {@link #INDEX_NOT_FOUND} ({@code -1}). A startIndex larger than the</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2037</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * array length will search from the end of the array.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Swaps two elements in the given array.&lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2038</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2039</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to traverse for looking for the object, may be {@code null}</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method does nothing for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2040</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param valueToFind  the value to find</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2041</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param startIndex  the start index to travers backwards from</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Examples:</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2042</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return the last index of the value within the array,</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;ul&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2043</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 2) -&gt; [3, 2, 1]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2044</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 0) -&gt; [1, 2, 3]&lt;/li&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2045</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">int</span> lastIndexOf(<span class="keyword">final</span> <span class="keyword">long</span>[] array, <span class="keyword">final</span> <span class="keyword">long</span> valueToFind, <span class="keyword">int</span> startIndex) {</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2046</td>  <td class="nbHitsCovered"><a title="Line 2046: Conditional coverage 100% (2/2).">&nbsp;14</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2046: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> (array == <span class="keyword">null</span>) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2047</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> INDEX_NOT_FOUND;</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 1, 0) -&gt; [2, 1, 3]&lt;/li&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;2046</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *         &lt;li&gt;ArrayUtils.swap([1, 2, 3], 0, 5) -&gt; ArrayOutOfBoundsException&lt;/li&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;2047</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;/ul&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2048</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2049</td>  <td class="nbHitsCovered"><a title="Line 2049: Conditional coverage 100% (2/2).">&nbsp;12</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2049: Conditional coverage 100% (2/2).">        <span class="keyword">if</span> (startIndex &lt; 0) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2050</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;            <span class="keyword">return</span> INDEX_NOT_FOUND;</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2051</td>  <td class="nbHitsCovered"><a title="Line 2051: Conditional coverage 100% (2/2).">&nbsp;11</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2051: Conditional coverage 100% (2/2).">        } <span class="keyword">else</span> <span class="keyword">if</span> (startIndex &gt;= array.length) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2052</td>  <td class="nbHitsCovered">&nbsp;6</td>  <td class="src"><pre class="src">&nbsp;            startIndex = array.length - 1;</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;/p&gt;</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;2049</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * </span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;2050</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to swap, may be {@code null}</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;2051</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset1 the index of the first element to swap</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;2052</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param offset2 the index of the second element to swap</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2053</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2054</td>  <td class="nbHitsCovered"><a title="Line 2054: Conditional coverage 100% (2/2).">&nbsp;33</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2054: Conditional coverage 100% (2/2).">        <span class="keyword">for</span> (<span class="keyword">int</span> i = startIndex; i &gt;= 0; i--) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2055</td>  <td class="nbHitsCovered"><a title="Line 2055: Conditional coverage 100% (2/2).">&nbsp;30</a></td>  <td class="src"><pre class="src">&nbsp;<a title="Line 2055: Conditional coverage 100% (2/2).">            <span class="keyword">if</span> (valueToFind == array[i]) {</a></pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2056</td>  <td class="nbHitsCovered">&nbsp;8</td>  <td class="src"><pre class="src">&nbsp;                <span class="keyword">return</span> i;</pre></td></tr>
-<tr>  <td class="numLine">&nbsp;2057</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;            }</pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @throws ArrayIndexOutOfBoundsException if one of the indices is out of range</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;2054</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     */</span></pre></td></tr>
+<tr>  <td class="numLine">&nbsp;2055</td>  <td class="nbHits">&nbsp;</td>
+  <td class="src"><pre class="src">&nbsp;    <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> swap(<span class="keyword">final</span> <span class="keyword">float</span>[] array, <span class="keyword">int</span> offset1, <span class="keyword">int</span> offset2) {</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;2056</td>  <td class="nbHitsUncovered"><a title="Line 2056: Conditional coverage 50% (1/2).">&nbsp;2</a></td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;<a title="Line 2056: Conditional coverage 50% (1/2).">        <span class="keyword">if</span> (array == <span class="keyword">null</span>) {</a></span></pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;2057</td>  <td class="nbHitsUncovered">&nbsp;0</td>  <td class="src"><pre class="src"><span class="srcUncovered">&nbsp;            <span class="keyword">return</span>;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2058</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;        }</pre></td></tr>
-<tr>  <td class="numLineCover">&nbsp;2059</td>  <td class="nbHitsCovered">&nbsp;3</td>  <td class="src"><pre class="src">&nbsp;        <span class="keyword">return</span> INDEX_NOT_FOUND;</pre></td></tr>
-<tr>  <td class="numLine">&nbsp;2060</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;2059</td>  <td class="nbHitsCovered">&nbsp;2</td>  <td class="src"><pre class="src">&nbsp;        swap(array, offset1, offset2, 1);</pre></td></tr>
+<tr>  <td class="numLineCover">&nbsp;2060</td>  <td class="nbHitsCovered">&nbsp;1</td>  <td class="src"><pre class="src">&nbsp;    }</pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2061</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;</pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2062</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;    <span class="comment">/**</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2063</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Checks if the value is in the given array.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;Swaps two elements in the given array.&lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2064</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2065</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;The method returns {@code false} if a {@code null} array is passed in.&lt;/p&gt;</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     * &lt;p&gt;This method does nothing for a {@code null} input array.&lt;/p&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2066</td>  <td class="nbHits">&nbsp;</td>
   <td class="src"><pre class="src">&nbsp;<span class="comment">     *</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2067</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param array  the array to search through</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">      * &lt;p&gt;Examples:</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2068</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @param valueToFind  the value to find</span></pre></td></tr>
+  <td class="src"><pre class="src">&nbsp;<span class="comment">     *     &lt;ul&gt;</span></pre></td></tr>
 <tr>  <td class="numLine">&nbsp;2069</td>  <td class="nbHits">&nbsp;</td>
-  <td class="src"><pre class="src">&nbsp;<span class="comment">     * @return {@code true} if the array contains the object</span></pre></td></tr>

[... 14597 lines stripped ...]


Mime
View raw message