diff --git a/src/main/java/org/apache/commons/lang3/ArrayUtils.java b/src/main/java/org/apache/commons/lang3/ArrayUtils.java index b913f2014..e8a327eb2 100644 --- a/src/main/java/org/apache/commons/lang3/ArrayUtils.java +++ b/src/main/java/org/apache/commons/lang3/ArrayUtils.java @@ -32,14 +32,14 @@ import org.apache.commons.lang3.mutable.MutableInt; /** *

Operations on arrays, primitive arrays (like {@code int[]}) and - * primitive wrapper arrays (like {@code Integer[]}).

+ * primitive wrapper arrays (like {@code Integer[]}). * *

This class tries to handle {@code null} input gracefully. * An exception will not be thrown for a {@code null} * array input. However, an Object array that contains a {@code null} - * element may throw an exception. Each method documents its behaviour.

+ * element may throw an exception. Each method documents its behaviour. * - *

#ThreadSafe#

+ *

#ThreadSafe# * @since 2.0 */ public class ArrayUtils { @@ -130,10 +130,10 @@ public class ArrayUtils { /** *

ArrayUtils instances should NOT be constructed in standard programming. - * Instead, the class should be used as ArrayUtils.clone(new int[] {2}).

+ * Instead, the class should be used as ArrayUtils.clone(new int[] {2}). * *

This constructor is public to permit tools that require a JavaBean instance - * to operate.

+ * to operate. */ public ArrayUtils() { super(); @@ -146,12 +146,12 @@ public class ArrayUtils { // Basic methods handling multi-dimensional arrays //----------------------------------------------------------------------- /** - *

Outputs an array as a String, treating {@code null} as an empty array.

+ *

Outputs an array as a String, treating {@code null} as an empty array. * *

Multi-dimensional arrays are handled correctly, including - * multi-dimensional primitive arrays.

+ * multi-dimensional primitive arrays. * - *

The format is that of Java source code, for example {a,b}.

+ *

The format is that of Java source code, for example {a,b}. * * @param array the array to get a toString for, may be {@code null} * @return a String representation of the array, '{}' if null array input @@ -161,12 +161,12 @@ public class ArrayUtils { } /** - *

Outputs an array as a String handling {@code null}s.

+ *

Outputs an array as a String handling {@code null}s. * *

Multi-dimensional arrays are handled correctly, including - * multi-dimensional primitive arrays.

+ * multi-dimensional primitive arrays. * - *

The format is that of Java source code, for example {a,b}.

+ *

The format is that of Java source code, for example {a,b}. * * @param array the array to get a toString for, may be {@code null} * @param stringIfNull the String to return if the array is {@code null} @@ -180,9 +180,9 @@ public class ArrayUtils { } /** - *

Get a hash code for an array handling multi-dimensional arrays correctly.

+ *

Get a hash code for an array handling multi-dimensional arrays correctly. * - *

Multi-dimensional primitive arrays are also handled correctly by this method.

+ *

Multi-dimensional primitive arrays are also handled correctly by this method. * * @param array the array to get a hash code for, {@code null} returns zero * @return a hash code for the array @@ -193,9 +193,9 @@ public class ArrayUtils { /** *

Compares two arrays, using equals(), handling multi-dimensional arrays - * correctly.

+ * correctly. * - *

Multi-dimensional primitive arrays are also handled correctly by this method.

+ *

Multi-dimensional primitive arrays are also handled correctly by this method. * * @param array1 the left hand array to compare, may be {@code null} * @param array2 the right hand array to compare, may be {@code null} @@ -214,9 +214,9 @@ public class ArrayUtils { *

Converts the given array into a {@link java.util.Map}. Each element of the array * must be either a {@link java.util.Map.Entry} or an Array, containing at least two * elements, where the first element is used as key and the second as - * value.

+ * value. * - *

This method can be used to initialize:

+ *

This method can be used to initialize: *

      * // Create a Map mapping colors.
      * Map colorMap = MapUtils.toMap(new String[][] {{
@@ -225,7 +225,7 @@ public class ArrayUtils {
      *     {"BLUE", "#0000FF"}});
      * 
* - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array an array whose elements are either a {@link java.util.Map.Entry} or * an Array containing at least two elements, may be {@code null} @@ -265,9 +265,9 @@ public class ArrayUtils { // Generic array //----------------------------------------------------------------------- /** - *

Create a type-safe generic array.

+ *

Create a type-safe generic array. * - *

The Java language does not allow an array to be created from a generic type:

+ *

The Java language does not allow an array to be created from a generic type: * *

     public static <T> T[] createAnArray(int size) {
@@ -279,7 +279,7 @@ public class ArrayUtils {
      * 
* *

Therefore new arrays of generic types can be created with this method. - * For example, an array of Strings can be created:

+ * For example, an array of Strings can be created: * *
     String[] array = ArrayUtils.toArray("1", "2");
@@ -287,14 +287,14 @@ public class ArrayUtils {
      * 
* *

The method is typically used in scenarios, where the caller itself uses generic types - * that have to be combined into an array.

+ * that have to be combined into an array. * *

Note, this method makes only sense to provide arguments of the same type so that the * compiler can deduce the type of the array itself. While it is possible to select the * type explicitly like in * Number[] array = ArrayUtils.<Number>toArray(Integer.valueOf(42), Double.valueOf(Math.PI)), * there is no real advantage when compared to - * new Number[] {Integer.valueOf(42), Double.valueOf(Math.PI)}.

+ * new Number[] {Integer.valueOf(42), Double.valueOf(Math.PI)}. * * @param the array's element type * @param items the varargs array items, null allowed @@ -309,12 +309,12 @@ public class ArrayUtils { //----------------------------------------------------------------------- /** *

Shallow clones an array returning a typecast result and handling - * {@code null}.

+ * {@code null}. * *

The objects in the array are not cloned, thus there is no special - * handling for multi-dimensional arrays.

+ * handling for multi-dimensional arrays. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param the component type of the array * @param array the array to shallow clone, may be {@code null} @@ -329,9 +329,9 @@ public class ArrayUtils { /** *

Clones an array returning a typecast result and handling - * {@code null}.

+ * {@code null}. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array the array to clone, may be {@code null} * @return the cloned array, {@code null} if {@code null} input @@ -345,9 +345,9 @@ public class ArrayUtils { /** *

Clones an array returning a typecast result and handling - * {@code null}.

+ * {@code null}. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array the array to clone, may be {@code null} * @return the cloned array, {@code null} if {@code null} input @@ -361,9 +361,9 @@ public class ArrayUtils { /** *

Clones an array returning a typecast result and handling - * {@code null}.

+ * {@code null}. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array the array to clone, may be {@code null} * @return the cloned array, {@code null} if {@code null} input @@ -377,9 +377,9 @@ public class ArrayUtils { /** *

Clones an array returning a typecast result and handling - * {@code null}.

+ * {@code null}. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array the array to clone, may be {@code null} * @return the cloned array, {@code null} if {@code null} input @@ -393,9 +393,9 @@ public class ArrayUtils { /** *

Clones an array returning a typecast result and handling - * {@code null}.

+ * {@code null}. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array the array to clone, may be {@code null} * @return the cloned array, {@code null} if {@code null} input @@ -409,9 +409,9 @@ public class ArrayUtils { /** *

Clones an array returning a typecast result and handling - * {@code null}.

+ * {@code null}. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array the array to clone, may be {@code null} * @return the cloned array, {@code null} if {@code null} input @@ -425,9 +425,9 @@ public class ArrayUtils { /** *

Clones an array returning a typecast result and handling - * {@code null}.

+ * {@code null}. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array the array to clone, may be {@code null} * @return the cloned array, {@code null} if {@code null} input @@ -441,9 +441,9 @@ public class ArrayUtils { /** *

Clones an array returning a typecast result and handling - * {@code null}.

+ * {@code null}. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array the array to clone, may be {@code null} * @return the cloned array, {@code null} if {@code null} input @@ -459,12 +459,13 @@ public class ArrayUtils { //----------------------------------------------------------------------- /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * * @param array the array to check for {@code null} or empty * @param type the class representation of the desired array + * @param the class type * @return the same array, {@code public static} empty array if {@code null} * @throws IllegalArgumentException if the type argument is null * @since 3.5 @@ -483,12 +484,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -503,12 +504,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -523,12 +524,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -543,12 +544,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -563,12 +564,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -583,12 +584,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -603,12 +604,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -623,12 +624,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -643,12 +644,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -663,12 +664,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -683,12 +684,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -703,12 +704,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -723,12 +724,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -743,12 +744,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -763,12 +764,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -783,12 +784,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -803,12 +804,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -823,12 +824,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -843,12 +844,12 @@ public class ArrayUtils { /** *

Defensive programming technique to change a {@code null} - * reference to an empty one.

+ * reference to an empty one. * - *

This method returns an empty array for a {@code null} input array.

+ *

This method returns an empty array for a {@code null} input array. * *

As a memory optimizing technique an empty array passed in will be overridden with - * the empty {@code public static} references in this class.

+ * the empty {@code public static} references in this class. * * @param array the array to check for {@code null} or empty * @return the same array, {@code public static} empty array if {@code null} or empty input @@ -865,14 +866,14 @@ public class ArrayUtils { //----------------------------------------------------------------------- /** *

Produces a new array containing the elements between - * the start and end indices.

+ * the start and end indices. * *

The start index is inclusive, the end index exclusive. - * Null array input produces null output.

+ * Null array input produces null output. * *

The component type of the subarray is always the same as * that of the input array. Thus, if the input is an array of type - * {@code Date}, the following usage is envisaged:

+ * {@code Date}, the following usage is envisaged: * *
      * Date[] someDates = (Date[])ArrayUtils.subarray(allDates, 2, 5);
@@ -918,10 +919,10 @@ public class ArrayUtils {
 
     /**
      * 

Produces a new {@code long} array containing the elements - * between the start and end indices.

+ * between the start and end indices. * *

The start index is inclusive, the end index exclusive. - * Null array input produces null output.

+ * Null array input produces null output. * * @param array the array * @param startIndexInclusive the starting index. Undervalue (<0) @@ -958,10 +959,10 @@ public class ArrayUtils { /** *

Produces a new {@code int} array containing the elements - * between the start and end indices.

+ * between the start and end indices. * *

The start index is inclusive, the end index exclusive. - * Null array input produces null output.

+ * Null array input produces null output. * * @param array the array * @param startIndexInclusive the starting index. Undervalue (<0) @@ -998,10 +999,10 @@ public class ArrayUtils { /** *

Produces a new {@code short} array containing the elements - * between the start and end indices.

+ * between the start and end indices. * *

The start index is inclusive, the end index exclusive. - * Null array input produces null output.

+ * Null array input produces null output. * * @param array the array * @param startIndexInclusive the starting index. Undervalue (<0) @@ -1038,10 +1039,10 @@ public class ArrayUtils { /** *

Produces a new {@code char} array containing the elements - * between the start and end indices.

+ * between the start and end indices. * *

The start index is inclusive, the end index exclusive. - * Null array input produces null output.

+ * Null array input produces null output. * * @param array the array * @param startIndexInclusive the starting index. Undervalue (<0) @@ -1078,10 +1079,10 @@ public class ArrayUtils { /** *

Produces a new {@code byte} array containing the elements - * between the start and end indices.

+ * between the start and end indices. * *

The start index is inclusive, the end index exclusive. - * Null array input produces null output.

+ * Null array input produces null output. * * @param array the array * @param startIndexInclusive the starting index. Undervalue (<0) @@ -1118,10 +1119,10 @@ public class ArrayUtils { /** *

Produces a new {@code double} array containing the elements - * between the start and end indices.

+ * between the start and end indices. * *

The start index is inclusive, the end index exclusive. - * Null array input produces null output.

+ * Null array input produces null output. * * @param array the array * @param startIndexInclusive the starting index. Undervalue (<0) @@ -1158,10 +1159,10 @@ public class ArrayUtils { /** *

Produces a new {@code float} array containing the elements - * between the start and end indices.

+ * between the start and end indices. * *

The start index is inclusive, the end index exclusive. - * Null array input produces null output.

+ * Null array input produces null output. * * @param array the array * @param startIndexInclusive the starting index. Undervalue (<0) @@ -1198,10 +1199,10 @@ public class ArrayUtils { /** *

Produces a new {@code boolean} array containing the elements - * between the start and end indices.

+ * between the start and end indices. * *

The start index is inclusive, the end index exclusive. - * Null array input produces null output.

+ * Null array input produces null output. * * @param array the array * @param startIndexInclusive the starting index. Undervalue (<0) @@ -1242,7 +1243,7 @@ public class ArrayUtils { *

Checks whether two arrays are the same length, treating * {@code null} arrays as length {@code 0}. * - *

Any multi-dimensional aspects of the arrays are ignored.

+ *

Any multi-dimensional aspects of the arrays are ignored. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} @@ -1255,7 +1256,7 @@ public class ArrayUtils { /** *

Checks whether two arrays are the same length, treating - * {@code null} arrays as length {@code 0}.

+ * {@code null} arrays as length {@code 0}. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} @@ -1268,7 +1269,7 @@ public class ArrayUtils { /** *

Checks whether two arrays are the same length, treating - * {@code null} arrays as length {@code 0}.

+ * {@code null} arrays as length {@code 0}. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} @@ -1281,7 +1282,7 @@ public class ArrayUtils { /** *

Checks whether two arrays are the same length, treating - * {@code null} arrays as length {@code 0}.

+ * {@code null} arrays as length {@code 0}. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} @@ -1294,7 +1295,7 @@ public class ArrayUtils { /** *

Checks whether two arrays are the same length, treating - * {@code null} arrays as length {@code 0}.

+ * {@code null} arrays as length {@code 0}. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} @@ -1307,7 +1308,7 @@ public class ArrayUtils { /** *

Checks whether two arrays are the same length, treating - * {@code null} arrays as length {@code 0}.

+ * {@code null} arrays as length {@code 0}. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} @@ -1320,7 +1321,7 @@ public class ArrayUtils { /** *

Checks whether two arrays are the same length, treating - * {@code null} arrays as length {@code 0}.

+ * {@code null} arrays as length {@code 0}. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} @@ -1333,7 +1334,7 @@ public class ArrayUtils { /** *

Checks whether two arrays are the same length, treating - * {@code null} arrays as length {@code 0}.

+ * {@code null} arrays as length {@code 0}. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} @@ -1346,7 +1347,7 @@ public class ArrayUtils { /** *

Checks whether two arrays are the same length, treating - * {@code null} arrays as length {@code 0}.

+ * {@code null} arrays as length {@code 0}. * * @param array1 the first array, may be {@code null} * @param array2 the second array, may be {@code null} @@ -1360,9 +1361,9 @@ public class ArrayUtils { //----------------------------------------------------------------------- /** *

Returns the length of the specified array. - * This method can deal with {@code Object} arrays and with primitive arrays.

+ * This method can deal with {@code Object} arrays and with primitive arrays. * - *

If the input array is {@code null}, {@code 0} is returned.

+ *

If the input array is {@code null}, {@code 0} is returned. * *

      * ArrayUtils.getLength(null)            = 0
@@ -1387,7 +1388,7 @@ public class ArrayUtils {
 
     /**
      * 

Checks whether two arrays are the same type taking into account - * multi-dimensional arrays.

+ * multi-dimensional arrays. * * @param array1 the first array, must not be {@code null} * @param array2 the second array, must not be {@code null} @@ -1404,11 +1405,11 @@ public class ArrayUtils { // Reverse //----------------------------------------------------------------------- /** - *

Reverses the order of the given array.

+ *

Reverses the order of the given array. * - *

There is no special handling for multi-dimensional arrays.

+ *

There is no special handling for multi-dimensional arrays. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to reverse, may be {@code null} */ @@ -1420,9 +1421,9 @@ public class ArrayUtils { } /** - *

Reverses the order of the given array.

+ *

Reverses the order of the given array. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to reverse, may be {@code null} */ @@ -1434,9 +1435,9 @@ public class ArrayUtils { } /** - *

Reverses the order of the given array.

+ *

Reverses the order of the given array. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to reverse, may be {@code null} */ @@ -1448,9 +1449,9 @@ public class ArrayUtils { } /** - *

Reverses the order of the given array.

+ *

Reverses the order of the given array. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to reverse, may be {@code null} */ @@ -1462,9 +1463,9 @@ public class ArrayUtils { } /** - *

Reverses the order of the given array.

+ *

Reverses the order of the given array. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to reverse, may be {@code null} */ @@ -1476,9 +1477,9 @@ public class ArrayUtils { } /** - *

Reverses the order of the given array.

+ *

Reverses the order of the given array. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to reverse, may be {@code null} */ @@ -1490,9 +1491,9 @@ public class ArrayUtils { } /** - *

Reverses the order of the given array.

+ *

Reverses the order of the given array. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to reverse, may be {@code null} */ @@ -1504,9 +1505,9 @@ public class ArrayUtils { } /** - *

Reverses the order of the given array.

+ *

Reverses the order of the given array. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to reverse, may be {@code null} */ @@ -1518,9 +1519,9 @@ public class ArrayUtils { } /** - *

Reverses the order of the given array.

+ *

Reverses the order of the given array. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to reverse, may be {@code null} */ @@ -1534,11 +1535,9 @@ public class ArrayUtils { /** *

* Reverses the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to reverse, may be {@code null} @@ -1569,11 +1568,9 @@ public class ArrayUtils { /** *

* Reverses the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to reverse, may be {@code null} @@ -1604,11 +1601,9 @@ public class ArrayUtils { /** *

* Reverses the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to reverse, may be {@code null} @@ -1639,11 +1634,9 @@ public class ArrayUtils { /** *

* Reverses the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to reverse, may be {@code null} @@ -1674,11 +1667,9 @@ public class ArrayUtils { /** *

* Reverses the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to reverse, may be {@code null} @@ -1709,11 +1700,9 @@ public class ArrayUtils { /** *

* Reverses the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to reverse, may be {@code null} @@ -1744,11 +1733,9 @@ public class ArrayUtils { /** *

* Reverses the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to reverse, may be {@code null} @@ -1779,11 +1766,9 @@ public class ArrayUtils { /** *

* Reverses the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to reverse, may be {@code null} @@ -1814,11 +1799,9 @@ public class ArrayUtils { /** *

* Reverses the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to reverse, may be {@code null} @@ -1849,22 +1832,21 @@ public class ArrayUtils { // Swap //----------------------------------------------------------------------- /** - *

Swaps two elements in the given array.

+ *

Swaps two elements in the given array. * - *

There is no special handling for multi-dimensional arrays.

+ *

There is no special handling for multi-dimensional arrays. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. - * Negative indices are promoted to 0(zero).

+ * Negative indices are promoted to 0(zero). * *

Examples: *

    - *
  • ArrayUtils.swap(["1", "2", "3"], 0, 2) -> ["3", "2", "1"]
  • - *
  • ArrayUtils.swap(["1", "2", "3"], 0, 0) -> ["1", "2", "3"]
  • - *
  • ArrayUtils.swap(["1", "2", "3"], 1, 0) -> ["2", "1", "3"]
  • - *
  • ArrayUtils.swap(["1", "2", "3"], 0, 5) -> ["1", "2", "3"]
  • - *
  • ArrayUtils.swap(["1", "2", "3"], -1, 1) -> ["2", "1", "3"]
  • + *
  • ArrayUtils.swap(["1", "2", "3"], 0, 2) -> ["3", "2", "1"]
  • + *
  • ArrayUtils.swap(["1", "2", "3"], 0, 0) -> ["1", "2", "3"]
  • + *
  • ArrayUtils.swap(["1", "2", "3"], 1, 0) -> ["2", "1", "3"]
  • + *
  • ArrayUtils.swap(["1", "2", "3"], 0, 5) -> ["1", "2", "3"]
  • + *
  • ArrayUtils.swap(["1", "2", "3"], -1, 1) -> ["2", "1", "3"]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element to swap @@ -1878,22 +1860,21 @@ public class ArrayUtils { } /** - *

Swaps two elements in the given array.

+ *

Swaps two elements in the given array. * - *

There is no special handling for multi-dimensional arrays.

+ *

There is no special handling for multi-dimensional arrays. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. - * Negative indices are promoted to 0(zero).

+ * Negative indices are promoted to 0(zero). * *

Examples: *

    - *
  • ArrayUtils.swap([true, false, true], 0, 2) -> [true, false, true]
  • - *
  • ArrayUtils.swap([true, false, true], 0, 0) -> [true, false, true]
  • - *
  • ArrayUtils.swap([true, false, true], 1, 0) -> [false, true, true]
  • - *
  • ArrayUtils.swap([true, false, true], 0, 5) -> [true, false, true]
  • - *
  • ArrayUtils.swap([true, false, true], -1, 1) -> [false, true, true]
  • + *
  • ArrayUtils.swap([true, false, true], 0, 2) -> [true, false, true]
  • + *
  • ArrayUtils.swap([true, false, true], 0, 0) -> [true, false, true]
  • + *
  • ArrayUtils.swap([true, false, true], 1, 0) -> [false, true, true]
  • + *
  • ArrayUtils.swap([true, false, true], 0, 5) -> [true, false, true]
  • + *
  • ArrayUtils.swap([true, false, true], -1, 1) -> [false, true, true]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element to swap @@ -1907,20 +1888,19 @@ public class ArrayUtils { } /** - *

Swaps two elements in the given array.

+ *

Swaps two elements in the given array. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. - * Negative indices are promoted to 0(zero).

+ * Negative indices are promoted to 0(zero). * *

Examples: *

    - *
  • ArrayUtils.swap([1, 2, 3], 0, 2) -> [3, 2, 1]
  • - *
  • ArrayUtils.swap([1, 2, 3], 0, 0) -> [1, 2, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], 1, 0) -> [2, 1, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], 0, 5) -> [1, 2, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 2) -> [3, 2, 1]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 0) -> [1, 2, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 1, 0) -> [2, 1, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 5) -> [1, 2, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element to swap @@ -1934,20 +1914,19 @@ public class ArrayUtils { } /** - *

Swaps two elements in the given array.

+ *

Swaps two elements in the given array. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. - * Negative indices are promoted to 0(zero).

+ * Negative indices are promoted to 0(zero). * *

Examples: *

    - *
  • ArrayUtils.swap([1, 2, 3], 0, 2) -> [3, 2, 1]
  • - *
  • ArrayUtils.swap([1, 2, 3], 0, 0) -> [1, 2, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], 1, 0) -> [2, 1, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], 0, 5) -> [1, 2, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 2) -> [3, 2, 1]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 0) -> [1, 2, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 1, 0) -> [2, 1, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 5) -> [1, 2, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element to swap @@ -1961,20 +1940,19 @@ public class ArrayUtils { } /** - *

Swaps two elements in the given array.

+ *

Swaps two elements in the given array. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. - * Negative indices are promoted to 0(zero).

+ * Negative indices are promoted to 0(zero). * *

Examples: *

    - *
  • ArrayUtils.swap([1, 2, 3], 0, 2) -> [3, 2, 1]
  • - *
  • ArrayUtils.swap([1, 2, 3], 0, 0) -> [1, 2, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], 1, 0) -> [2, 1, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], 0, 5) -> [1, 2, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 2) -> [3, 2, 1]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 0) -> [1, 2, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 1, 0) -> [2, 1, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 5) -> [1, 2, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element to swap @@ -1988,20 +1966,19 @@ public class ArrayUtils { } /** - *

Swaps two elements in the given array.

+ *

Swaps two elements in the given array. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. - * Negative indices are promoted to 0(zero).

+ * Negative indices are promoted to 0(zero). * *

Examples: *

    - *
  • ArrayUtils.swap([1, 2, 3], 0, 2) -> [3, 2, 1]
  • - *
  • ArrayUtils.swap([1, 2, 3], 0, 0) -> [1, 2, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], 1, 0) -> [2, 1, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], 0, 5) -> [1, 2, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 2) -> [3, 2, 1]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 0) -> [1, 2, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 1, 0) -> [2, 1, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 5) -> [1, 2, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element to swap @@ -2015,20 +1992,19 @@ public class ArrayUtils { } /** - *

Swaps two elements in the given array.

+ *

Swaps two elements in the given array. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. - * Negative indices are promoted to 0(zero).

+ * Negative indices are promoted to 0(zero). * *

Examples: *

    - *
  • ArrayUtils.swap([1, 2, 3], 0, 2) -> [3, 2, 1]
  • - *
  • ArrayUtils.swap([1, 2, 3], 0, 0) -> [1, 2, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], 1, 0) -> [2, 1, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], 0, 5) -> [1, 2, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 2) -> [3, 2, 1]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 0) -> [1, 2, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 1, 0) -> [2, 1, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 5) -> [1, 2, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element to swap @@ -2042,20 +2018,19 @@ public class ArrayUtils { } /** - *

Swaps two elements in the given array.

+ *

Swaps two elements in the given array. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. - * Negative indices are promoted to 0(zero).

+ * Negative indices are promoted to 0(zero). * *

Examples: *

    - *
  • ArrayUtils.swap([1, 2, 3], 0, 2) -> [3, 2, 1]
  • - *
  • ArrayUtils.swap([1, 2, 3], 0, 0) -> [1, 2, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], 1, 0) -> [2, 1, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], 0, 5) -> [1, 2, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 2) -> [3, 2, 1]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 0) -> [1, 2, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 1, 0) -> [2, 1, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 5) -> [1, 2, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element to swap @@ -2069,20 +2044,19 @@ public class ArrayUtils { } /** - *

Swaps two elements in the given array.

+ *

Swaps two elements in the given array. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. - * Negative indices are promoted to 0(zero).

+ * Negative indices are promoted to 0(zero). * *

Examples: *

    - *
  • ArrayUtils.swap([1, 2, 3], 0, 2) -> [3, 2, 1]
  • - *
  • ArrayUtils.swap([1, 2, 3], 0, 0) -> [1, 2, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], 1, 0) -> [2, 1, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], 0, 5) -> [1, 2, 3]
  • - *
  • ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 2) -> [3, 2, 1]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 0) -> [1, 2, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 1, 0) -> [2, 1, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], 0, 5) -> [1, 2, 3]
  • + *
  • ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element to swap @@ -2096,23 +2070,21 @@ public class ArrayUtils { } /** - *

Swaps a series of elements in the given array.

+ *

Swaps a series of elements in the given array. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. * Negative indices are promoted to 0(zero). * If any of the sub-arrays to swap falls outside of the given array, * then the swap is stopped at the end of the array and as many as possible elements are swapped. - *

* *

Examples: *

    - *
  • ArrayUtils.swap([true, false, true, false], 0, 2, 1) -> [true, false, true, false]
  • - *
  • ArrayUtils.swap([true, false, true, false], 0, 0, 1) -> [true, false, true, false]
  • - *
  • ArrayUtils.swap([true, false, true, false], 0, 2, 2) -> [true, false, true, false]
  • - *
  • ArrayUtils.swap([true, false, true, false], -3, 2, 2) -> [true, false, true, false]
  • - *
  • ArrayUtils.swap([true, false, true, false], 0, 3, 3) -> [false, false, true, true]
  • + *
  • ArrayUtils.swap([true, false, true, false], 0, 2, 1) -> [true, false, true, false]
  • + *
  • ArrayUtils.swap([true, false, true, false], 0, 0, 1) -> [true, false, true, false]
  • + *
  • ArrayUtils.swap([true, false, true, false], 0, 2, 2) -> [true, false, true, false]
  • + *
  • ArrayUtils.swap([true, false, true, false], -3, 2, 2) -> [true, false, true, false]
  • + *
  • ArrayUtils.swap([true, false, true, false], 0, 3, 3) -> [false, false, true, true]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element in the series to swap @@ -2138,23 +2110,21 @@ public class ArrayUtils { } /** - *

Swaps a series of elements in the given array.

+ *

Swaps a series of elements in the given array. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. * Negative indices are promoted to 0(zero). * If any of the sub-arrays to swap falls outside of the given array, * then the swap is stopped at the end of the array and as many as possible elements are swapped. - *

* *

Examples: *

    - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 2, 1) -> [3, 2, 1, 4]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 0, 1) -> [1, 2, 3, 4]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 2, 0, 2) -> [3, 4, 1, 2]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], -3, 2, 2) -> [3, 4, 1, 2]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 2, 1) -> [3, 2, 1, 4]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 0, 1) -> [1, 2, 3, 4]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 2, 0, 2) -> [3, 4, 1, 2]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], -3, 2, 2) -> [3, 4, 1, 2]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element in the series to swap @@ -2181,23 +2151,21 @@ public class ArrayUtils { } /** - *

Swaps a series of elements in the given array.

+ *

Swaps a series of elements in the given array. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. * Negative indices are promoted to 0(zero). * If any of the sub-arrays to swap falls outside of the given array, * then the swap is stopped at the end of the array and as many as possible elements are swapped. - *

* *

Examples: *

    - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 2, 1) -> [3, 2, 1, 4]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 0, 1) -> [1, 2, 3, 4]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 2, 0, 2) -> [3, 4, 1, 2]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], -3, 2, 2) -> [3, 4, 1, 2]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 2, 1) -> [3, 2, 1, 4]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 0, 1) -> [1, 2, 3, 4]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 2, 0, 2) -> [3, 4, 1, 2]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], -3, 2, 2) -> [3, 4, 1, 2]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element in the series to swap @@ -2223,23 +2191,21 @@ public class ArrayUtils { } /** - *

Swaps a series of elements in the given array.

+ *

Swaps a series of elements in the given array. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. * Negative indices are promoted to 0(zero). * If any of the sub-arrays to swap falls outside of the given array, * then the swap is stopped at the end of the array and as many as possible elements are swapped. - *

* *

Examples: *

    - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 2, 1) -> [3, 2, 1, 4]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 0, 1) -> [1, 2, 3, 4]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 2, 0, 2) -> [3, 4, 1, 2]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], -3, 2, 2) -> [3, 4, 1, 2]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 2, 1) -> [3, 2, 1, 4]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 0, 1) -> [1, 2, 3, 4]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 2, 0, 2) -> [3, 4, 1, 2]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], -3, 2, 2) -> [3, 4, 1, 2]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element in the series to swap @@ -2265,23 +2231,21 @@ public class ArrayUtils { } /** - *

Swaps a series of elements in the given array.

+ *

Swaps a series of elements in the given array. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. * Negative indices are promoted to 0(zero). * If any of the sub-arrays to swap falls outside of the given array, * then the swap is stopped at the end of the array and as many as possible elements are swapped. - *

* *

Examples: *

    - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 2, 1) -> [3, 2, 1, 4]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 0, 1) -> [1, 2, 3, 4]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 2, 0, 2) -> [3, 4, 1, 2]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], -3, 2, 2) -> [3, 4, 1, 2]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 2, 1) -> [3, 2, 1, 4]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 0, 1) -> [1, 2, 3, 4]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 2, 0, 2) -> [3, 4, 1, 2]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], -3, 2, 2) -> [3, 4, 1, 2]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element in the series to swap @@ -2308,23 +2272,21 @@ public class ArrayUtils { } /** - *

Swaps a series of elements in the given array.

+ *

Swaps a series of elements in the given array. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. * Negative indices are promoted to 0(zero). * If any of the sub-arrays to swap falls outside of the given array, * then the swap is stopped at the end of the array and as many as possible elements are swapped. - *

* *

Examples: *

    - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 2, 1) -> [3, 2, 1, 4]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 0, 1) -> [1, 2, 3, 4]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 2, 0, 2) -> [3, 4, 1, 2]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], -3, 2, 2) -> [3, 4, 1, 2]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 2, 1) -> [3, 2, 1, 4]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 0, 1) -> [1, 2, 3, 4]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 2, 0, 2) -> [3, 4, 1, 2]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], -3, 2, 2) -> [3, 4, 1, 2]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element in the series to swap @@ -2350,23 +2312,21 @@ public class ArrayUtils { } /** - *

Swaps a series of elements in the given array.

+ *

Swaps a series of elements in the given array. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. * Negative indices are promoted to 0(zero). * If any of the sub-arrays to swap falls outside of the given array, * then the swap is stopped at the end of the array and as many as possible elements are swapped. - *

* *

Examples: *

    - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 2, 1) -> [3, 2, 1, 4]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 0, 1) -> [1, 2, 3, 4]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 2, 0, 2) -> [3, 4, 1, 2]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], -3, 2, 2) -> [3, 4, 1, 2]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 2, 1) -> [3, 2, 1, 4]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 0, 1) -> [1, 2, 3, 4]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 2, 0, 2) -> [3, 4, 1, 2]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], -3, 2, 2) -> [3, 4, 1, 2]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element in the series to swap @@ -2392,23 +2352,21 @@ public class ArrayUtils { } /** - *

Swaps a series of elements in the given array.

+ *

Swaps a series of elements in the given array. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. * Negative indices are promoted to 0(zero). * If any of the sub-arrays to swap falls outside of the given array, * then the swap is stopped at the end of the array and as many as possible elements are swapped. - *

* *

Examples: *

    - *
  • ArrayUtils.swap(["1", "2", "3", "4"], 0, 2, 1) -> ["3", "2", "1", "4"]
  • - *
  • ArrayUtils.swap(["1", "2", "3", "4"], 0, 0, 1) -> ["1", "2", "3", "4"]
  • - *
  • ArrayUtils.swap(["1", "2", "3", "4"], 2, 0, 2) -> ["3", "4", "1", "2"]
  • - *
  • ArrayUtils.swap(["1", "2", "3", "4"], -3, 2, 2) -> ["3", "4", "1", "2"]
  • - *
  • ArrayUtils.swap(["1", "2", "3", "4"], 0, 3, 3) -> ["4", "2", "3", "1"]
  • + *
  • ArrayUtils.swap(["1", "2", "3", "4"], 0, 2, 1) -> ["3", "2", "1", "4"]
  • + *
  • ArrayUtils.swap(["1", "2", "3", "4"], 0, 0, 1) -> ["1", "2", "3", "4"]
  • + *
  • ArrayUtils.swap(["1", "2", "3", "4"], 2, 0, 2) -> ["3", "4", "1", "2"]
  • + *
  • ArrayUtils.swap(["1", "2", "3", "4"], -3, 2, 2) -> ["3", "4", "1", "2"]
  • + *
  • ArrayUtils.swap(["1", "2", "3", "4"], 0, 3, 3) -> ["4", "2", "3", "1"]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element in the series to swap @@ -2434,23 +2392,21 @@ public class ArrayUtils { } /** - *

Swaps a series of elements in the given array.

+ *

Swaps a series of elements in the given array. * *

This method does nothing for a {@code null} or empty input array or for overflow indices. * Negative indices are promoted to 0(zero). * If any of the sub-arrays to swap falls outside of the given array, * then the swap is stopped at the end of the array and as many as possible elements are swapped. - *

* *

Examples: *

    - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 2, 1) -> [3, 2, 1, 4]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 0, 1) -> [1, 2, 3, 4]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 2, 0, 2) -> [3, 4, 1, 2]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], -3, 2, 2) -> [3, 4, 1, 2]
  • - *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 2, 1) -> [3, 2, 1, 4]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 0, 1) -> [1, 2, 3, 4]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 2, 0, 2) -> [3, 4, 1, 2]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], -3, 2, 2) -> [3, 4, 1, 2]
  • + *
  • ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]
  • *
- *

* * @param array the array to swap, may be {@code null} * @param offset1 the index of the first element in the series to swap @@ -2481,14 +2437,17 @@ public class ArrayUtils { // Shift //----------------------------------------------------------------------- /** - *

Shifts the order of the given array.

+ *

Shifts the order of the given array. * - *

There is no special handling for multi-dimensional arrays.

+ *

There is no special handling for multi-dimensional arrays. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to shift, may be {@code null} * @param offset how many position to the right to shift the array, if negative it will be shiftd to the left. + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. */ public static void shift(final Object[] array, int offset) { if (array == null) { @@ -2498,11 +2457,14 @@ public class ArrayUtils { } /** - *

Shifts the order of the given array.

+ *

Shifts the order of the given array. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to shift, may be {@code null} + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. */ public static void shift(final long[] array, int offset) { if (array == null) { @@ -2512,11 +2474,14 @@ public class ArrayUtils { } /** - *

Shifts the order of the given array.

+ *

Shifts the order of the given array. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to shift, may be {@code null} + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. */ public static void shift(final int[] array, int offset) { if (array == null) { @@ -2526,11 +2491,14 @@ public class ArrayUtils { } /** - *

Shifts the order of the given array.

+ *

Shifts the order of the given array. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to shift, may be {@code null} + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. */ public static void shift(final short[] array, int offset) { if (array == null) { @@ -2540,11 +2508,14 @@ public class ArrayUtils { } /** - *

Shifts the order of the given array.

+ *

Shifts the order of the given array. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to shift, may be {@code null} + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. */ public static void shift(final char[] array, int offset) { if (array == null) { @@ -2554,11 +2525,14 @@ public class ArrayUtils { } /** - *

Shifts the order of the given array.

+ *

Shifts the order of the given array. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to shift, may be {@code null} + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. */ public static void shift(final byte[] array, int offset) { if (array == null) { @@ -2568,11 +2542,14 @@ public class ArrayUtils { } /** - *

Shifts the order of the given array.

+ *

Shifts the order of the given array. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to shift, may be {@code null} + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. */ public static void shift(final double[] array, int offset) { if (array == null) { @@ -2582,11 +2559,14 @@ public class ArrayUtils { } /** - *

Shifts the order of the given array.

+ *

Shifts the order of the given array. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to shift, may be {@code null} + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. */ public static void shift(final float[] array, int offset) { if (array == null) { @@ -2596,11 +2576,14 @@ public class ArrayUtils { } /** - *

Shifts the order of the given array.

+ *

Shifts the order of the given array. * - *

This method does nothing for a {@code null} input array.

+ *

This method does nothing for a {@code null} input array. * * @param array the array to shift, may be {@code null} + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. */ public static void shift(final boolean[] array, int offset) { if (array == null) { @@ -2612,11 +2595,9 @@ public class ArrayUtils { /** *

* Shifts the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to shift, may be {@code null} @@ -2626,6 +2607,9 @@ public class ArrayUtils { * @param endIndexExclusive * elements up to endIndex-1 are shiftd in the array. Undervalue (< start index) results in no * change. Overvalue (>array.length) is demoted to array length. + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. * @since 3.2 */ public static void shift(final boolean[] array, int startIndexInclusive, int endIndexExclusive, int offset) { @@ -2672,11 +2656,9 @@ public class ArrayUtils { /** *

* Shifts the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to shift, may be {@code null} @@ -2686,6 +2668,9 @@ public class ArrayUtils { * @param endIndexExclusive * elements up to endIndex-1 are shiftd in the array. Undervalue (< start index) results in no * change. Overvalue (>array.length) is demoted to array length. + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. * @since 3.2 */ public static void shift(final byte[] array, int startIndexInclusive, int endIndexExclusive, int offset) { @@ -2732,11 +2717,9 @@ public class ArrayUtils { /** *

* Shifts the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to shift, may be {@code null} @@ -2746,6 +2729,9 @@ public class ArrayUtils { * @param endIndexExclusive * elements up to endIndex-1 are shiftd in the array. Undervalue (< start index) results in no * change. Overvalue (>array.length) is demoted to array length. + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. * @since 3.2 */ public static void shift(final char[] array, int startIndexInclusive, int endIndexExclusive, int offset) { @@ -2792,11 +2778,9 @@ public class ArrayUtils { /** *

* Shifts the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to shift, may be {@code null} @@ -2806,6 +2790,9 @@ public class ArrayUtils { * @param endIndexExclusive * elements up to endIndex-1 are shiftd in the array. Undervalue (< start index) results in no * change. Overvalue (>array.length) is demoted to array length. + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. * @since 3.2 */ public static void shift(final double[] array, int startIndexInclusive, int endIndexExclusive, int offset) { @@ -2852,11 +2839,9 @@ public class ArrayUtils { /** *

* Shifts the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to shift, may be {@code null} @@ -2866,6 +2851,9 @@ public class ArrayUtils { * @param endIndexExclusive * elements up to endIndex-1 are shiftd in the array. Undervalue (< start index) results in no * change. Overvalue (>array.length) is demoted to array length. + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. * @since 3.2 */ public static void shift(final float[] array, int startIndexInclusive, int endIndexExclusive, int offset) { @@ -2912,11 +2900,9 @@ public class ArrayUtils { /** *

* Shifts the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to shift, may be {@code null} @@ -2926,6 +2912,9 @@ public class ArrayUtils { * @param endIndexExclusive * elements up to endIndex-1 are shiftd in the array. Undervalue (< start index) results in no * change. Overvalue (>array.length) is demoted to array length. + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. * @since 3.2 */ public static void shift(final int[] array, int startIndexInclusive, int endIndexExclusive, int offset) { @@ -2972,11 +2961,9 @@ public class ArrayUtils { /** *

* Shifts the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to shift, may be {@code null} @@ -2986,6 +2973,9 @@ public class ArrayUtils { * @param endIndexExclusive * elements up to endIndex-1 are shiftd in the array. Undervalue (< start index) results in no * change. Overvalue (>array.length) is demoted to array length. + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. */ public static void shift(final long[] array, int startIndexInclusive, int endIndexExclusive, int offset) { if (array == null) { @@ -3031,11 +3021,9 @@ public class ArrayUtils { /** *

* Shifts the order of the given array in the given range. - *

* *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to shift, may be {@code null} @@ -3045,6 +3033,9 @@ public class ArrayUtils { * @param endIndexExclusive * elements up to endIndex-1 are shiftd in the array. Undervalue (< start index) results in no * change. Overvalue (>array.length) is demoted to array length. + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. */ public static void shift(final Object[] array, int startIndexInclusive, int endIndexExclusive, int offset) { if (array == null) { @@ -3089,12 +3080,10 @@ public class ArrayUtils { /** *

- * Shifts the order of the given array in the given range. - *

+ * Rotate the elements of the given array in the given range. * *

* This method does nothing for a {@code null} input array. - *

* * @param array * the array to shift, may be {@code null} @@ -3102,8 +3091,11 @@ public class ArrayUtils { * the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no * change. * @param endIndexExclusive - * elements up to endIndex-1 are shiftd in the array. Undervalue (< start index) results in no + * elements up to endIndex-1 are shifted in the array. Undervalue (< start index) results in no * change. Overvalue (>array.length) is demoted to array length. + * @param offset + * The number of positions to rotate the elements. If the offset is larger than the number of elements to + * rotate, than the effective offset is modulo the number of elements to rotate. * @since 3.2 */ public static void shift(final short[] array, int startIndexInclusive, int endIndexExclusive, int offset) { @@ -3153,9 +3145,9 @@ public class ArrayUtils { // Object IndexOf //----------------------------------------------------------------------- /** - *

Finds the index of the given object in the array.

+ *

Finds the index of the given object in the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to search through for the object, may be {@code null} * @param objectToFind the object to find, may be {@code null} @@ -3167,12 +3159,12 @@ public class ArrayUtils { } /** - *

Finds the index of the given object in the array starting at the given index.

+ *

Finds the index of the given object in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex is treated as zero. A startIndex larger than the array - * length will return {@link #INDEX_NOT_FOUND} ({@code -1}).

+ * length will return {@link #INDEX_NOT_FOUND} ({@code -1}). * * @param array the array to search through for the object, may be {@code null} * @param objectToFind the object to find, may be {@code null} @@ -3204,9 +3196,9 @@ public class ArrayUtils { } /** - *

Finds the last index of the given object within the array.

+ *

Finds the last index of the given object within the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to travers backwords looking for the object, may be {@code null} * @param objectToFind the object to find, may be {@code null} @@ -3218,12 +3210,12 @@ public class ArrayUtils { } /** - *

Finds the last index of the given object in the array starting at the given index.

+ *

Finds the last index of the given object in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex will return {@link #INDEX_NOT_FOUND} ({@code -1}). A startIndex larger than - * the array length will search from the end of the array.

+ * the array length will search from the end of the array. * * @param array the array to traverse for looking for the object, may be {@code null} * @param objectToFind the object to find, may be {@code null} @@ -3257,9 +3249,9 @@ public class ArrayUtils { } /** - *

Checks if the object is in the given array.

+ *

Checks if the object is in the given array. * - *

The method returns {@code false} if a {@code null} array is passed in.

+ *

The method returns {@code false} if a {@code null} array is passed in. * * @param array the array to search through * @param objectToFind the object to find @@ -3272,9 +3264,9 @@ public class ArrayUtils { // long IndexOf //----------------------------------------------------------------------- /** - *

Finds the index of the given value in the array.

+ *

Finds the index of the given value in the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -3286,12 +3278,12 @@ public class ArrayUtils { } /** - *

Finds the index of the given value in the array starting at the given index.

+ *

Finds the index of the given value in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex is treated as zero. A startIndex larger than the array - * length will return {@link #INDEX_NOT_FOUND} ({@code -1}).

+ * length will return {@link #INDEX_NOT_FOUND} ({@code -1}). * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -3315,9 +3307,9 @@ public class ArrayUtils { } /** - *

Finds the last index of the given value within the array.

+ *

Finds the last index of the given value within the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to travers backwords looking for the object, may be {@code null} * @param valueToFind the object to find @@ -3329,12 +3321,12 @@ public class ArrayUtils { } /** - *

Finds the last index of the given value in the array starting at the given index.

+ *

Finds the last index of the given value in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex will return {@link #INDEX_NOT_FOUND} ({@code -1}). A startIndex larger than the - * array length will search from the end of the array.

+ * array length will search from the end of the array. * * @param array the array to traverse for looking for the object, may be {@code null} * @param valueToFind the value to find @@ -3360,9 +3352,9 @@ public class ArrayUtils { } /** - *

Checks if the value is in the given array.

+ *

Checks if the value is in the given array. * - *

The method returns {@code false} if a {@code null} array is passed in.

+ *

The method returns {@code false} if a {@code null} array is passed in. * * @param array the array to search through * @param valueToFind the value to find @@ -3375,9 +3367,9 @@ public class ArrayUtils { // int IndexOf //----------------------------------------------------------------------- /** - *

Finds the index of the given value in the array.

+ *

Finds the index of the given value in the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -3389,12 +3381,12 @@ public class ArrayUtils { } /** - *

Finds the index of the given value in the array starting at the given index.

+ *

Finds the index of the given value in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex is treated as zero. A startIndex larger than the array - * length will return {@link #INDEX_NOT_FOUND} ({@code -1}).

+ * length will return {@link #INDEX_NOT_FOUND} ({@code -1}). * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -3418,9 +3410,9 @@ public class ArrayUtils { } /** - *

Finds the last index of the given value within the array.

+ *

Finds the last index of the given value within the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to travers backwords looking for the object, may be {@code null} * @param valueToFind the object to find @@ -3432,12 +3424,12 @@ public class ArrayUtils { } /** - *

Finds the last index of the given value in the array starting at the given index.

+ *

Finds the last index of the given value in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex will return {@link #INDEX_NOT_FOUND} ({@code -1}). A startIndex larger than the - * array length will search from the end of the array.

+ * array length will search from the end of the array. * * @param array the array to traverse for looking for the object, may be {@code null} * @param valueToFind the value to find @@ -3463,9 +3455,9 @@ public class ArrayUtils { } /** - *

Checks if the value is in the given array.

+ *

Checks if the value is in the given array. * - *

The method returns {@code false} if a {@code null} array is passed in.

+ *

The method returns {@code false} if a {@code null} array is passed in. * * @param array the array to search through * @param valueToFind the value to find @@ -3478,9 +3470,9 @@ public class ArrayUtils { // short IndexOf //----------------------------------------------------------------------- /** - *

Finds the index of the given value in the array.

+ *

Finds the index of the given value in the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -3492,12 +3484,12 @@ public class ArrayUtils { } /** - *

Finds the index of the given value in the array starting at the given index.

+ *

Finds the index of the given value in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex is treated as zero. A startIndex larger than the array - * length will return {@link #INDEX_NOT_FOUND} ({@code -1}).

+ * length will return {@link #INDEX_NOT_FOUND} ({@code -1}). * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -3521,9 +3513,9 @@ public class ArrayUtils { } /** - *

Finds the last index of the given value within the array.

+ *

Finds the last index of the given value within the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to travers backwords looking for the object, may be {@code null} * @param valueToFind the object to find @@ -3535,12 +3527,12 @@ public class ArrayUtils { } /** - *

Finds the last index of the given value in the array starting at the given index.

+ *

Finds the last index of the given value in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex will return {@link #INDEX_NOT_FOUND} ({@code -1}). A startIndex larger than the - * array length will search from the end of the array.

+ * array length will search from the end of the array. * * @param array the array to traverse for looking for the object, may be {@code null} * @param valueToFind the value to find @@ -3566,9 +3558,9 @@ public class ArrayUtils { } /** - *

Checks if the value is in the given array.

+ *

Checks if the value is in the given array. * - *

The method returns {@code false} if a {@code null} array is passed in.

+ *

The method returns {@code false} if a {@code null} array is passed in. * * @param array the array to search through * @param valueToFind the value to find @@ -3581,9 +3573,9 @@ public class ArrayUtils { // char IndexOf //----------------------------------------------------------------------- /** - *

Finds the index of the given value in the array.

+ *

Finds the index of the given value in the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -3596,12 +3588,12 @@ public class ArrayUtils { } /** - *

Finds the index of the given value in the array starting at the given index.

+ *

Finds the index of the given value in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex is treated as zero. A startIndex larger than the array - * length will return {@link #INDEX_NOT_FOUND} ({@code -1}).

+ * length will return {@link #INDEX_NOT_FOUND} ({@code -1}). * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -3626,9 +3618,9 @@ public class ArrayUtils { } /** - *

Finds the last index of the given value within the array.

+ *

Finds the last index of the given value within the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to travers backwords looking for the object, may be {@code null} * @param valueToFind the object to find @@ -3641,12 +3633,12 @@ public class ArrayUtils { } /** - *

Finds the last index of the given value in the array starting at the given index.

+ *

Finds the last index of the given value in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex will return {@link #INDEX_NOT_FOUND} ({@code -1}). A startIndex larger than the - * array length will search from the end of the array.

+ * array length will search from the end of the array. * * @param array the array to traverse for looking for the object, may be {@code null} * @param valueToFind the value to find @@ -3673,9 +3665,9 @@ public class ArrayUtils { } /** - *

Checks if the value is in the given array.

+ *

Checks if the value is in the given array. * - *

The method returns {@code false} if a {@code null} array is passed in.

+ *

The method returns {@code false} if a {@code null} array is passed in. * * @param array the array to search through * @param valueToFind the value to find @@ -3689,9 +3681,9 @@ public class ArrayUtils { // byte IndexOf //----------------------------------------------------------------------- /** - *

Finds the index of the given value in the array.

+ *

Finds the index of the given value in the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -3703,12 +3695,12 @@ public class ArrayUtils { } /** - *

Finds the index of the given value in the array starting at the given index.

+ *

Finds the index of the given value in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex is treated as zero. A startIndex larger than the array - * length will return {@link #INDEX_NOT_FOUND} ({@code -1}).

+ * length will return {@link #INDEX_NOT_FOUND} ({@code -1}). * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -3732,9 +3724,9 @@ public class ArrayUtils { } /** - *

Finds the last index of the given value within the array.

+ *

Finds the last index of the given value within the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to travers backwords looking for the object, may be {@code null} * @param valueToFind the object to find @@ -3746,12 +3738,12 @@ public class ArrayUtils { } /** - *

Finds the last index of the given value in the array starting at the given index.

+ *

Finds the last index of the given value in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex will return {@link #INDEX_NOT_FOUND} ({@code -1}). A startIndex larger than the - * array length will search from the end of the array.

+ * array length will search from the end of the array. * * @param array the array to traverse for looking for the object, may be {@code null} * @param valueToFind the value to find @@ -3777,9 +3769,9 @@ public class ArrayUtils { } /** - *

Checks if the value is in the given array.

+ *

Checks if the value is in the given array. * - *

The method returns {@code false} if a {@code null} array is passed in.

+ *

The method returns {@code false} if a {@code null} array is passed in. * * @param array the array to search through * @param valueToFind the value to find @@ -3792,9 +3784,9 @@ public class ArrayUtils { // double IndexOf //----------------------------------------------------------------------- /** - *

Finds the index of the given value in the array.

+ *

Finds the index of the given value in the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -3808,9 +3800,9 @@ public class ArrayUtils { /** *

Finds the index of the given value within a given tolerance in the array. * This method will return the index of the first value which falls between the region - * defined by valueToFind - tolerance and valueToFind + tolerance.

+ * defined by valueToFind - tolerance and valueToFind + tolerance. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -3823,12 +3815,12 @@ public class ArrayUtils { } /** - *

Finds the index of the given value in the array starting at the given index.

+ *

Finds the index of the given value in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex is treated as zero. A startIndex larger than the array - * length will return {@link #INDEX_NOT_FOUND} ({@code -1}).

+ * length will return {@link #INDEX_NOT_FOUND} ({@code -1}). * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -3854,12 +3846,12 @@ public class ArrayUtils { /** *

Finds the index of the given value in the array starting at the given index. * This method will return the index of the first value which falls between the region - * defined by valueToFind - tolerance and valueToFind + tolerance.

+ * defined by valueToFind - tolerance and valueToFind + tolerance. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex is treated as zero. A startIndex larger than the array - * length will return {@link #INDEX_NOT_FOUND} ({@code -1}).

+ * length will return {@link #INDEX_NOT_FOUND} ({@code -1}). * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -3886,9 +3878,9 @@ public class ArrayUtils { } /** - *

Finds the last index of the given value within the array.

+ *

Finds the last index of the given value within the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to travers backwords looking for the object, may be {@code null} * @param valueToFind the object to find @@ -3902,9 +3894,9 @@ public class ArrayUtils { /** *

Finds the last index of the given value within a given tolerance in the array. * This method will return the index of the last value which falls between the region - * defined by valueToFind - tolerance and valueToFind + tolerance.

+ * defined by valueToFind - tolerance and valueToFind + tolerance. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -3917,12 +3909,12 @@ public class ArrayUtils { } /** - *

Finds the last index of the given value in the array starting at the given index.

+ *

Finds the last index of the given value in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex will return {@link #INDEX_NOT_FOUND} ({@code -1}). A startIndex larger than the - * array length will search from the end of the array.

+ * array length will search from the end of the array. * * @param array the array to traverse for looking for the object, may be {@code null} * @param valueToFind the value to find @@ -3950,12 +3942,12 @@ public class ArrayUtils { /** *

Finds the last index of the given value in the array starting at the given index. * This method will return the index of the last value which falls between the region - * defined by valueToFind - tolerance and valueToFind + tolerance.

+ * defined by valueToFind - tolerance and valueToFind + tolerance. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex will return {@link #INDEX_NOT_FOUND} ({@code -1}). A startIndex larger than the - * array length will search from the end of the array.

+ * array length will search from the end of the array. * * @param array the array to traverse for looking for the object, may be {@code null} * @param valueToFind the value to find @@ -3984,9 +3976,9 @@ public class ArrayUtils { } /** - *

Checks if the value is in the given array.

+ *

Checks if the value is in the given array. * - *

The method returns {@code false} if a {@code null} array is passed in.

+ *

The method returns {@code false} if a {@code null} array is passed in. * * @param array the array to search through * @param valueToFind the value to find @@ -3999,10 +3991,10 @@ public class ArrayUtils { /** *

Checks if a value falling within the given tolerance is in the * given array. If the array contains a value within the inclusive range - * defined by (value - tolerance) to (value + tolerance).

+ * defined by (value - tolerance) to (value + tolerance). * *

The method returns {@code false} if a {@code null} array - * is passed in.

+ * is passed in. * * @param array the array to search * @param valueToFind the value to find @@ -4016,9 +4008,9 @@ public class ArrayUtils { // float IndexOf //----------------------------------------------------------------------- /** - *

Finds the index of the given value in the array.

+ *

Finds the index of the given value in the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -4030,12 +4022,12 @@ public class ArrayUtils { } /** - *

Finds the index of the given value in the array starting at the given index.

+ *

Finds the index of the given value in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex is treated as zero. A startIndex larger than the array - * length will return {@link #INDEX_NOT_FOUND} ({@code -1}).

+ * length will return {@link #INDEX_NOT_FOUND} ({@code -1}). * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -4059,9 +4051,9 @@ public class ArrayUtils { } /** - *

Finds the last index of the given value within the array.

+ *

Finds the last index of the given value within the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to travers backwords looking for the object, may be {@code null} * @param valueToFind the object to find @@ -4073,12 +4065,12 @@ public class ArrayUtils { } /** - *

Finds the last index of the given value in the array starting at the given index.

+ *

Finds the last index of the given value in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex will return {@link #INDEX_NOT_FOUND} ({@code -1}). A startIndex larger than the - * array length will search from the end of the array.

+ * array length will search from the end of the array. * * @param array the array to traverse for looking for the object, may be {@code null} * @param valueToFind the value to find @@ -4104,9 +4096,9 @@ public class ArrayUtils { } /** - *

Checks if the value is in the given array.

+ *

Checks if the value is in the given array. * - *

The method returns {@code false} if a {@code null} array is passed in.

+ *

The method returns {@code false} if a {@code null} array is passed in. * * @param array the array to search through * @param valueToFind the value to find @@ -4119,9 +4111,9 @@ public class ArrayUtils { // boolean IndexOf //----------------------------------------------------------------------- /** - *

Finds the index of the given value in the array.

+ *

Finds the index of the given value in the array. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -4133,12 +4125,12 @@ public class ArrayUtils { } /** - *

Finds the index of the given value in the array starting at the given index.

+ *

Finds the index of the given value in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex is treated as zero. A startIndex larger than the array - * length will return {@link #INDEX_NOT_FOUND} ({@code -1}).

+ * length will return {@link #INDEX_NOT_FOUND} ({@code -1}). * * @param array the array to search through for the object, may be {@code null} * @param valueToFind the value to find @@ -4163,10 +4155,10 @@ public class ArrayUtils { } /** - *

Finds the last index of the given value within the array.

+ *

Finds the last index of the given value within the array. * *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) if - * {@code null} array input.

+ * {@code null} array input. * * @param array the array to travers backwords looking for the object, may be {@code null} * @param valueToFind the object to find @@ -4178,12 +4170,12 @@ public class ArrayUtils { } /** - *

Finds the last index of the given value in the array starting at the given index.

+ *

Finds the last index of the given value in the array starting at the given index. * - *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.

+ *

This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array. * *

A negative startIndex will return {@link #INDEX_NOT_FOUND} ({@code -1}). A startIndex larger than - * the array length will search from the end of the array.

+ * the array length will search from the end of the array. * * @param array the array to traverse for looking for the object, may be {@code null} * @param valueToFind the value to find @@ -4209,9 +4201,9 @@ public class ArrayUtils { } /** - *

Checks if the value is in the given array.

+ *

Checks if the value is in the given array. * - *

The method returns {@code false} if a {@code null} array is passed in.

+ *

The method returns {@code false} if a {@code null} array is passed in. * * @param array the array to search through * @param valueToFind the value to find @@ -4227,9 +4219,9 @@ public class ArrayUtils { // Character array converters // ---------------------------------------------------------------------- /** - *

Converts an array of object Characters to primitives.

+ *

Converts an array of object Characters to primitives. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code Character} array, may be {@code null} * @return a {@code char} array, {@code null} if null array input @@ -4249,9 +4241,9 @@ public class ArrayUtils { } /** - *

Converts an array of object Character to primitives handling {@code null}.

+ *

Converts an array of object Character to primitives handling {@code null}. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code Character} array, may be {@code null} * @param valueForNull the value to insert if {@code null} found @@ -4272,9 +4264,9 @@ public class ArrayUtils { } /** - *

Converts an array of primitive chars to objects.

+ *

Converts an array of primitive chars to objects. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code char} array * @return a {@code Character} array, {@code null} if null array input @@ -4295,9 +4287,9 @@ public class ArrayUtils { // Long array converters // ---------------------------------------------------------------------- /** - *

Converts an array of object Longs to primitives.

+ *

Converts an array of object Longs to primitives. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code Long} array, may be {@code null} * @return a {@code long} array, {@code null} if null array input @@ -4317,9 +4309,9 @@ public class ArrayUtils { } /** - *

Converts an array of object Long to primitives handling {@code null}.

+ *

Converts an array of object Long to primitives handling {@code null}. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code Long} array, may be {@code null} * @param valueForNull the value to insert if {@code null} found @@ -4340,9 +4332,9 @@ public class ArrayUtils { } /** - *

Converts an array of primitive longs to objects.

+ *

Converts an array of primitive longs to objects. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code long} array * @return a {@code Long} array, {@code null} if null array input @@ -4363,9 +4355,9 @@ public class ArrayUtils { // Int array converters // ---------------------------------------------------------------------- /** - *

Converts an array of object Integers to primitives.

+ *

Converts an array of object Integers to primitives. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code Integer} array, may be {@code null} * @return an {@code int} array, {@code null} if null array input @@ -4385,9 +4377,9 @@ public class ArrayUtils { } /** - *

Converts an array of object Integer to primitives handling {@code null}.

+ *

Converts an array of object Integer to primitives handling {@code null}. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code Integer} array, may be {@code null} * @param valueForNull the value to insert if {@code null} found @@ -4408,9 +4400,9 @@ public class ArrayUtils { } /** - *

Converts an array of primitive ints to objects.

+ *

Converts an array of primitive ints to objects. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array an {@code int} array * @return an {@code Integer} array, {@code null} if null array input @@ -4431,9 +4423,9 @@ public class ArrayUtils { // Short array converters // ---------------------------------------------------------------------- /** - *

Converts an array of object Shorts to primitives.

+ *

Converts an array of object Shorts to primitives. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code Short} array, may be {@code null} * @return a {@code byte} array, {@code null} if null array input @@ -4453,9 +4445,9 @@ public class ArrayUtils { } /** - *

Converts an array of object Short to primitives handling {@code null}.

+ *

Converts an array of object Short to primitives handling {@code null}. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code Short} array, may be {@code null} * @param valueForNull the value to insert if {@code null} found @@ -4476,9 +4468,9 @@ public class ArrayUtils { } /** - *

Converts an array of primitive shorts to objects.

+ *

Converts an array of primitive shorts to objects. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code short} array * @return a {@code Short} array, {@code null} if null array input @@ -4499,9 +4491,9 @@ public class ArrayUtils { // Byte array converters // ---------------------------------------------------------------------- /** - *

Converts an array of object Bytes to primitives.

+ *

Converts an array of object Bytes to primitives. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code Byte} array, may be {@code null} * @return a {@code byte} array, {@code null} if null array input @@ -4521,9 +4513,9 @@ public class ArrayUtils { } /** - *

Converts an array of object Bytes to primitives handling {@code null}.

+ *

Converts an array of object Bytes to primitives handling {@code null}. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code Byte} array, may be {@code null} * @param valueForNull the value to insert if {@code null} found @@ -4544,9 +4536,9 @@ public class ArrayUtils { } /** - *

Converts an array of primitive bytes to objects.

+ *

Converts an array of primitive bytes to objects. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code byte} array * @return a {@code Byte} array, {@code null} if null array input @@ -4567,9 +4559,9 @@ public class ArrayUtils { // Double array converters // ---------------------------------------------------------------------- /** - *

Converts an array of object Doubles to primitives.

+ *

Converts an array of object Doubles to primitives. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code Double} array, may be {@code null} * @return a {@code double} array, {@code null} if null array input @@ -4589,9 +4581,9 @@ public class ArrayUtils { } /** - *

Converts an array of object Doubles to primitives handling {@code null}.

+ *

Converts an array of object Doubles to primitives handling {@code null}. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code Double} array, may be {@code null} * @param valueForNull the value to insert if {@code null} found @@ -4612,9 +4604,9 @@ public class ArrayUtils { } /** - *

Converts an array of primitive doubles to objects.

+ *

Converts an array of primitive doubles to objects. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code double} array * @return a {@code Double} array, {@code null} if null array input @@ -4635,9 +4627,9 @@ public class ArrayUtils { // Float array converters // ---------------------------------------------------------------------- /** - *

Converts an array of object Floats to primitives.

+ *

Converts an array of object Floats to primitives. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code Float} array, may be {@code null} * @return a {@code float} array, {@code null} if null array input @@ -4657,9 +4649,9 @@ public class ArrayUtils { } /** - *

Converts an array of object Floats to primitives handling {@code null}.

+ *

Converts an array of object Floats to primitives handling {@code null}. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code Float} array, may be {@code null} * @param valueForNull the value to insert if {@code null} found @@ -4680,9 +4672,9 @@ public class ArrayUtils { } /** - *

Converts an array of primitive floats to objects.

+ *

Converts an array of primitive floats to objects. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code float} array * @return a {@code Float} array, {@code null} if null array input @@ -4703,9 +4695,9 @@ public class ArrayUtils { // Boolean array converters // ---------------------------------------------------------------------- /** - *

Converts an array of object Booleans to primitives.

+ *

Converts an array of object Booleans to primitives. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code Boolean} array, may be {@code null} * @return a {@code boolean} array, {@code null} if null array input @@ -4725,9 +4717,9 @@ public class ArrayUtils { } /** - *

Converts an array of object Booleans to primitives handling {@code null}.

+ *

Converts an array of object Booleans to primitives handling {@code null}. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code Boolean} array, may be {@code null} * @param valueForNull the value to insert if {@code null} found @@ -4748,9 +4740,9 @@ public class ArrayUtils { } /** - *

Converts an array of primitive booleans to objects.

+ *

Converts an array of primitive booleans to objects. * - *

This method returns {@code null} for a {@code null} input array.

+ *

This method returns {@code null} for a {@code null} input array. * * @param array a {@code boolean} array * @return a {@code Boolean} array, {@code null} if null array input @@ -4770,7 +4762,7 @@ public class ArrayUtils { // ---------------------------------------------------------------------- /** - *

Checks if an array of Objects is empty or {@code null}.

+ *

Checks if an array of Objects is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} @@ -4781,7 +4773,7 @@ public class ArrayUtils { } /** - *

Checks if an array of primitive longs is empty or {@code null}.

+ *

Checks if an array of primitive longs is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} @@ -4792,7 +4784,7 @@ public class ArrayUtils { } /** - *

Checks if an array of primitive ints is empty or {@code null}.

+ *

Checks if an array of primitive ints is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} @@ -4803,7 +4795,7 @@ public class ArrayUtils { } /** - *

Checks if an array of primitive shorts is empty or {@code null}.

+ *

Checks if an array of primitive shorts is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} @@ -4814,7 +4806,7 @@ public class ArrayUtils { } /** - *

Checks if an array of primitive chars is empty or {@code null}.

+ *

Checks if an array of primitive chars is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} @@ -4825,7 +4817,7 @@ public class ArrayUtils { } /** - *

Checks if an array of primitive bytes is empty or {@code null}.

+ *

Checks if an array of primitive bytes is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} @@ -4836,7 +4828,7 @@ public class ArrayUtils { } /** - *

Checks if an array of primitive doubles is empty or {@code null}.

+ *

Checks if an array of primitive doubles is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} @@ -4847,7 +4839,7 @@ public class ArrayUtils { } /** - *

Checks if an array of primitive floats is empty or {@code null}.

+ *

Checks if an array of primitive floats is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} @@ -4858,7 +4850,7 @@ public class ArrayUtils { } /** - *

Checks if an array of primitive booleans is empty or {@code null}.

+ *

Checks if an array of primitive booleans is empty or {@code null}. * * @param array the array to test * @return {@code true} if the array is empty or {@code null} @@ -4870,7 +4862,7 @@ public class ArrayUtils { // ---------------------------------------------------------------------- /** - *

Checks if an array of Objects is not empty or not {@code null}.

+ *

Checks if an array of Objects is not empty or not {@code null}. * * @param the component type of the array * @param array the array to test @@ -4882,7 +4874,7 @@ public class ArrayUtils { } /** - *

Checks if an array of primitive longs is not empty or not {@code null}.

+ *

Checks if an array of primitive longs is not empty or not {@code null}. * * @param array the array to test * @return {@code true} if the array is not empty or not {@code null} @@ -4893,7 +4885,7 @@ public class ArrayUtils { } /** - *

Checks if an array of primitive ints is not empty or not {@code null}.

+ *

Checks if an array of primitive ints is not empty or not {@code null}. * * @param array the array to test * @return {@code true} if the array is not empty or not {@code null} @@ -4904,7 +4896,7 @@ public class ArrayUtils { } /** - *

Checks if an array of primitive shorts is not empty or not {@code null}.

+ *

Checks if an array of primitive shorts is not empty or not {@code null}. * * @param array the array to test * @return {@code true} if the array is not empty or not {@code null} @@ -4915,7 +4907,7 @@ public class ArrayUtils { } /** - *

Checks if an array of primitive chars is not empty or not {@code null}.

+ *

Checks if an array of primitive chars is not empty or not {@code null}. * * @param array the array to test * @return {@code true} if the array is not empty or not {@code null} @@ -4926,7 +4918,7 @@ public class ArrayUtils { } /** - *

Checks if an array of primitive bytes is not empty or not {@code null}.

+ *

Checks if an array of primitive bytes is not empty or not {@code null}. * * @param array the array to test * @return {@code true} if the array is not empty or not {@code null} @@ -4937,7 +4929,7 @@ public class ArrayUtils { } /** - *

Checks if an array of primitive doubles is not empty or not {@code null}.

+ *

Checks if an array of primitive doubles is not empty or not {@code null}. * * @param array the array to test * @return {@code true} if the array is not empty or not {@code null} @@ -4948,7 +4940,7 @@ public class ArrayUtils { } /** - *

Checks if an array of primitive floats is not empty or not {@code null}.

+ *

Checks if an array of primitive floats is not empty or not {@code null}. * * @param array the array to test * @return {@code true} if the array is not empty or not {@code null} @@ -4959,7 +4951,7 @@ public class ArrayUtils { } /** - *

Checks if an array of primitive booleans is not empty or not {@code null}.

+ *

Checks if an array of primitive booleans is not empty or not {@code null}. * * @param array the array to test * @return {@code true} if the array is not empty or not {@code null} @@ -4970,10 +4962,10 @@ public class ArrayUtils { } /** - *

Adds all the elements of the given arrays into a new array.

+ *

Adds all the elements of the given arrays into a new array. *

The new array contains all of the element of {@code array1} followed * by all of the elements {@code array2}. When an array is returned, it is always - * a new array.

+ * a new array. * *
      * ArrayUtils.addAll(null, null)     = null
@@ -5024,10 +5016,10 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Adds all the elements of the given arrays into a new array.

+ *

Adds all the elements of the given arrays into a new array. *

The new array contains all of the element of {@code array1} followed * by all of the elements {@code array2}. When an array is returned, it is always - * a new array.

+ * a new array. * *
      * ArrayUtils.addAll(array1, null)   = cloned copy of array1
@@ -5053,10 +5045,10 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Adds all the elements of the given arrays into a new array.

+ *

Adds all the elements of the given arrays into a new array. *

The new array contains all of the element of {@code array1} followed * by all of the elements {@code array2}. When an array is returned, it is always - * a new array.

+ * a new array. * *
      * ArrayUtils.addAll(array1, null)   = cloned copy of array1
@@ -5082,10 +5074,10 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Adds all the elements of the given arrays into a new array.

+ *

Adds all the elements of the given arrays into a new array. *

The new array contains all of the element of {@code array1} followed * by all of the elements {@code array2}. When an array is returned, it is always - * a new array.

+ * a new array. * *
      * ArrayUtils.addAll(array1, null)   = cloned copy of array1
@@ -5111,10 +5103,10 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Adds all the elements of the given arrays into a new array.

+ *

Adds all the elements of the given arrays into a new array. *

The new array contains all of the element of {@code array1} followed * by all of the elements {@code array2}. When an array is returned, it is always - * a new array.

+ * a new array. * *
      * ArrayUtils.addAll(array1, null)   = cloned copy of array1
@@ -5140,10 +5132,10 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Adds all the elements of the given arrays into a new array.

+ *

Adds all the elements of the given arrays into a new array. *

The new array contains all of the element of {@code array1} followed * by all of the elements {@code array2}. When an array is returned, it is always - * a new array.

+ * a new array. * *
      * ArrayUtils.addAll(array1, null)   = cloned copy of array1
@@ -5169,10 +5161,10 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Adds all the elements of the given arrays into a new array.

+ *

Adds all the elements of the given arrays into a new array. *

The new array contains all of the element of {@code array1} followed * by all of the elements {@code array2}. When an array is returned, it is always - * a new array.

+ * a new array. * *
      * ArrayUtils.addAll(array1, null)   = cloned copy of array1
@@ -5198,10 +5190,10 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Adds all the elements of the given arrays into a new array.

+ *

Adds all the elements of the given arrays into a new array. *

The new array contains all of the element of {@code array1} followed * by all of the elements {@code array2}. When an array is returned, it is always - * a new array.

+ * a new array. * *
      * ArrayUtils.addAll(array1, null)   = cloned copy of array1
@@ -5227,10 +5219,10 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Adds all the elements of the given arrays into a new array.

+ *

Adds all the elements of the given arrays into a new array. *

The new array contains all of the element of {@code array1} followed * by all of the elements {@code array2}. When an array is returned, it is always - * a new array.

+ * a new array. * *
      * ArrayUtils.addAll(array1, null)   = cloned copy of array1
@@ -5256,15 +5248,15 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Copies the given array and adds the given element at the end of the new array.

+ *

Copies the given array and adds the given element at the end of the new array. * *

The new array contains the same elements of the input * array plus the given element in the last position. The component type of - * the new array is the same as that of the input array.

+ * the new array is the same as that of the input array. * *

If the input array is {@code null}, a new one element array is returned * whose component type is the same as the element, unless the element itself is null, - * in which case the return type is Object[]

+ * in which case the return type is Object[] * *
      * ArrayUtils.add(null, null)      = [null]
@@ -5301,14 +5293,14 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Copies the given array and adds the given element at the end of the new array.

+ *

Copies the given array and adds the given element at the end of the new array. * *

The new array contains the same elements of the input * array plus the given element in the last position. The component type of - * the new array is the same as that of the input array.

+ * the new array is the same as that of the input array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add(null, true)          = [true]
@@ -5328,14 +5320,14 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Copies the given array and adds the given element at the end of the new array.

+ *

Copies the given array and adds the given element at the end of the new array. * *

The new array contains the same elements of the input * array plus the given element in the last position. The component type of - * the new array is the same as that of the input array.

+ * the new array is the same as that of the input array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add(null, 0)   = [0]
@@ -5355,14 +5347,14 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Copies the given array and adds the given element at the end of the new array.

+ *

Copies the given array and adds the given element at the end of the new array. * *

The new array contains the same elements of the input * array plus the given element in the last position. The component type of - * the new array is the same as that of the input array.

+ * the new array is the same as that of the input array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add(null, '0')       = ['0']
@@ -5382,14 +5374,14 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Copies the given array and adds the given element at the end of the new array.

+ *

Copies the given array and adds the given element at the end of the new array. * *

The new array contains the same elements of the input * array plus the given element in the last position. The component type of - * the new array is the same as that of the input array.

+ * the new array is the same as that of the input array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add(null, 0)   = [0]
@@ -5409,14 +5401,14 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Copies the given array and adds the given element at the end of the new array.

+ *

Copies the given array and adds the given element at the end of the new array. * *

The new array contains the same elements of the input * array plus the given element in the last position. The component type of - * the new array is the same as that of the input array.

+ * the new array is the same as that of the input array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add(null, 0)   = [0]
@@ -5436,14 +5428,14 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Copies the given array and adds the given element at the end of the new array.

+ *

Copies the given array and adds the given element at the end of the new array. * *

The new array contains the same elements of the input * array plus the given element in the last position. The component type of - * the new array is the same as that of the input array.

+ * the new array is the same as that of the input array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add(null, 0)   = [0]
@@ -5463,14 +5455,14 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Copies the given array and adds the given element at the end of the new array.

+ *

Copies the given array and adds the given element at the end of the new array. * *

The new array contains the same elements of the input * array plus the given element in the last position. The component type of - * the new array is the same as that of the input array.

+ * the new array is the same as that of the input array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add(null, 0)   = [0]
@@ -5490,14 +5482,14 @@ public class ArrayUtils {
     }
 
     /**
-     * 

Copies the given array and adds the given element at the end of the new array.

+ *

Copies the given array and adds the given element at the end of the new array. * *

The new array contains the same elements of the input * array plus the given element in the last position. The component type of - * the new array is the same as that of the input array.

+ * the new array is the same as that of the input array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add(null, 0)   = [0]
@@ -5538,15 +5530,15 @@ public class ArrayUtils {
     /**
      * 

Inserts the specified element at the specified position in the array. * Shifts the element currently at that position (if any) and any subsequent - * elements to the right (adds one to their indices).

+ * elements to the right (adds one to their indices). * *

This method returns a new array with the same elements of the input * array plus the given element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add(null, 0, null)      = [null]
@@ -5581,15 +5573,15 @@ public class ArrayUtils {
     /**
      * 

Inserts the specified element at the specified position in the array. * Shifts the element currently at that position (if any) and any subsequent - * elements to the right (adds one to their indices).

+ * elements to the right (adds one to their indices). * *

This method returns a new array with the same elements of the input * array plus the given element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add(null, 0, true)          = [true]
@@ -5611,15 +5603,15 @@ public class ArrayUtils {
     /**
      * 

Inserts the specified element at the specified position in the array. * Shifts the element currently at that position (if any) and any subsequent - * elements to the right (adds one to their indices).

+ * elements to the right (adds one to their indices). * *

This method returns a new array with the same elements of the input * array plus the given element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add(null, 0, 'a')            = ['a']
@@ -5643,15 +5635,15 @@ public class ArrayUtils {
     /**
      * 

Inserts the specified element at the specified position in the array. * Shifts the element currently at that position (if any) and any subsequent - * elements to the right (adds one to their indices).

+ * elements to the right (adds one to their indices). * *

This method returns a new array with the same elements of the input * array plus the given element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add([1], 0, 2)         = [2, 1]
@@ -5674,15 +5666,15 @@ public class ArrayUtils {
     /**
      * 

Inserts the specified element at the specified position in the array. * Shifts the element currently at that position (if any) and any subsequent - * elements to the right (adds one to their indices).

+ * elements to the right (adds one to their indices). * *

This method returns a new array with the same elements of the input * array plus the given element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add([1], 0, 2)         = [2, 1]
@@ -5705,15 +5697,15 @@ public class ArrayUtils {
     /**
      * 

Inserts the specified element at the specified position in the array. * Shifts the element currently at that position (if any) and any subsequent - * elements to the right (adds one to their indices).

+ * elements to the right (adds one to their indices). * *

This method returns a new array with the same elements of the input * array plus the given element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add([1], 0, 2)         = [2, 1]
@@ -5736,15 +5728,15 @@ public class ArrayUtils {
     /**
      * 

Inserts the specified element at the specified position in the array. * Shifts the element currently at that position (if any) and any subsequent - * elements to the right (adds one to their indices).

+ * elements to the right (adds one to their indices). * *

This method returns a new array with the same elements of the input * array plus the given element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add([1L], 0, 2L)           = [2L, 1L]
@@ -5767,15 +5759,15 @@ public class ArrayUtils {
     /**
      * 

Inserts the specified element at the specified position in the array. * Shifts the element currently at that position (if any) and any subsequent - * elements to the right (adds one to their indices).

+ * elements to the right (adds one to their indices). * *

This method returns a new array with the same elements of the input * array plus the given element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add([1.1f], 0, 2.2f)               = [2.2f, 1.1f]
@@ -5798,15 +5790,15 @@ public class ArrayUtils {
     /**
      * 

Inserts the specified element at the specified position in the array. * Shifts the element currently at that position (if any) and any subsequent - * elements to the right (adds one to their indices).

+ * elements to the right (adds one to their indices). * *

This method returns a new array with the same elements of the input * array plus the given element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, a new one element array is returned - * whose component type is the same as the element.

+ * whose component type is the same as the element. * *
      * ArrayUtils.add([1.1], 0, 2.2)              = [2.2, 1.1]
@@ -5862,15 +5854,15 @@ public class ArrayUtils {
     /**
      * 

Removes the element at the specified position from the specified array. * All subsequent elements are shifted to the left (subtracts one from - * their indices).

+ * their indices). * *

This method returns a new array with the same elements of the input * array except the element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.remove(["a"], 0)           = []
@@ -5897,12 +5889,12 @@ public class ArrayUtils {
      * 

Removes the first occurrence of the specified element from the * specified array. All subsequent elements are shifted to the left * (subtracts one from their indices). If the array doesn't contains - * such an element, no elements are removed from the array.

+ * such an element, no elements are removed from the array. * *

This method returns a new array with the same elements of the input * array except the first occurrence of the specified element. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *
      * ArrayUtils.removeElement(null, "a")            = null
@@ -5930,15 +5922,15 @@ public class ArrayUtils {
     /**
      * 

Removes the element at the specified position from the specified array. * All subsequent elements are shifted to the left (subtracts one from - * their indices).

+ * their indices). * *

This method returns a new array with the same elements of the input * array except the element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.remove([true], 0)              = []
@@ -5963,12 +5955,12 @@ public class ArrayUtils {
      * 

Removes the first occurrence of the specified element from the * specified array. All subsequent elements are shifted to the left * (subtracts one from their indices). If the array doesn't contains - * such an element, no elements are removed from the array.

+ * such an element, no elements are removed from the array. * *

This method returns a new array with the same elements of the input * array except the first occurrence of the specified element. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *
      * ArrayUtils.removeElement(null, true)                = null
@@ -5995,15 +5987,15 @@ public class ArrayUtils {
     /**
      * 

Removes the element at the specified position from the specified array. * All subsequent elements are shifted to the left (subtracts one from - * their indices).

+ * their indices). * *

This method returns a new array with the same elements of the input * array except the element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.remove([1], 0)          = []
@@ -6028,12 +6020,12 @@ public class ArrayUtils {
      * 

Removes the first occurrence of the specified element from the * specified array. All subsequent elements are shifted to the left * (subtracts one from their indices). If the array doesn't contains - * such an element, no elements are removed from the array.

+ * such an element, no elements are removed from the array. * *

This method returns a new array with the same elements of the input * array except the first occurrence of the specified element. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *
      * ArrayUtils.removeElement(null, 1)        = null
@@ -6060,15 +6052,15 @@ public class ArrayUtils {
     /**
      * 

Removes the element at the specified position from the specified array. * All subsequent elements are shifted to the left (subtracts one from - * their indices).

+ * their indices). * *

This method returns a new array with the same elements of the input * array except the element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.remove(['a'], 0)           = []
@@ -6093,12 +6085,12 @@ public class ArrayUtils {
      * 

Removes the first occurrence of the specified element from the * specified array. All subsequent elements are shifted to the left * (subtracts one from their indices). If the array doesn't contains - * such an element, no elements are removed from the array.

+ * such an element, no elements are removed from the array. * *

This method returns a new array with the same elements of the input * array except the first occurrence of the specified element. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *
      * ArrayUtils.removeElement(null, 'a')            = null
@@ -6125,15 +6117,15 @@ public class ArrayUtils {
     /**
      * 

Removes the element at the specified position from the specified array. * All subsequent elements are shifted to the left (subtracts one from - * their indices).

+ * their indices). * *

This method returns a new array with the same elements of the input * array except the element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.remove([1.1], 0)           = []
@@ -6158,12 +6150,12 @@ public class ArrayUtils {
      * 

Removes the first occurrence of the specified element from the * specified array. All subsequent elements are shifted to the left * (subtracts one from their indices). If the array doesn't contains - * such an element, no elements are removed from the array.

+ * such an element, no elements are removed from the array. * *

This method returns a new array with the same elements of the input * array except the first occurrence of the specified element. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *
      * ArrayUtils.removeElement(null, 1.1)            = null
@@ -6190,15 +6182,15 @@ public class ArrayUtils {
     /**
      * 

Removes the element at the specified position from the specified array. * All subsequent elements are shifted to the left (subtracts one from - * their indices).

+ * their indices). * *

This method returns a new array with the same elements of the input * array except the element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.remove([1.1], 0)           = []
@@ -6223,12 +6215,12 @@ public class ArrayUtils {
      * 

Removes the first occurrence of the specified element from the * specified array. All subsequent elements are shifted to the left * (subtracts one from their indices). If the array doesn't contains - * such an element, no elements are removed from the array.

+ * such an element, no elements are removed from the array. * *

This method returns a new array with the same elements of the input * array except the first occurrence of the specified element. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *
      * ArrayUtils.removeElement(null, 1.1)            = null
@@ -6255,15 +6247,15 @@ public class ArrayUtils {
     /**
      * 

Removes the element at the specified position from the specified array. * All subsequent elements are shifted to the left (subtracts one from - * their indices).

+ * their indices). * *

This method returns a new array with the same elements of the input * array except the element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.remove([1], 0)         = []
@@ -6288,12 +6280,12 @@ public class ArrayUtils {
      * 

Removes the first occurrence of the specified element from the * specified array. All subsequent elements are shifted to the left * (subtracts one from their indices). If the array doesn't contains - * such an element, no elements are removed from the array.

+ * such an element, no elements are removed from the array. * *

This method returns a new array with the same elements of the input * array except the first occurrence of the specified element. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *
      * ArrayUtils.removeElement(null, 1)      = null
@@ -6320,15 +6312,15 @@ public class ArrayUtils {
     /**
      * 

Removes the element at the specified position from the specified array. * All subsequent elements are shifted to the left (subtracts one from - * their indices).

+ * their indices). * *

This method returns a new array with the same elements of the input * array except the element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.remove([1], 0)         = []
@@ -6353,12 +6345,12 @@ public class ArrayUtils {
      * 

Removes the first occurrence of the specified element from the * specified array. All subsequent elements are shifted to the left * (subtracts one from their indices). If the array doesn't contains - * such an element, no elements are removed from the array.

+ * such an element, no elements are removed from the array. * *

This method returns a new array with the same elements of the input * array except the first occurrence of the specified element. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *
      * ArrayUtils.removeElement(null, 1)      = null
@@ -6385,15 +6377,15 @@ public class ArrayUtils {
     /**
      * 

Removes the element at the specified position from the specified array. * All subsequent elements are shifted to the left (subtracts one from - * their indices).

+ * their indices). * *

This method returns a new array with the same elements of the input * array except the element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.remove([1], 0)         = []
@@ -6418,12 +6410,12 @@ public class ArrayUtils {
      * 

Removes the first occurrence of the specified element from the * specified array. All subsequent elements are shifted to the left * (subtracts one from their indices). If the array doesn't contains - * such an element, no elements are removed from the array.

+ * such an element, no elements are removed from the array. * *

This method returns a new array with the same elements of the input * array except the first occurrence of the specified element. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *
      * ArrayUtils.removeElement(null, 1)      = null
@@ -6450,15 +6442,15 @@ public class ArrayUtils {
     /**
      * 

Removes the element at the specified position from the specified array. * All subsequent elements are shifted to the left (subtracts one from - * their indices).

+ * their indices). * *

This method returns a new array with the same elements of the input * array except the element on the specified position. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * * @param array the array to remove the element from, may not be {@code null} * @param index the position of the element to be removed @@ -6485,15 +6477,15 @@ public class ArrayUtils { /** *

Removes the elements at the specified positions from the specified array. - * All remaining elements are shifted to the left.

+ * All remaining elements are shifted to the left. * *

This method returns a new array with the same elements of the input * array except those at the specified positions. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.removeAll(["a", "b", "c"], 0, 2) = ["b"]
@@ -6519,12 +6511,12 @@ public class ArrayUtils {
      * from the specified array. All subsequent elements are shifted left.
      * For any element-to-be-removed specified in greater quantities than
      * contained in the original array, no change occurs beyond the
-     * removal of the existing matching items.

+ * removal of the existing matching items. * *

This method returns a new array with the same elements of the input * array except for the earliest-encountered occurrences of the specified * elements. The component type of the returned array is always the same - * as that of the input array.

+ * as that of the input array. * *
      * ArrayUtils.removeElements(null, "a", "b")            = null
@@ -6575,15 +6567,15 @@ public class ArrayUtils {
 
     /**
      * 

Removes the elements at the specified positions from the specified array. - * All remaining elements are shifted to the left.

+ * All remaining elements are shifted to the left. * *

This method returns a new array with the same elements of the input * array except those at the specified positions. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.removeAll([1], 0)             = []
@@ -6611,12 +6603,12 @@ public class ArrayUtils {
      * from the specified array. All subsequent elements are shifted left.
      * For any element-to-be-removed specified in greater quantities than
      * contained in the original array, no change occurs beyond the
-     * removal of the existing matching items.

+ * removal of the existing matching items. * *

This method returns a new array with the same elements of the input * array except for the earliest-encountered occurrences of the specified * elements. The component type of the returned array is always the same - * as that of the input array.

+ * as that of the input array. * *
      * ArrayUtils.removeElements(null, 1, 2)      = null
@@ -6664,15 +6656,15 @@ public class ArrayUtils {
 
     /**
      * 

Removes the elements at the specified positions from the specified array. - * All remaining elements are shifted to the left.

+ * All remaining elements are shifted to the left. * *

This method returns a new array with the same elements of the input * array except those at the specified positions. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.removeAll([1], 0)             = []
@@ -6700,12 +6692,12 @@ public class ArrayUtils {
      * from the specified array. All subsequent elements are shifted left.
      * For any element-to-be-removed specified in greater quantities than
      * contained in the original array, no change occurs beyond the
-     * removal of the existing matching items.

+ * removal of the existing matching items. * *

This method returns a new array with the same elements of the input * array except for the earliest-encountered occurrences of the specified * elements. The component type of the returned array is always the same - * as that of the input array.

+ * as that of the input array. * *
      * ArrayUtils.removeElements(null, 1, 2)      = null
@@ -6753,15 +6745,15 @@ public class ArrayUtils {
 
     /**
      * 

Removes the elements at the specified positions from the specified array. - * All remaining elements are shifted to the left.

+ * All remaining elements are shifted to the left. * *

This method returns a new array with the same elements of the input * array except those at the specified positions. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.removeAll([1], 0)             = []
@@ -6789,12 +6781,12 @@ public class ArrayUtils {
      * from the specified array. All subsequent elements are shifted left.
      * For any element-to-be-removed specified in greater quantities than
      * contained in the original array, no change occurs beyond the
-     * removal of the existing matching items.

+ * removal of the existing matching items. * *

This method returns a new array with the same elements of the input * array except for the earliest-encountered occurrences of the specified * elements. The component type of the returned array is always the same - * as that of the input array.

+ * as that of the input array. * *
      * ArrayUtils.removeElements(null, 1, 2)      = null
@@ -6842,15 +6834,15 @@ public class ArrayUtils {
 
     /**
      * 

Removes the elements at the specified positions from the specified array. - * All remaining elements are shifted to the left.

+ * All remaining elements are shifted to the left. * *

This method returns a new array with the same elements of the input * array except those at the specified positions. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.removeAll([1], 0)             = []
@@ -6878,12 +6870,12 @@ public class ArrayUtils {
      * from the specified array. All subsequent elements are shifted left.
      * For any element-to-be-removed specified in greater quantities than
      * contained in the original array, no change occurs beyond the
-     * removal of the existing matching items.

+ * removal of the existing matching items. * *

This method returns a new array with the same elements of the input * array except for the earliest-encountered occurrences of the specified * elements. The component type of the returned array is always the same - * as that of the input array.

+ * as that of the input array. * *
      * ArrayUtils.removeElements(null, 1, 2)      = null
@@ -6931,15 +6923,15 @@ public class ArrayUtils {
 
     /**
      * 

Removes the elements at the specified positions from the specified array. - * All remaining elements are shifted to the left.

+ * All remaining elements are shifted to the left. * *

This method returns a new array with the same elements of the input * array except those at the specified positions. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.removeAll([1], 0)             = []
@@ -6967,12 +6959,12 @@ public class ArrayUtils {
      * from the specified array. All subsequent elements are shifted left.
      * For any element-to-be-removed specified in greater quantities than
      * contained in the original array, no change occurs beyond the
-     * removal of the existing matching items.

+ * removal of the existing matching items. * *

This method returns a new array with the same elements of the input * array except for the earliest-encountered occurrences of the specified * elements. The component type of the returned array is always the same - * as that of the input array.

+ * as that of the input array. * *
      * ArrayUtils.removeElements(null, 1, 2)      = null
@@ -7020,15 +7012,15 @@ public class ArrayUtils {
 
     /**
      * 

Removes the elements at the specified positions from the specified array. - * All remaining elements are shifted to the left.

+ * All remaining elements are shifted to the left. * *

This method returns a new array with the same elements of the input * array except those at the specified positions. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.removeAll([1], 0)             = []
@@ -7056,12 +7048,12 @@ public class ArrayUtils {
      * from the specified array. All subsequent elements are shifted left.
      * For any element-to-be-removed specified in greater quantities than
      * contained in the original array, no change occurs beyond the
-     * removal of the existing matching items.

+ * removal of the existing matching items. * *

This method returns a new array with the same elements of the input * array except for the earliest-encountered occurrences of the specified * elements. The component type of the returned array is always the same - * as that of the input array.

+ * as that of the input array. * *
      * ArrayUtils.removeElements(null, 1, 2)      = null
@@ -7109,15 +7101,15 @@ public class ArrayUtils {
 
     /**
      * 

Removes the elements at the specified positions from the specified array. - * All remaining elements are shifted to the left.

+ * All remaining elements are shifted to the left. * *

This method returns a new array with the same elements of the input * array except those at the specified positions. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.removeAll([1], 0)             = []
@@ -7145,12 +7137,12 @@ public class ArrayUtils {
      * from the specified array. All subsequent elements are shifted left.
      * For any element-to-be-removed specified in greater quantities than
      * contained in the original array, no change occurs beyond the
-     * removal of the existing matching items.

+ * removal of the existing matching items. * *

This method returns a new array with the same elements of the input * array except for the earliest-encountered occurrences of the specified * elements. The component type of the returned array is always the same - * as that of the input array.

+ * as that of the input array. * *
      * ArrayUtils.removeElements(null, 1, 2)      = null
@@ -7198,15 +7190,15 @@ public class ArrayUtils {
 
     /**
      * 

Removes the elements at the specified positions from the specified array. - * All remaining elements are shifted to the left.

+ * All remaining elements are shifted to the left. * *

This method returns a new array with the same elements of the input * array except those at the specified positions. The component * type of the returned array is always the same as that of the input - * array.

+ * array. * *

If the input array is {@code null}, an IndexOutOfBoundsException - * will be thrown, because in that case no valid index can be specified.

+ * will be thrown, because in that case no valid index can be specified. * *
      * ArrayUtils.removeAll([true, false, true], 0, 2) = [false]
@@ -7230,12 +7222,12 @@ public class ArrayUtils {
      * from the specified array. All subsequent elements are shifted left.
      * For any element-to-be-removed specified in greater quantities than
      * contained in the original array, no change occurs beyond the
-     * removal of the existing matching items.

+ * removal of the existing matching items. * *

This method returns a new array with the same elements of the input * array except for the earliest-encountered occurrences of the specified * elements. The component type of the returned array is always the same - * as that of the input array.

+ * as that of the input array. * *
      * ArrayUtils.removeElements(null, true, false)               = null
@@ -7371,7 +7363,7 @@ public class ArrayUtils {
 
     /**
      * 

This method checks whether the provided array is sorted according to the class's - * {@code compareTo} method.

+ * {@code compareTo} method. * * @param array the array to check * @param the datatype of the array to check, it must implement {@code Comparable} @@ -7389,7 +7381,7 @@ public class ArrayUtils { /** - *

This method checks whether the provided array is sorted according to the provided {@code Comparator}.

+ *

This method checks whether the provided array is sorted according to the provided {@code Comparator}. * * @param array the array to check * @param comparator the {@code Comparator} to compare over @@ -7420,7 +7412,7 @@ public class ArrayUtils { } /** - *

This method checks whether the provided array is sorted according to natural ordering.

+ *

This method checks whether the provided array is sorted according to natural ordering. * * @param array the array to check * @return whether the array is sorted according to natural ordering @@ -7445,7 +7437,7 @@ public class ArrayUtils { } /** - *

This method checks whether the provided array is sorted according to natural ordering.

+ *

This method checks whether the provided array is sorted according to natural ordering. * * @param array the array to check * @return whether the array is sorted according to natural ordering @@ -7470,7 +7462,7 @@ public class ArrayUtils { } /** - *

This method checks whether the provided array is sorted according to natural ordering.

+ *

This method checks whether the provided array is sorted according to natural ordering. * * @param array the array to check * @return whether the array is sorted according to natural ordering @@ -7495,7 +7487,7 @@ public class ArrayUtils { } /** - *

This method checks whether the provided array is sorted according to natural ordering.

+ *

This method checks whether the provided array is sorted according to natural ordering. * * @param array the array to check * @return whether the array is sorted according to natural ordering @@ -7520,7 +7512,7 @@ public class ArrayUtils { } /** - *

This method checks whether the provided array is sorted according to natural ordering.

+ *

This method checks whether the provided array is sorted according to natural ordering. * * @param array the array to check * @return whether the array is sorted according to natural ordering @@ -7545,7 +7537,7 @@ public class ArrayUtils { } /** - *

This method checks whether the provided array is sorted according to natural ordering.

+ *

This method checks whether the provided array is sorted according to natural ordering. * * @param array the array to check * @return whether the array is sorted according to natural ordering @@ -7570,7 +7562,7 @@ public class ArrayUtils { } /** - *

This method checks whether the provided array is sorted according to natural ordering.

+ *

This method checks whether the provided array is sorted according to natural ordering. * * @param array the array to check * @return whether the array is sorted according to natural ordering @@ -7596,7 +7588,7 @@ public class ArrayUtils { /** *

This method checks whether the provided array is sorted according to natural ordering - * ({@code false} before {@code true}).

+ * ({@code false} before {@code true}). * * @param array the array to check * @return whether the array is sorted according to natural ordering @@ -7625,7 +7617,6 @@ public class ArrayUtils { * Removes the occurrences of the specified element from the specified array. All subsequent elements are shifted to * the left (subtracts one from their indices). If the array doesn't contains such an element, no elements are * removed from the array. null will be returned if the input array is null - *

* * @param element the element to remove * @param array the input array @@ -7655,7 +7646,6 @@ public class ArrayUtils { * Removes the occurrences of the specified element from the specified array. All subsequent elements are shifted to * the left (subtracts one from their indices). If the array doesn't contains such an element, no elements are * removed from the array. null will be returned if the input array is null - *

* * @param element the element to remove * @param array the input array @@ -7685,7 +7675,6 @@ public class ArrayUtils { * Removes the occurrences of the specified element from the specified array. All subsequent elements are shifted to * the left (subtracts one from their indices). If the array doesn't contains such an element, no elements are * removed from the array. null will be returned if the input array is null - *

* * @param element the element to remove * @param array the input array @@ -7715,7 +7704,6 @@ public class ArrayUtils { * Removes the occurrences of the specified element from the specified array. All subsequent elements are shifted to * the left (subtracts one from their indices). If the array doesn't contains such an element, no elements are * removed from the array. null will be returned if the input array is null - *

* * @param element the element to remove * @param array the input array @@ -7745,7 +7733,6 @@ public class ArrayUtils { * Removes the occurrences of the specified element from the specified array. All subsequent elements are shifted to * the left (subtracts one from their indices). If the array doesn't contains such an element, no elements are * removed from the array. null will be returned if the input array is null - *

* * @param element the element to remove * @param array the input array @@ -7775,7 +7762,6 @@ public class ArrayUtils { * Removes the occurrences of the specified element from the specified array. All subsequent elements are shifted to * the left (subtracts one from their indices). If the array doesn't contains such an element, no elements are * removed from the array. null will be returned if the input array is null - *

* * @param element the element to remove * @param array the input array @@ -7805,7 +7791,6 @@ public class ArrayUtils { * Removes the occurrences of the specified element from the specified array. All subsequent elements are shifted to * the left (subtracts one from their indices). If the array doesn't contains such an element, no elements are * removed from the array. null will be returned if the input array is null - *

* * @param element the element to remove * @param array the input array @@ -7835,7 +7820,6 @@ public class ArrayUtils { * Removes the occurrences of the specified element from the specified array. All subsequent elements are shifted to * the left (subtracts one from their indices). If the array doesn't contains such an element, no elements are * removed from the array. null will be returned if the input array is null - *

* * @param element the element to remove * @param array the input array @@ -7865,7 +7849,6 @@ public class ArrayUtils { * Removes the occurrences of the specified element from the specified array. All subsequent elements are shifted to * the left (subtracts one from their indices). If the array doesn't contains such an element, no elements are * removed from the array. null will be returned if the input array is null - *

* * @param the type of object in the array * @param element the element to remove diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java index bd2b64509..f4ec00bf6 100644 --- a/src/main/java/org/apache/commons/lang3/StringUtils.java +++ b/src/main/java/org/apache/commons/lang3/StringUtils.java @@ -4743,8 +4743,8 @@ public class StringUtils { * StringUtils.removeAll("any", ".*") = "" * StringUtils.removeAll("any", ".+") = "" * StringUtils.removeAll("abc", ".?") = "" - * StringUtils.removeAll("A<__>\n<__>B", "<.*>") = "A\nB" - * StringUtils.removeAll("A<__>\n<__>B", "(?s)<.*>") = "AB" + * StringUtils.removeAll("A<__>\n<__>B", "<.*>") = "A\nB" + * StringUtils.removeAll("A<__>\n<__>B", "(?s)<.*>") = "AB" * StringUtils.removeAll("ABCabc123abc", "[a-z]") = "ABC123" *
* @@ -4789,8 +4789,8 @@ public class StringUtils { * StringUtils.removeFirst("any", ".*") = "" * StringUtils.removeFirst("any", ".+") = "" * StringUtils.removeFirst("abc", ".?") = "bc" - * StringUtils.removeFirst("A<__>\n<__>B", "<.*>") = "A\n<__>B" - * StringUtils.removeFirst("A<__>\n<__>B", "(?s)<.*>") = "AB" + * StringUtils.removeFirst("A<__>\n<__>B", "<.*>") = "A\n<__>B" + * StringUtils.removeFirst("A<__>\n<__>B", "(?s)<.*>") = "AB" * StringUtils.removeFirst("ABCabc123", "[a-z]") = "ABCbc123" * StringUtils.removeFirst("ABCabc123abc", "[a-z]+") = "ABC123abc" *
@@ -4861,7 +4861,7 @@ public class StringUtils { * StringUtils.replacePattern("", "", "zzz") = "zzz" * StringUtils.replacePattern("", ".*", "zzz") = "zzz" * StringUtils.replacePattern("", ".+", "zzz") = "" - * StringUtils.replacePattern("<__>\n<__>", "<.*>", "z") = "z" + * StringUtils.replacePattern("<__>\n<__>", "<.*>", "z") = "z" * StringUtils.replacePattern("ABCabc123", "[a-z]", "_") = "ABC___123" * StringUtils.replacePattern("ABCabc123", "[^A-Z0-9]+", "_") = "ABC_123" * StringUtils.replacePattern("ABCabc123", "[^A-Z0-9]+", "") = "ABC123" @@ -4903,7 +4903,7 @@ public class StringUtils { *
      * StringUtils.removePattern(null, *)       = null
      * StringUtils.removePattern("any", null)   = "any"
-     * StringUtils.removePattern("A<__>\n<__>B", "<.*>")  = "AB"
+     * StringUtils.removePattern("A<__>\n<__>B", "<.*>")  = "AB"
      * StringUtils.removePattern("ABCabc123", "[a-z]")    = "ABC123"
      * 
* @@ -4947,8 +4947,8 @@ public class StringUtils { * StringUtils.replaceAll("", ".*", "zzz") = "zzz" * StringUtils.replaceAll("", ".+", "zzz") = "" * StringUtils.replaceAll("abc", "", "ZZ") = "ZZaZZbZZcZZ" - * StringUtils.replaceAll("<__>\n<__>", "<.*>", "z") = "z\nz" - * StringUtils.replaceAll("<__>\n<__>", "(?s)<.*>", "z") = "z" + * StringUtils.replaceAll("<__>\n<__>", "<.*>", "z") = "z\nz" + * StringUtils.replaceAll("<__>\n<__>", "(?s)<.*>", "z") = "z" * StringUtils.replaceAll("ABCabc123", "[a-z]", "_") = "ABC___123" * StringUtils.replaceAll("ABCabc123", "[^A-Z0-9]+", "_") = "ABC_123" * StringUtils.replaceAll("ABCabc123", "[^A-Z0-9]+", "") = "ABC123" @@ -5001,8 +5001,8 @@ public class StringUtils { * StringUtils.replaceFirst("", ".*", "zzz") = "zzz" * StringUtils.replaceFirst("", ".+", "zzz") = "" * StringUtils.replaceFirst("abc", "", "ZZ") = "ZZabc" - * StringUtils.replaceFirst("<__>\n<__>", "<.*>", "z") = "z\n<__>" - * StringUtils.replaceFirst("<__>\n<__>", "(?s)<.*>", "z") = "z" + * StringUtils.replaceFirst("<__>\n<__>", "<.*>", "z") = "z\n<__>" + * StringUtils.replaceFirst("<__>\n<__>", "(?s)<.*>", "z") = "z" * StringUtils.replaceFirst("ABCabc123", "[a-z]", "_") = "ABC_bc123" * StringUtils.replaceFirst("ABCabc123abc", "[^A-Z0-9]+", "_") = "ABC_123abc" * StringUtils.replaceFirst("ABCabc123abc", "[^A-Z0-9]+", "") = "ABC123abc" diff --git a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java index 7474d281f..0a7c2cc38 100644 --- a/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java +++ b/src/main/java/org/apache/commons/lang3/exception/ExceptionUtils.java @@ -740,15 +740,15 @@ public class ExceptionUtils { * exceptions as checked. * * @since 3.5 - * @see {{@link #wrapAndThrow(Throwable)} + * @see #wrapAndThrow(Throwable) * * @param throwable * The throwable to rethrow. - * @return R Never actually returns, this generic type matches any type + * @param The type of the returned value. + * @return Never actually returned, this generic type matches any type * which the calling site requires. "Returning" the results of this * method, as done in the propagateExample above, will satisfy the * java compiler requirement that all code paths return a value. - * @throws throwable */ public static R rethrow(Throwable throwable) { // claim that the typeErasure invocation throws a RuntimeException @@ -777,15 +777,16 @@ public class ExceptionUtils { * determine if the caught exception was caused by the checked exception. * * @since 3.5 - * @see {{@link #rethrow(Throwable)}, {{@link #hasCause(Throwable, Class)} + * @see #rethrow(Throwable) + * @see #hasCause(Throwable, Class) * * @param throwable * The throwable to rethrow. - * @return R Never actually returns, this generic type matches any type + * @param The type of the returned value. + * @return Never actually returned, this generic type matches any type * which the calling site requires. "Returning" the results of this - * method, will satisfy the java compiler requirement that all code + * method will satisfy the java compiler requirement that all code * paths return a value. - * @throws throwable */ public static R wrapAndThrow(Throwable throwable) { if (throwable instanceof RuntimeException) { @@ -802,7 +803,7 @@ public class ExceptionUtils { * of the given type? * * @since 3.5 - * @see {{@link #wrapAndThrow(Throwable)} + * @see #wrapAndThrow(Throwable) * * @param chain * The root of a Throwable causal chain. diff --git a/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java b/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java index 6f8da7f19..c34e23d0a 100644 --- a/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java +++ b/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java @@ -1220,7 +1220,7 @@ public class StrSubstitutor { * $${this-is-escaped} becomes * ${this-is-escaped}). The default value is false * - * @param preserveEscapes + * @param preserveEscapes true if escapes are to be preserved */ public void setPreserveEscapes(final boolean preserveEscapes) { this.preserveEscapes = preserveEscapes; diff --git a/src/main/java/org/apache/commons/lang3/text/WordUtils.java b/src/main/java/org/apache/commons/lang3/text/WordUtils.java index b805d6b88..da9285688 100644 --- a/src/main/java/org/apache/commons/lang3/text/WordUtils.java +++ b/src/main/java/org/apache/commons/lang3/text/WordUtils.java @@ -16,12 +16,12 @@ */ package org.apache.commons.lang3.text; +import java.util.regex.Pattern; + import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.SystemUtils; -import java.util.regex.Pattern; - /** *

Operations on Strings that contain words.

* @@ -567,7 +567,7 @@ public class WordUtils { *

Checks if the String contains all words in the given array.

* *

- * A {@code null} String will return {@code false}. A {@code null, zero + * A {@code null} String will return {@code false}. A {@code null}, zero * length search array or if one element of array is null will return {@code false}. *

* @@ -581,7 +581,7 @@ public class WordUtils { *
* * - * @param str The str to check, may be null + * @param word The CharSequence to check, may be null * @param words The array of String words to search for, may be null * @return {@code true} if all search words are found, {@code false} otherwise */ diff --git a/src/main/java/org/apache/commons/lang3/time/DatePrinter.java b/src/main/java/org/apache/commons/lang3/time/DatePrinter.java index a2e97a953..8f42ec71f 100644 --- a/src/main/java/org/apache/commons/lang3/time/DatePrinter.java +++ b/src/main/java/org/apache/commons/lang3/time/DatePrinter.java @@ -102,6 +102,7 @@ public interface DatePrinter { * * @param millis the millisecond value to format * @param buf the buffer to format into + * @param the Appendable class type, usually StringBuilder or StringBuffer. * @return the specified string buffer * @since 3.5 */ @@ -113,6 +114,7 @@ public interface DatePrinter { * * @param date the date to format * @param buf the buffer to format into + * @param the Appendable class type, usually StringBuilder or StringBuffer. * @return the specified string buffer * @since 3.5 */ @@ -126,6 +128,7 @@ public interface DatePrinter { * * @param calendar the calendar to format * @param buf the buffer to format into + * @param the Appendable class type, usually StringBuilder or StringBuffer. * @return the specified string buffer * @since 3.5 */ diff --git a/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java b/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java index c2907b274..15dab8d8f 100644 --- a/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java +++ b/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java @@ -658,9 +658,9 @@ public class FastDateFormat extends Format implements DateParser, DatePrinter { /** *

Performs the formatting by applying the rules to the * specified calendar.

- * @deprecated Use {{@link #format(Calendar, Appendable) + * @deprecated Use {@link #format(Calendar, Appendable)} * - * @param calendar the calendar to format + * @param calendar the calendar to format * @param buf the buffer to format into * @return the specified string buffer */ diff --git a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java index 62f357760..dd369e03d 100644 --- a/src/main/java/org/apache/commons/lang3/time/FastDateParser.java +++ b/src/main/java/org/apache/commons/lang3/time/FastDateParser.java @@ -124,8 +124,6 @@ public class FastDateParser implements DateParser, Serializable { * @param timeZone non-null time zone to use * @param locale non-null locale * @param centuryStart The start of the century for 2 digit year parsing - * @param lenient if true, non-standard values for Calendar fields should be accepted; - * if false, non-standard values will cause a ParseException to be thrown {@link CalendaretLenient(boolean)} * * @since 3.5 */ diff --git a/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java b/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java index f0445525a..91ee7190e 100644 --- a/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java +++ b/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java @@ -545,6 +545,7 @@ public class FastDatePrinter implements DatePrinter, Serializable { * * @param calendar the calendar to format * @param buf the buffer to format into + * @param the Appendable class type, usually StringBuilder or StringBuffer. * @return the specified string buffer */ protected B applyRules(final Calendar calendar, final B buf) {