commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1436768 [2/13] - in /commons/proper/lang/trunk/src: main/java/org/apache/commons/lang3/ main/java/org/apache/commons/lang3/builder/ main/java/org/apache/commons/lang3/concurrent/ main/java/org/apache/commons/lang3/event/ main/java/org/apac...
Date Tue, 22 Jan 2013 07:07:46 GMT
Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ArrayUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ArrayUtils.java?rev=1436768&r1=1436767&r2=1436768&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ArrayUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/ArrayUtils.java Tue Jan 22 07:07:42 2013
@@ -155,7 +155,7 @@ public class ArrayUtils {
      * @param array  the array to get a toString for, may be {@code null}
      * @return a String representation of the array, '{}' if null array input
      */
-    public static String toString(Object array) {
+    public static String toString(final Object array) {
         return toString(array, "{}");
     }
 
@@ -171,7 +171,7 @@ public class ArrayUtils {
      * @param stringIfNull  the String to return if the array is {@code null}
      * @return a String representation of the array
      */
-    public static String toString(Object array, String stringIfNull) {
+    public static String toString(final Object array, final String stringIfNull) {
         if (array == null) {
             return stringIfNull;
         }
@@ -186,7 +186,7 @@ public class ArrayUtils {
      * @param array  the array to get a hash code for, {@code null} returns zero
      * @return a hash code for the array
      */
-    public static int hashCode(Object array) {
+    public static int hashCode(final Object array) {
         return new HashCodeBuilder().append(array).toHashCode();
     }
 
@@ -200,7 +200,7 @@ public class ArrayUtils {
      * @param array2  the right hand array to compare, may be {@code null}
      * @return {@code true} if the arrays are equal
      */
-    public static boolean isEquals(Object array1, Object array2) {
+    public static boolean isEquals(final Object array1, final Object array2) {
         return new EqualsBuilder().append(array1, array2).isEquals();
     }
 
@@ -231,7 +231,7 @@ public class ArrayUtils {
      * @throws IllegalArgumentException  if the array contains elements other
      *  than {@link java.util.Map.Entry} and an Array
      */
-    public static Map<Object, Object> toMap(Object[] array) {
+    public static Map<Object, Object> toMap(final Object[] array) {
         if (array == null) {
             return null;
         }
@@ -316,7 +316,7 @@ public class ArrayUtils {
      * @param array  the array to shallow clone, may be {@code null}
      * @return the cloned array, {@code null} if {@code null} input
      */
-    public static <T> T[] clone(T[] array) {
+    public static <T> T[] clone(final T[] array) {
         if (array == null) {
             return null;
         }
@@ -332,7 +332,7 @@ public class ArrayUtils {
      * @param array  the array to clone, may be {@code null}
      * @return the cloned array, {@code null} if {@code null} input
      */
-    public static long[] clone(long[] array) {
+    public static long[] clone(final long[] array) {
         if (array == null) {
             return null;
         }
@@ -348,7 +348,7 @@ public class ArrayUtils {
      * @param array  the array to clone, may be {@code null}
      * @return the cloned array, {@code null} if {@code null} input
      */
-    public static int[] clone(int[] array) {
+    public static int[] clone(final int[] array) {
         if (array == null) {
             return null;
         }
@@ -364,7 +364,7 @@ public class ArrayUtils {
      * @param array  the array to clone, may be {@code null}
      * @return the cloned array, {@code null} if {@code null} input
      */
-    public static short[] clone(short[] array) {
+    public static short[] clone(final short[] array) {
         if (array == null) {
             return null;
         }
@@ -380,7 +380,7 @@ public class ArrayUtils {
      * @param array  the array to clone, may be {@code null}
      * @return the cloned array, {@code null} if {@code null} input
      */
-    public static char[] clone(char[] array) {
+    public static char[] clone(final char[] array) {
         if (array == null) {
             return null;
         }
@@ -396,7 +396,7 @@ public class ArrayUtils {
      * @param array  the array to clone, may be {@code null}
      * @return the cloned array, {@code null} if {@code null} input
      */
-    public static byte[] clone(byte[] array) {
+    public static byte[] clone(final byte[] array) {
         if (array == null) {
             return null;
         }
@@ -412,7 +412,7 @@ public class ArrayUtils {
      * @param array  the array to clone, may be {@code null}
      * @return the cloned array, {@code null} if {@code null} input
      */
-    public static double[] clone(double[] array) {
+    public static double[] clone(final double[] array) {
         if (array == null) {
             return null;
         }
@@ -428,7 +428,7 @@ public class ArrayUtils {
      * @param array  the array to clone, may be {@code null}
      * @return the cloned array, {@code null} if {@code null} input
      */
-    public static float[] clone(float[] array) {
+    public static float[] clone(final float[] array) {
         if (array == null) {
             return null;
         }
@@ -444,7 +444,7 @@ public class ArrayUtils {
      * @param array  the array to clone, may be {@code null}
      * @return the cloned array, {@code null} if {@code null} input
      */
-    public static boolean[] clone(boolean[] array) {
+    public static boolean[] clone(final boolean[] array) {
         if (array == null) {
             return null;
         }
@@ -466,7 +466,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static Object[] nullToEmpty(Object[] array) {
+    public static Object[] nullToEmpty(final Object[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_OBJECT_ARRAY;
         }
@@ -486,7 +486,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static String[] nullToEmpty(String[] array) {
+    public static String[] nullToEmpty(final String[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_STRING_ARRAY;
         }
@@ -506,7 +506,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static long[] nullToEmpty(long[] array) {
+    public static long[] nullToEmpty(final long[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_LONG_ARRAY;
         }
@@ -526,7 +526,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static int[] nullToEmpty(int[] array) {
+    public static int[] nullToEmpty(final int[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_INT_ARRAY;
         }
@@ -546,7 +546,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static short[] nullToEmpty(short[] array) {
+    public static short[] nullToEmpty(final short[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_SHORT_ARRAY;
         }
@@ -566,7 +566,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static char[] nullToEmpty(char[] array) {
+    public static char[] nullToEmpty(final char[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_CHAR_ARRAY;
         }
@@ -586,7 +586,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static byte[] nullToEmpty(byte[] array) {
+    public static byte[] nullToEmpty(final byte[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_BYTE_ARRAY;
         }
@@ -606,7 +606,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static double[] nullToEmpty(double[] array) {
+    public static double[] nullToEmpty(final double[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_DOUBLE_ARRAY;
         }
@@ -626,7 +626,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static float[] nullToEmpty(float[] array) {
+    public static float[] nullToEmpty(final float[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_FLOAT_ARRAY;
         }
@@ -646,7 +646,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static boolean[] nullToEmpty(boolean[] array) {
+    public static boolean[] nullToEmpty(final boolean[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_BOOLEAN_ARRAY;
         }
@@ -666,7 +666,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static Long[] nullToEmpty(Long[] array) {
+    public static Long[] nullToEmpty(final Long[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_LONG_OBJECT_ARRAY;
         }
@@ -686,7 +686,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static Integer[] nullToEmpty(Integer[] array) {
+    public static Integer[] nullToEmpty(final Integer[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_INTEGER_OBJECT_ARRAY;
         }
@@ -706,7 +706,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static Short[] nullToEmpty(Short[] array) {
+    public static Short[] nullToEmpty(final Short[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_SHORT_OBJECT_ARRAY;
         }
@@ -726,7 +726,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static Character[] nullToEmpty(Character[] array) {
+    public static Character[] nullToEmpty(final Character[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_CHARACTER_OBJECT_ARRAY;
         }
@@ -746,7 +746,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static Byte[] nullToEmpty(Byte[] array) {
+    public static Byte[] nullToEmpty(final Byte[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_BYTE_OBJECT_ARRAY;
         }
@@ -766,7 +766,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static Double[] nullToEmpty(Double[] array) {
+    public static Double[] nullToEmpty(final Double[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_DOUBLE_OBJECT_ARRAY;
         }
@@ -786,7 +786,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static Float[] nullToEmpty(Float[] array) {
+    public static Float[] nullToEmpty(final Float[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_FLOAT_OBJECT_ARRAY;
         }
@@ -806,7 +806,7 @@ public class ArrayUtils {
      * @return the same array, {@code public static} empty array if {@code null} or empty input
      * @since 2.5
      */
-    public static Boolean[] nullToEmpty(Boolean[] array) {
+    public static Boolean[] nullToEmpty(final Boolean[] array) {
         if (array == null || array.length == 0) {
             return EMPTY_BOOLEAN_OBJECT_ARRAY;
         }
@@ -843,7 +843,7 @@ public class ArrayUtils {
      *      the start and end indices.
      * @since 2.1
      */
-    public static <T> T[] subarray(T[] array, int startIndexInclusive, int endIndexExclusive) {
+    public static <T> T[] subarray(final T[] array, int startIndexInclusive, int endIndexExclusive) {
         if (array == null) {
             return null;
         }
@@ -885,7 +885,7 @@ public class ArrayUtils {
      *      the start and end indices.
      * @since 2.1
      */
-    public static long[] subarray(long[] array, int startIndexInclusive, int endIndexExclusive) {
+    public static long[] subarray(final long[] array, int startIndexInclusive, int endIndexExclusive) {
         if (array == null) {
             return null;
         }
@@ -924,7 +924,7 @@ public class ArrayUtils {
      *      the start and end indices.
      * @since 2.1
      */
-    public static int[] subarray(int[] array, int startIndexInclusive, int endIndexExclusive) {
+    public static int[] subarray(final int[] array, int startIndexInclusive, int endIndexExclusive) {
         if (array == null) {
             return null;
         }
@@ -963,7 +963,7 @@ public class ArrayUtils {
      *      the start and end indices.
      * @since 2.1
      */
-    public static short[] subarray(short[] array, int startIndexInclusive, int endIndexExclusive) {
+    public static short[] subarray(final short[] array, int startIndexInclusive, int endIndexExclusive) {
         if (array == null) {
             return null;
         }
@@ -1002,7 +1002,7 @@ public class ArrayUtils {
      *      the start and end indices.
      * @since 2.1
      */
-    public static char[] subarray(char[] array, int startIndexInclusive, int endIndexExclusive) {
+    public static char[] subarray(final char[] array, int startIndexInclusive, int endIndexExclusive) {
         if (array == null) {
             return null;
         }
@@ -1041,7 +1041,7 @@ public class ArrayUtils {
      *      the start and end indices.
      * @since 2.1
      */
-    public static byte[] subarray(byte[] array, int startIndexInclusive, int endIndexExclusive) {
+    public static byte[] subarray(final byte[] array, int startIndexInclusive, int endIndexExclusive) {
         if (array == null) {
             return null;
         }
@@ -1080,7 +1080,7 @@ public class ArrayUtils {
      *      the start and end indices.
      * @since 2.1
      */
-    public static double[] subarray(double[] array, int startIndexInclusive, int endIndexExclusive) {
+    public static double[] subarray(final double[] array, int startIndexInclusive, int endIndexExclusive) {
         if (array == null) {
             return null;
         }
@@ -1119,7 +1119,7 @@ public class ArrayUtils {
      *      the start and end indices.
      * @since 2.1
      */
-    public static float[] subarray(float[] array, int startIndexInclusive, int endIndexExclusive) {
+    public static float[] subarray(final float[] array, int startIndexInclusive, int endIndexExclusive) {
         if (array == null) {
             return null;
         }
@@ -1158,7 +1158,7 @@ public class ArrayUtils {
      *      the start and end indices.
      * @since 2.1
      */
-    public static boolean[] subarray(boolean[] array, int startIndexInclusive, int endIndexExclusive) {
+    public static boolean[] subarray(final boolean[] array, int startIndexInclusive, int endIndexExclusive) {
         if (array == null) {
             return null;
         }
@@ -1191,7 +1191,7 @@ public class ArrayUtils {
      * @return {@code true} if length of arrays matches, treating
      *  {@code null} as an empty array
      */
-    public static boolean isSameLength(Object[] array1, Object[] array2) {
+    public static boolean isSameLength(final Object[] array1, final Object[] array2) {
         if ((array1 == null && array2 != null && array2.length > 0) ||
             (array2 == null && array1 != null && array1.length > 0) ||
             (array1 != null && array2 != null && array1.length != array2.length)) {
@@ -1209,7 +1209,7 @@ public class ArrayUtils {
      * @return {@code true} if length of arrays matches, treating
      *  {@code null} as an empty array
      */
-    public static boolean isSameLength(long[] array1, long[] array2) {
+    public static boolean isSameLength(final long[] array1, final long[] array2) {
         if ((array1 == null && array2 != null && array2.length > 0) ||
             (array2 == null && array1 != null && array1.length > 0) ||
             (array1 != null && array2 != null && array1.length != array2.length)) {
@@ -1227,7 +1227,7 @@ public class ArrayUtils {
      * @return {@code true} if length of arrays matches, treating
      *  {@code null} as an empty array
      */
-    public static boolean isSameLength(int[] array1, int[] array2) {
+    public static boolean isSameLength(final int[] array1, final int[] array2) {
         if ((array1 == null && array2 != null && array2.length > 0) ||
             (array2 == null && array1 != null && array1.length > 0) ||
             (array1 != null && array2 != null && array1.length != array2.length)) {
@@ -1245,7 +1245,7 @@ public class ArrayUtils {
      * @return {@code true} if length of arrays matches, treating
      *  {@code null} as an empty array
      */
-    public static boolean isSameLength(short[] array1, short[] array2) {
+    public static boolean isSameLength(final short[] array1, final short[] array2) {
         if ((array1 == null && array2 != null && array2.length > 0) ||
             (array2 == null && array1 != null && array1.length > 0) ||
             (array1 != null && array2 != null && array1.length != array2.length)) {
@@ -1263,7 +1263,7 @@ public class ArrayUtils {
      * @return {@code true} if length of arrays matches, treating
      *  {@code null} as an empty array
      */
-    public static boolean isSameLength(char[] array1, char[] array2) {
+    public static boolean isSameLength(final char[] array1, final char[] array2) {
         if ((array1 == null && array2 != null && array2.length > 0) ||
             (array2 == null && array1 != null && array1.length > 0) ||
             (array1 != null && array2 != null && array1.length != array2.length)) {
@@ -1281,7 +1281,7 @@ public class ArrayUtils {
      * @return {@code true} if length of arrays matches, treating
      *  {@code null} as an empty array
      */
-    public static boolean isSameLength(byte[] array1, byte[] array2) {
+    public static boolean isSameLength(final byte[] array1, final byte[] array2) {
         if ((array1 == null && array2 != null && array2.length > 0) ||
             (array2 == null && array1 != null && array1.length > 0) ||
             (array1 != null && array2 != null && array1.length != array2.length)) {
@@ -1299,7 +1299,7 @@ public class ArrayUtils {
      * @return {@code true} if length of arrays matches, treating
      *  {@code null} as an empty array
      */
-    public static boolean isSameLength(double[] array1, double[] array2) {
+    public static boolean isSameLength(final double[] array1, final double[] array2) {
         if ((array1 == null && array2 != null && array2.length > 0) ||
             (array2 == null && array1 != null && array1.length > 0) ||
             (array1 != null && array2 != null && array1.length != array2.length)) {
@@ -1317,7 +1317,7 @@ public class ArrayUtils {
      * @return {@code true} if length of arrays matches, treating
      *  {@code null} as an empty array
      */
-    public static boolean isSameLength(float[] array1, float[] array2) {
+    public static boolean isSameLength(final float[] array1, final float[] array2) {
         if ((array1 == null && array2 != null && array2.length > 0) ||
             (array2 == null && array1 != null && array1.length > 0) ||
             (array1 != null && array2 != null && array1.length != array2.length)) {
@@ -1335,7 +1335,7 @@ public class ArrayUtils {
      * @return {@code true} if length of arrays matches, treating
      *  {@code null} as an empty array
      */
-    public static boolean isSameLength(boolean[] array1, boolean[] array2) {
+    public static boolean isSameLength(final boolean[] array1, final boolean[] array2) {
         if ((array1 == null && array2 != null && array2.length > 0) ||
             (array2 == null && array1 != null && array1.length > 0) ||
             (array1 != null && array2 != null && array1.length != array2.length)) {
@@ -1365,7 +1365,7 @@ public class ArrayUtils {
      * @throws IllegalArgumentException if the object argument is not an array.
      * @since 2.1
      */
-    public static int getLength(Object array) {
+    public static int getLength(final Object array) {
         if (array == null) {
             return 0;
         }
@@ -1381,7 +1381,7 @@ public class ArrayUtils {
      * @return {@code true} if type of arrays matches
      * @throws IllegalArgumentException if either array is {@code null}
      */
-    public static boolean isSameType(Object array1, Object array2) {
+    public static boolean isSameType(final Object array1, final Object array2) {
         if (array1 == null || array2 == null) {
             throw new IllegalArgumentException("The Array must not be null");
         }
@@ -1399,7 +1399,7 @@ public class ArrayUtils {
      *
      * @param array  the array to reverse, may be {@code null}
      */
-    public static void reverse(Object[] array) {
+    public static void reverse(final Object[] array) {
         if (array == null) {
             return;
         }
@@ -1422,7 +1422,7 @@ public class ArrayUtils {
      *
      * @param array  the array to reverse, may be {@code null}
      */
-    public static void reverse(long[] array) {
+    public static void reverse(final long[] array) {
         if (array == null) {
             return;
         }
@@ -1445,7 +1445,7 @@ public class ArrayUtils {
      *
      * @param array  the array to reverse, may be {@code null}
      */
-    public static void reverse(int[] array) {
+    public static void reverse(final int[] array) {
         if (array == null) {
             return;
         }
@@ -1468,7 +1468,7 @@ public class ArrayUtils {
      *
      * @param array  the array to reverse, may be {@code null}
      */
-    public static void reverse(short[] array) {
+    public static void reverse(final short[] array) {
         if (array == null) {
             return;
         }
@@ -1491,7 +1491,7 @@ public class ArrayUtils {
      *
      * @param array  the array to reverse, may be {@code null}
      */
-    public static void reverse(char[] array) {
+    public static void reverse(final char[] array) {
         if (array == null) {
             return;
         }
@@ -1514,7 +1514,7 @@ public class ArrayUtils {
      *
      * @param array  the array to reverse, may be {@code null}
      */
-    public static void reverse(byte[] array) {
+    public static void reverse(final byte[] array) {
         if (array == null) {
             return;
         }
@@ -1537,7 +1537,7 @@ public class ArrayUtils {
      *
      * @param array  the array to reverse, may be {@code null}
      */
-    public static void reverse(double[] array) {
+    public static void reverse(final double[] array) {
         if (array == null) {
             return;
         }
@@ -1560,7 +1560,7 @@ public class ArrayUtils {
      *
      * @param array  the array to reverse, may be {@code null}
      */
-    public static void reverse(float[] array) {
+    public static void reverse(final float[] array) {
         if (array == null) {
             return;
         }
@@ -1583,7 +1583,7 @@ public class ArrayUtils {
      *
      * @param array  the array to reverse, may be {@code null}
      */
-    public static void reverse(boolean[] array) {
+    public static void reverse(final boolean[] array) {
         if (array == null) {
             return;
         }
@@ -1614,7 +1614,7 @@ public class ArrayUtils {
      * @return the index of the object within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(Object[] array, Object objectToFind) {
+    public static int indexOf(final Object[] array, final Object objectToFind) {
         return indexOf(array, objectToFind, 0);
     }
 
@@ -1632,7 +1632,7 @@ public class ArrayUtils {
      * @return the index of the object within the array starting at the index,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(Object[] array, Object objectToFind, int startIndex) {
+    public static int indexOf(final Object[] array, final Object objectToFind, int startIndex) {
         if (array == null) {
             return INDEX_NOT_FOUND;
         }
@@ -1665,7 +1665,7 @@ public class ArrayUtils {
      * @return the last index of the object within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(Object[] array, Object objectToFind) {
+    public static int lastIndexOf(final Object[] array, final Object objectToFind) {
         return lastIndexOf(array, objectToFind, Integer.MAX_VALUE);
     }
 
@@ -1683,7 +1683,7 @@ public class ArrayUtils {
      * @return the last index of the object within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(Object[] array, Object objectToFind, int startIndex) {
+    public static int lastIndexOf(final Object[] array, final Object objectToFind, int startIndex) {
         if (array == null) {
             return INDEX_NOT_FOUND;
         }
@@ -1717,7 +1717,7 @@ public class ArrayUtils {
      * @param objectToFind  the object to find
      * @return {@code true} if the array contains the object
      */
-    public static boolean contains(Object[] array, Object objectToFind) {
+    public static boolean contains(final Object[] array, final Object objectToFind) {
         return indexOf(array, objectToFind) != INDEX_NOT_FOUND;
     }
 
@@ -1733,7 +1733,7 @@ public class ArrayUtils {
      * @return the index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(long[] array, long valueToFind) {
+    public static int indexOf(final long[] array, final long valueToFind) {
         return indexOf(array, valueToFind, 0);
     }
 
@@ -1751,7 +1751,7 @@ public class ArrayUtils {
      * @return the index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(long[] array, long valueToFind, int startIndex) {
+    public static int indexOf(final long[] array, final long valueToFind, int startIndex) {
         if (array == null) {
             return INDEX_NOT_FOUND;
         }
@@ -1776,7 +1776,7 @@ public class ArrayUtils {
      * @return the last index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(long[] array, long valueToFind) {
+    public static int lastIndexOf(final long[] array, final long valueToFind) {
         return lastIndexOf(array, valueToFind, Integer.MAX_VALUE);
     }
 
@@ -1794,7 +1794,7 @@ public class ArrayUtils {
      * @return the last index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(long[] array, long valueToFind, int startIndex) {
+    public static int lastIndexOf(final long[] array, final long valueToFind, int startIndex) {
         if (array == null) {
             return INDEX_NOT_FOUND;
         }
@@ -1820,7 +1820,7 @@ public class ArrayUtils {
      * @param valueToFind  the value to find
      * @return {@code true} if the array contains the object
      */
-    public static boolean contains(long[] array, long valueToFind) {
+    public static boolean contains(final long[] array, final long valueToFind) {
         return indexOf(array, valueToFind) != INDEX_NOT_FOUND;
     }
 
@@ -1836,7 +1836,7 @@ public class ArrayUtils {
      * @return the index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(int[] array, int valueToFind) {
+    public static int indexOf(final int[] array, final int valueToFind) {
         return indexOf(array, valueToFind, 0);
     }
 
@@ -1854,7 +1854,7 @@ public class ArrayUtils {
      * @return the index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(int[] array, int valueToFind, int startIndex) {
+    public static int indexOf(final int[] array, final int valueToFind, int startIndex) {
         if (array == null) {
             return INDEX_NOT_FOUND;
         }
@@ -1879,7 +1879,7 @@ public class ArrayUtils {
      * @return the last index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(int[] array, int valueToFind) {
+    public static int lastIndexOf(final int[] array, final int valueToFind) {
         return lastIndexOf(array, valueToFind, Integer.MAX_VALUE);
     }
 
@@ -1897,7 +1897,7 @@ public class ArrayUtils {
      * @return the last index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(int[] array, int valueToFind, int startIndex) {
+    public static int lastIndexOf(final int[] array, final int valueToFind, int startIndex) {
         if (array == null) {
             return INDEX_NOT_FOUND;
         }
@@ -1923,7 +1923,7 @@ public class ArrayUtils {
      * @param valueToFind  the value to find
      * @return {@code true} if the array contains the object
      */
-    public static boolean contains(int[] array, int valueToFind) {
+    public static boolean contains(final int[] array, final int valueToFind) {
         return indexOf(array, valueToFind) != INDEX_NOT_FOUND;
     }
 
@@ -1939,7 +1939,7 @@ public class ArrayUtils {
      * @return the index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(short[] array, short valueToFind) {
+    public static int indexOf(final short[] array, final short valueToFind) {
         return indexOf(array, valueToFind, 0);
     }
 
@@ -1957,7 +1957,7 @@ public class ArrayUtils {
      * @return the index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(short[] array, short valueToFind, int startIndex) {
+    public static int indexOf(final short[] array, final short valueToFind, int startIndex) {
         if (array == null) {
             return INDEX_NOT_FOUND;
         }
@@ -1982,7 +1982,7 @@ public class ArrayUtils {
      * @return the last index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(short[] array, short valueToFind) {
+    public static int lastIndexOf(final short[] array, final short valueToFind) {
         return lastIndexOf(array, valueToFind, Integer.MAX_VALUE);
     }
 
@@ -2000,7 +2000,7 @@ public class ArrayUtils {
      * @return the last index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(short[] array, short valueToFind, int startIndex) {
+    public static int lastIndexOf(final short[] array, final short valueToFind, int startIndex) {
         if (array == null) {
             return INDEX_NOT_FOUND;
         }
@@ -2026,7 +2026,7 @@ public class ArrayUtils {
      * @param valueToFind  the value to find
      * @return {@code true} if the array contains the object
      */
-    public static boolean contains(short[] array, short valueToFind) {
+    public static boolean contains(final short[] array, final short valueToFind) {
         return indexOf(array, valueToFind) != INDEX_NOT_FOUND;
     }
 
@@ -2043,7 +2043,7 @@ public class ArrayUtils {
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      * @since 2.1
      */
-    public static int indexOf(char[] array, char valueToFind) {
+    public static int indexOf(final char[] array, final char valueToFind) {
         return indexOf(array, valueToFind, 0);
     }
 
@@ -2062,7 +2062,7 @@ public class ArrayUtils {
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      * @since 2.1
      */
-    public static int indexOf(char[] array, char valueToFind, int startIndex) {
+    public static int indexOf(final char[] array, final char valueToFind, int startIndex) {
         if (array == null) {
             return INDEX_NOT_FOUND;
         }
@@ -2088,7 +2088,7 @@ public class ArrayUtils {
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      * @since 2.1
      */
-    public static int lastIndexOf(char[] array, char valueToFind) {
+    public static int lastIndexOf(final char[] array, final char valueToFind) {
         return lastIndexOf(array, valueToFind, Integer.MAX_VALUE);
     }
 
@@ -2107,7 +2107,7 @@ public class ArrayUtils {
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      * @since 2.1
      */
-    public static int lastIndexOf(char[] array, char valueToFind, int startIndex) {
+    public static int lastIndexOf(final char[] array, final char valueToFind, int startIndex) {
         if (array == null) {
             return INDEX_NOT_FOUND;
         }
@@ -2134,7 +2134,7 @@ public class ArrayUtils {
      * @return {@code true} if the array contains the object
      * @since 2.1
      */
-    public static boolean contains(char[] array, char valueToFind) {
+    public static boolean contains(final char[] array, final char valueToFind) {
         return indexOf(array, valueToFind) != INDEX_NOT_FOUND;
     }
 
@@ -2150,7 +2150,7 @@ public class ArrayUtils {
      * @return the index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(byte[] array, byte valueToFind) {
+    public static int indexOf(final byte[] array, final byte valueToFind) {
         return indexOf(array, valueToFind, 0);
     }
 
@@ -2168,7 +2168,7 @@ public class ArrayUtils {
      * @return the index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(byte[] array, byte valueToFind, int startIndex) {
+    public static int indexOf(final byte[] array, final byte valueToFind, int startIndex) {
         if (array == null) {
             return INDEX_NOT_FOUND;
         }
@@ -2193,7 +2193,7 @@ public class ArrayUtils {
      * @return the last index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(byte[] array, byte valueToFind) {
+    public static int lastIndexOf(final byte[] array, final byte valueToFind) {
         return lastIndexOf(array, valueToFind, Integer.MAX_VALUE);
     }
 
@@ -2211,7 +2211,7 @@ public class ArrayUtils {
      * @return the last index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(byte[] array, byte valueToFind, int startIndex) {
+    public static int lastIndexOf(final byte[] array, final byte valueToFind, int startIndex) {
         if (array == null) {
             return INDEX_NOT_FOUND;
         }
@@ -2237,7 +2237,7 @@ public class ArrayUtils {
      * @param valueToFind  the value to find
      * @return {@code true} if the array contains the object
      */
-    public static boolean contains(byte[] array, byte valueToFind) {
+    public static boolean contains(final byte[] array, final byte valueToFind) {
         return indexOf(array, valueToFind) != INDEX_NOT_FOUND;
     }
 
@@ -2253,7 +2253,7 @@ public class ArrayUtils {
      * @return the index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(double[] array, double valueToFind) {
+    public static int indexOf(final double[] array, final double valueToFind) {
         return indexOf(array, valueToFind, 0);
     }
 
@@ -2270,7 +2270,7 @@ public class ArrayUtils {
      * @return the index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(double[] array, double valueToFind, double tolerance) {
+    public static int indexOf(final double[] array, final double valueToFind, final double tolerance) {
         return indexOf(array, valueToFind, 0, tolerance);
     }
 
@@ -2288,7 +2288,7 @@ public class ArrayUtils {
      * @return the index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(double[] array, double valueToFind, int startIndex) {
+    public static int indexOf(final double[] array, final double valueToFind, int startIndex) {
         if (ArrayUtils.isEmpty(array)) {
             return INDEX_NOT_FOUND;
         }
@@ -2320,7 +2320,7 @@ public class ArrayUtils {
      * @return the index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(double[] array, double valueToFind, int startIndex, double tolerance) {
+    public static int indexOf(final double[] array, final double valueToFind, int startIndex, final double tolerance) {
         if (ArrayUtils.isEmpty(array)) {
             return INDEX_NOT_FOUND;
         }
@@ -2347,7 +2347,7 @@ public class ArrayUtils {
      * @return the last index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(double[] array, double valueToFind) {
+    public static int lastIndexOf(final double[] array, final double valueToFind) {
         return lastIndexOf(array, valueToFind, Integer.MAX_VALUE);
     }
 
@@ -2364,7 +2364,7 @@ public class ArrayUtils {
      * @return the index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(double[] array, double valueToFind, double tolerance) {
+    public static int lastIndexOf(final double[] array, final double valueToFind, final double tolerance) {
         return lastIndexOf(array, valueToFind, Integer.MAX_VALUE, tolerance);
     }
 
@@ -2382,7 +2382,7 @@ public class ArrayUtils {
      * @return the last index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(double[] array, double valueToFind, int startIndex) {
+    public static int lastIndexOf(final double[] array, final double valueToFind, int startIndex) {
         if (ArrayUtils.isEmpty(array)) {
             return INDEX_NOT_FOUND;
         }
@@ -2416,7 +2416,7 @@ public class ArrayUtils {
      * @return the last index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(double[] array, double valueToFind, int startIndex, double tolerance) {
+    public static int lastIndexOf(final double[] array, final double valueToFind, int startIndex, final double tolerance) {
         if (ArrayUtils.isEmpty(array)) {
             return INDEX_NOT_FOUND;
         }
@@ -2444,7 +2444,7 @@ public class ArrayUtils {
      * @param valueToFind  the value to find
      * @return {@code true} if the array contains the object
      */
-    public static boolean contains(double[] array, double valueToFind) {
+    public static boolean contains(final double[] array, final double valueToFind) {
         return indexOf(array, valueToFind) != INDEX_NOT_FOUND;
     }
 
@@ -2461,7 +2461,7 @@ public class ArrayUtils {
      * @param tolerance  the array contains the tolerance of the search
      * @return true if value falling within tolerance is in array
      */
-    public static boolean contains(double[] array, double valueToFind, double tolerance) {
+    public static boolean contains(final double[] array, final double valueToFind, final double tolerance) {
         return indexOf(array, valueToFind, 0, tolerance) != INDEX_NOT_FOUND;
     }
 
@@ -2477,7 +2477,7 @@ public class ArrayUtils {
      * @return the index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(float[] array, float valueToFind) {
+    public static int indexOf(final float[] array, final float valueToFind) {
         return indexOf(array, valueToFind, 0);
     }
 
@@ -2495,7 +2495,7 @@ public class ArrayUtils {
      * @return the index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(float[] array, float valueToFind, int startIndex) {
+    public static int indexOf(final float[] array, final float valueToFind, int startIndex) {
         if (ArrayUtils.isEmpty(array)) {
             return INDEX_NOT_FOUND;
         }
@@ -2520,7 +2520,7 @@ public class ArrayUtils {
      * @return the last index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(float[] array, float valueToFind) {
+    public static int lastIndexOf(final float[] array, final float valueToFind) {
         return lastIndexOf(array, valueToFind, Integer.MAX_VALUE);
     }
 
@@ -2538,7 +2538,7 @@ public class ArrayUtils {
      * @return the last index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(float[] array, float valueToFind, int startIndex) {
+    public static int lastIndexOf(final float[] array, final float valueToFind, int startIndex) {
         if (ArrayUtils.isEmpty(array)) {
             return INDEX_NOT_FOUND;
         }
@@ -2564,7 +2564,7 @@ public class ArrayUtils {
      * @param valueToFind  the value to find
      * @return {@code true} if the array contains the object
      */
-    public static boolean contains(float[] array, float valueToFind) {
+    public static boolean contains(final float[] array, final float valueToFind) {
         return indexOf(array, valueToFind) != INDEX_NOT_FOUND;
     }
 
@@ -2580,7 +2580,7 @@ public class ArrayUtils {
      * @return the index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int indexOf(boolean[] array, boolean valueToFind) {
+    public static int indexOf(final boolean[] array, final boolean valueToFind) {
         return indexOf(array, valueToFind, 0);
     }
 
@@ -2599,7 +2599,7 @@ public class ArrayUtils {
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null}
      *  array input
      */
-    public static int indexOf(boolean[] array, boolean valueToFind, int startIndex) {
+    public static int indexOf(final boolean[] array, final boolean valueToFind, int startIndex) {
         if (ArrayUtils.isEmpty(array)) {
             return INDEX_NOT_FOUND;
         }
@@ -2625,7 +2625,7 @@ public class ArrayUtils {
      * @return the last index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(boolean[] array, boolean valueToFind) {
+    public static int lastIndexOf(final boolean[] array, final boolean valueToFind) {
         return lastIndexOf(array, valueToFind, Integer.MAX_VALUE);
     }
 
@@ -2643,7 +2643,7 @@ public class ArrayUtils {
      * @return the last index of the value within the array,
      *  {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
      */
-    public static int lastIndexOf(boolean[] array, boolean valueToFind, int startIndex) {
+    public static int lastIndexOf(final boolean[] array, final boolean valueToFind, int startIndex) {
         if (ArrayUtils.isEmpty(array)) {
             return INDEX_NOT_FOUND;
         }
@@ -2669,7 +2669,7 @@ public class ArrayUtils {
      * @param valueToFind  the value to find
      * @return {@code true} if the array contains the object
      */
-    public static boolean contains(boolean[] array, boolean valueToFind) {
+    public static boolean contains(final boolean[] array, final boolean valueToFind) {
         return indexOf(array, valueToFind) != INDEX_NOT_FOUND;
     }
 
@@ -2687,7 +2687,7 @@ public class ArrayUtils {
      * @return a {@code char} array, {@code null} if null array input
      * @throws NullPointerException if array content is {@code null}
      */
-    public static char[] toPrimitive(Character[] array) {
+    public static char[] toPrimitive(final Character[] array) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -2709,7 +2709,7 @@ public class ArrayUtils {
      * @param valueForNull  the value to insert if {@code null} found
      * @return a {@code char} array, {@code null} if null array input
      */
-    public static char[] toPrimitive(Character[] array, char valueForNull) {
+    public static char[] toPrimitive(final Character[] array, final char valueForNull) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -2731,7 +2731,7 @@ public class ArrayUtils {
      * @param array a {@code char} array
      * @return a {@code Character} array, {@code null} if null array input
      */
-    public static Character[] toObject(char[] array) {
+    public static Character[] toObject(final char[] array) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -2755,7 +2755,7 @@ public class ArrayUtils {
      * @return a {@code long} array, {@code null} if null array input
      * @throws NullPointerException if array content is {@code null}
      */
-    public static long[] toPrimitive(Long[] array) {
+    public static long[] toPrimitive(final Long[] array) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -2777,7 +2777,7 @@ public class ArrayUtils {
      * @param valueForNull  the value to insert if {@code null} found
      * @return a {@code long} array, {@code null} if null array input
      */
-    public static long[] toPrimitive(Long[] array, long valueForNull) {
+    public static long[] toPrimitive(final Long[] array, final long valueForNull) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -2799,7 +2799,7 @@ public class ArrayUtils {
      * @param array  a {@code long} array
      * @return a {@code Long} array, {@code null} if null array input
      */
-    public static Long[] toObject(long[] array) {
+    public static Long[] toObject(final long[] array) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -2823,7 +2823,7 @@ public class ArrayUtils {
      * @return an {@code int} array, {@code null} if null array input
      * @throws NullPointerException if array content is {@code null}
      */
-    public static int[] toPrimitive(Integer[] array) {
+    public static int[] toPrimitive(final Integer[] array) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -2845,7 +2845,7 @@ public class ArrayUtils {
      * @param valueForNull  the value to insert if {@code null} found
      * @return an {@code int} array, {@code null} if null array input
      */
-    public static int[] toPrimitive(Integer[] array, int valueForNull) {
+    public static int[] toPrimitive(final Integer[] array, final int valueForNull) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -2867,7 +2867,7 @@ public class ArrayUtils {
      * @param array  an {@code int} array
      * @return an {@code Integer} array, {@code null} if null array input
      */
-    public static Integer[] toObject(int[] array) {
+    public static Integer[] toObject(final int[] array) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -2891,7 +2891,7 @@ public class ArrayUtils {
      * @return a {@code byte} array, {@code null} if null array input
      * @throws NullPointerException if array content is {@code null}
      */
-    public static short[] toPrimitive(Short[] array) {
+    public static short[] toPrimitive(final Short[] array) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -2913,7 +2913,7 @@ public class ArrayUtils {
      * @param valueForNull  the value to insert if {@code null} found
      * @return a {@code byte} array, {@code null} if null array input
      */
-    public static short[] toPrimitive(Short[] array, short valueForNull) {
+    public static short[] toPrimitive(final Short[] array, final short valueForNull) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -2935,7 +2935,7 @@ public class ArrayUtils {
      * @param array  a {@code short} array
      * @return a {@code Short} array, {@code null} if null array input
      */
-    public static Short[] toObject(short[] array) {
+    public static Short[] toObject(final short[] array) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -2959,7 +2959,7 @@ public class ArrayUtils {
      * @return a {@code byte} array, {@code null} if null array input
      * @throws NullPointerException if array content is {@code null}
      */
-    public static byte[] toPrimitive(Byte[] array) {
+    public static byte[] toPrimitive(final Byte[] array) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -2981,7 +2981,7 @@ public class ArrayUtils {
      * @param valueForNull  the value to insert if {@code null} found
      * @return a {@code byte} array, {@code null} if null array input
      */
-    public static byte[] toPrimitive(Byte[] array, byte valueForNull) {
+    public static byte[] toPrimitive(final Byte[] array, final byte valueForNull) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -3003,7 +3003,7 @@ public class ArrayUtils {
      * @param array  a {@code byte} array
      * @return a {@code Byte} array, {@code null} if null array input
      */
-    public static Byte[] toObject(byte[] array) {
+    public static Byte[] toObject(final byte[] array) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -3027,7 +3027,7 @@ public class ArrayUtils {
      * @return a {@code double} array, {@code null} if null array input
      * @throws NullPointerException if array content is {@code null}
      */
-    public static double[] toPrimitive(Double[] array) {
+    public static double[] toPrimitive(final Double[] array) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -3049,7 +3049,7 @@ public class ArrayUtils {
      * @param valueForNull  the value to insert if {@code null} found
      * @return a {@code double} array, {@code null} if null array input
      */
-    public static double[] toPrimitive(Double[] array, double valueForNull) {
+    public static double[] toPrimitive(final Double[] array, final double valueForNull) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -3071,7 +3071,7 @@ public class ArrayUtils {
      * @param array  a {@code double} array
      * @return a {@code Double} array, {@code null} if null array input
      */
-    public static Double[] toObject(double[] array) {
+    public static Double[] toObject(final double[] array) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -3095,7 +3095,7 @@ public class ArrayUtils {
      * @return a {@code float} array, {@code null} if null array input
      * @throws NullPointerException if array content is {@code null}
      */
-    public static float[] toPrimitive(Float[] array) {
+    public static float[] toPrimitive(final Float[] array) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -3117,7 +3117,7 @@ public class ArrayUtils {
      * @param valueForNull  the value to insert if {@code null} found
      * @return a {@code float} array, {@code null} if null array input
      */
-    public static float[] toPrimitive(Float[] array, float valueForNull) {
+    public static float[] toPrimitive(final Float[] array, final float valueForNull) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -3139,7 +3139,7 @@ public class ArrayUtils {
      * @param array  a {@code float} array
      * @return a {@code Float} array, {@code null} if null array input
      */
-    public static Float[] toObject(float[] array) {
+    public static Float[] toObject(final float[] array) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -3163,7 +3163,7 @@ public class ArrayUtils {
      * @return a {@code boolean} array, {@code null} if null array input
      * @throws NullPointerException if array content is {@code null}
      */
-    public static boolean[] toPrimitive(Boolean[] array) {
+    public static boolean[] toPrimitive(final Boolean[] array) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -3185,7 +3185,7 @@ public class ArrayUtils {
      * @param valueForNull  the value to insert if {@code null} found
      * @return a {@code boolean} array, {@code null} if null array input
      */
-    public static boolean[] toPrimitive(Boolean[] array, boolean valueForNull) {
+    public static boolean[] toPrimitive(final Boolean[] array, final boolean valueForNull) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -3207,7 +3207,7 @@ public class ArrayUtils {
      * @param array  a {@code boolean} array
      * @return a {@code Boolean} array, {@code null} if null array input
      */
-    public static Boolean[] toObject(boolean[] array) {
+    public static Boolean[] toObject(final boolean[] array) {
         if (array == null) {
             return null;
         } else if (array.length == 0) {
@@ -3228,7 +3228,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is empty or {@code null}
      * @since 2.1
      */
-    public static boolean isEmpty(Object[] array) {
+    public static boolean isEmpty(final Object[] array) {
         return array == null || array.length == 0;
     }
 
@@ -3239,7 +3239,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is empty or {@code null}
      * @since 2.1
      */
-    public static boolean isEmpty(long[] array) {
+    public static boolean isEmpty(final long[] array) {
         return array == null || array.length == 0;
     }
 
@@ -3250,7 +3250,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is empty or {@code null}
      * @since 2.1
      */
-    public static boolean isEmpty(int[] array) {
+    public static boolean isEmpty(final int[] array) {
         return array == null || array.length == 0;
     }
 
@@ -3261,7 +3261,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is empty or {@code null}
      * @since 2.1
      */
-    public static boolean isEmpty(short[] array) {
+    public static boolean isEmpty(final short[] array) {
         return array == null || array.length == 0;
     }
 
@@ -3272,7 +3272,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is empty or {@code null}
      * @since 2.1
      */
-    public static boolean isEmpty(char[] array) {
+    public static boolean isEmpty(final char[] array) {
         return array == null || array.length == 0;
     }
 
@@ -3283,7 +3283,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is empty or {@code null}
      * @since 2.1
      */
-    public static boolean isEmpty(byte[] array) {
+    public static boolean isEmpty(final byte[] array) {
         return array == null || array.length == 0;
     }
 
@@ -3294,7 +3294,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is empty or {@code null}
      * @since 2.1
      */
-    public static boolean isEmpty(double[] array) {
+    public static boolean isEmpty(final double[] array) {
         return array == null || array.length == 0;
     }
 
@@ -3305,7 +3305,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is empty or {@code null}
      * @since 2.1
      */
-    public static boolean isEmpty(float[] array) {
+    public static boolean isEmpty(final float[] array) {
         return array == null || array.length == 0;
     }
 
@@ -3316,7 +3316,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is empty or {@code null}
      * @since 2.1
      */
-    public static boolean isEmpty(boolean[] array) {
+    public static boolean isEmpty(final boolean[] array) {
         return array == null || array.length == 0;
     }
 
@@ -3329,7 +3329,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is not empty or not {@code null}
      * @since 2.5
      */
-     public static <T> boolean isNotEmpty(T[] array) {
+     public static <T> boolean isNotEmpty(final T[] array) {
          return (array != null && array.length != 0);
      }
 
@@ -3340,7 +3340,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is not empty or not {@code null}
      * @since 2.5
      */
-    public static boolean isNotEmpty(long[] array) {
+    public static boolean isNotEmpty(final long[] array) {
         return (array != null && array.length != 0);
     }
 
@@ -3351,7 +3351,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is not empty or not {@code null}
      * @since 2.5
      */
-    public static boolean isNotEmpty(int[] array) {
+    public static boolean isNotEmpty(final int[] array) {
         return (array != null && array.length != 0);
     }
 
@@ -3362,7 +3362,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is not empty or not {@code null}
      * @since 2.5
      */
-    public static boolean isNotEmpty(short[] array) {
+    public static boolean isNotEmpty(final short[] array) {
         return (array != null && array.length != 0);
     }
 
@@ -3373,7 +3373,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is not empty or not {@code null}
      * @since 2.5
      */
-    public static boolean isNotEmpty(char[] array) {
+    public static boolean isNotEmpty(final char[] array) {
         return (array != null && array.length != 0);
     }
 
@@ -3384,7 +3384,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is not empty or not {@code null}
      * @since 2.5
      */
-    public static boolean isNotEmpty(byte[] array) {
+    public static boolean isNotEmpty(final byte[] array) {
         return (array != null && array.length != 0);
     }
 
@@ -3395,7 +3395,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is not empty or not {@code null}
      * @since 2.5
      */
-    public static boolean isNotEmpty(double[] array) {
+    public static boolean isNotEmpty(final double[] array) {
         return (array != null && array.length != 0);
     }
 
@@ -3406,7 +3406,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is not empty or not {@code null}
      * @since 2.5
      */
-    public static boolean isNotEmpty(float[] array) {
+    public static boolean isNotEmpty(final float[] array) {
         return (array != null && array.length != 0);
     }
 
@@ -3417,7 +3417,7 @@ public class ArrayUtils {
      * @return {@code true} if the array is not empty or not {@code null}
      * @since 2.5
      */
-    public static boolean isNotEmpty(boolean[] array) {
+    public static boolean isNotEmpty(final boolean[] array) {
         return (array != null && array.length != 0);
     }
 
@@ -3445,7 +3445,7 @@ public class ArrayUtils {
      * @since 2.1
      * @throws IllegalArgumentException if the array types are incompatible
      */
-    public static <T> T[] addAll(T[] array1, T... array2) {
+    public static <T> T[] addAll(final T[] array1, final T... array2) {
         if (array1 == null) {
             return clone(array2);
         } else if (array2 == null) {
@@ -3491,7 +3491,7 @@ public class ArrayUtils {
      * @return The new boolean[] array.
      * @since 2.1
      */
-    public static boolean[] addAll(boolean[] array1, boolean... array2) {
+    public static boolean[] addAll(final boolean[] array1, final boolean... array2) {
         if (array1 == null) {
             return clone(array2);
         } else if (array2 == null) {
@@ -3520,7 +3520,7 @@ public class ArrayUtils {
      * @return The new char[] array.
      * @since 2.1
      */
-    public static char[] addAll(char[] array1, char... array2) {
+    public static char[] addAll(final char[] array1, final char... array2) {
         if (array1 == null) {
             return clone(array2);
         } else if (array2 == null) {
@@ -3549,7 +3549,7 @@ public class ArrayUtils {
      * @return The new byte[] array.
      * @since 2.1
      */
-    public static byte[] addAll(byte[] array1, byte... array2) {
+    public static byte[] addAll(final byte[] array1, final byte... array2) {
         if (array1 == null) {
             return clone(array2);
         } else if (array2 == null) {
@@ -3578,7 +3578,7 @@ public class ArrayUtils {
      * @return The new short[] array.
      * @since 2.1
      */
-    public static short[] addAll(short[] array1, short... array2) {
+    public static short[] addAll(final short[] array1, final short... array2) {
         if (array1 == null) {
             return clone(array2);
         } else if (array2 == null) {
@@ -3607,7 +3607,7 @@ public class ArrayUtils {
      * @return The new int[] array.
      * @since 2.1
      */
-    public static int[] addAll(int[] array1, int... array2) {
+    public static int[] addAll(final int[] array1, final int... array2) {
         if (array1 == null) {
             return clone(array2);
         } else if (array2 == null) {
@@ -3636,7 +3636,7 @@ public class ArrayUtils {
      * @return The new long[] array.
      * @since 2.1
      */
-    public static long[] addAll(long[] array1, long... array2) {
+    public static long[] addAll(final long[] array1, final long... array2) {
         if (array1 == null) {
             return clone(array2);
         } else if (array2 == null) {
@@ -3665,7 +3665,7 @@ public class ArrayUtils {
      * @return The new float[] array.
      * @since 2.1
      */
-    public static float[] addAll(float[] array1, float... array2) {
+    public static float[] addAll(final float[] array1, final float... array2) {
         if (array1 == null) {
             return clone(array2);
         } else if (array2 == null) {
@@ -3694,7 +3694,7 @@ public class ArrayUtils {
      * @return The new double[] array.
      * @since 2.1
      */
-    public static double[] addAll(double[] array1, double... array2) {
+    public static double[] addAll(final double[] array1, final double... array2) {
         if (array1 == null) {
             return clone(array2);
         } else if (array2 == null) {
@@ -3735,7 +3735,7 @@ public class ArrayUtils {
      * @since 2.1
      * @throws IllegalArgumentException if both arguments are null
      */
-    public static <T> T[] add(T[] array, T element) {
+    public static <T> T[] add(final T[] array, final T element) {
         Class<?> type;
         if (array != null){
             type = array.getClass();
@@ -3771,7 +3771,7 @@ public class ArrayUtils {
      * @return A new array containing the existing elements plus the new element
      * @since 2.1
      */
-    public static boolean[] add(boolean[] array, boolean element) {
+    public static boolean[] add(final boolean[] array, final boolean element) {
         boolean[] newArray = (boolean[])copyArrayGrow1(array, Boolean.TYPE);
         newArray[newArray.length - 1] = element;
         return newArray;
@@ -3798,7 +3798,7 @@ public class ArrayUtils {
      * @return A new array containing the existing elements plus the new element
      * @since 2.1
      */
-    public static byte[] add(byte[] array, byte element) {
+    public static byte[] add(final byte[] array, final byte element) {
         byte[] newArray = (byte[])copyArrayGrow1(array, Byte.TYPE);
         newArray[newArray.length - 1] = element;
         return newArray;
@@ -3825,7 +3825,7 @@ public class ArrayUtils {
      * @return A new array containing the existing elements plus the new element
      * @since 2.1
      */
-    public static char[] add(char[] array, char element) {
+    public static char[] add(final char[] array, final char element) {
         char[] newArray = (char[])copyArrayGrow1(array, Character.TYPE);
         newArray[newArray.length - 1] = element;
         return newArray;
@@ -3852,7 +3852,7 @@ public class ArrayUtils {
      * @return A new array containing the existing elements plus the new element
      * @since 2.1
      */
-    public static double[] add(double[] array, double element) {
+    public static double[] add(final double[] array, final double element) {
         double[] newArray = (double[])copyArrayGrow1(array, Double.TYPE);
         newArray[newArray.length - 1] = element;
         return newArray;
@@ -3879,7 +3879,7 @@ public class ArrayUtils {
      * @return A new array containing the existing elements plus the new element
      * @since 2.1
      */
-    public static float[] add(float[] array, float element) {
+    public static float[] add(final float[] array, final float element) {
         float[] newArray = (float[])copyArrayGrow1(array, Float.TYPE);
         newArray[newArray.length - 1] = element;
         return newArray;
@@ -3906,7 +3906,7 @@ public class ArrayUtils {
      * @return A new array containing the existing elements plus the new element
      * @since 2.1
      */
-    public static int[] add(int[] array, int element) {
+    public static int[] add(final int[] array, final int element) {
         int[] newArray = (int[])copyArrayGrow1(array, Integer.TYPE);
         newArray[newArray.length - 1] = element;
         return newArray;
@@ -3933,7 +3933,7 @@ public class ArrayUtils {
      * @return A new array containing the existing elements plus the new element
      * @since 2.1
      */
-    public static long[] add(long[] array, long element) {
+    public static long[] add(final long[] array, final long element) {
         long[] newArray = (long[])copyArrayGrow1(array, Long.TYPE);
         newArray[newArray.length - 1] = element;
         return newArray;
@@ -3960,7 +3960,7 @@ public class ArrayUtils {
      * @return A new array containing the existing elements plus the new element
      * @since 2.1
      */
-    public static short[] add(short[] array, short element) {
+    public static short[] add(final short[] array, final short element) {
         short[] newArray = (short[])copyArrayGrow1(array, Short.TYPE);
         newArray[newArray.length - 1] = element;
         return newArray;
@@ -3975,7 +3975,7 @@ public class ArrayUtils {
      * size 1 array of this type.
      * @return A new copy of the array of size 1 greater than the input.
      */
-    private static Object copyArrayGrow1(Object array, Class<?> newArrayComponentType) {
+    private static Object copyArrayGrow1(final Object array, final Class<?> newArrayComponentType) {
         if (array != null) {
             int arrayLength = Array.getLength(array);
             Object newArray = Array.newInstance(array.getClass().getComponentType(), arrayLength + 1);
@@ -4015,7 +4015,7 @@ public class ArrayUtils {
      * (index < 0 || index > array.length).
      * @throws IllegalArgumentException if both array and element are null
      */
-    public static <T> T[] add(T[] array, int index, T element) {
+    public static <T> T[] add(final T[] array, final int index, final T element) {
         Class<?> clss = null;
         if (array != null) {
             clss = array.getClass().getComponentType();
@@ -4056,7 +4056,7 @@ public class ArrayUtils {
      * @throws IndexOutOfBoundsException if the index is out of range
      * (index < 0 || index > array.length).
      */
-    public static boolean[] add(boolean[] array, int index, boolean element) {
+    public static boolean[] add(final boolean[] array, final int index, final boolean element) {
         return (boolean[]) add(array, index, Boolean.valueOf(element), Boolean.TYPE);
     }
 
@@ -4088,7 +4088,7 @@ public class ArrayUtils {
      * @throws IndexOutOfBoundsException if the index is out of range
      * (index < 0 || index > array.length).
      */
-    public static char[] add(char[] array, int index, char element) {
+    public static char[] add(final char[] array, final int index, final char element) {
         return (char[]) add(array, index, Character.valueOf(element), Character.TYPE);
     }
 
@@ -4119,7 +4119,7 @@ public class ArrayUtils {
      * @throws IndexOutOfBoundsException if the index is out of range
      * (index < 0 || index > array.length).
      */
-    public static byte[] add(byte[] array, int index, byte element) {
+    public static byte[] add(final byte[] array, final int index, final byte element) {
         return (byte[]) add(array, index, Byte.valueOf(element), Byte.TYPE);
     }
 
@@ -4150,7 +4150,7 @@ public class ArrayUtils {
      * @throws IndexOutOfBoundsException if the index is out of range
      * (index < 0 || index > array.length).
      */
-    public static short[] add(short[] array, int index, short element) {
+    public static short[] add(final short[] array, final int index, final short element) {
         return (short[]) add(array, index, Short.valueOf(element), Short.TYPE);
     }
 
@@ -4181,7 +4181,7 @@ public class ArrayUtils {
      * @throws IndexOutOfBoundsException if the index is out of range
      * (index < 0 || index > array.length).
      */
-    public static int[] add(int[] array, int index, int element) {
+    public static int[] add(final int[] array, final int index, final int element) {
         return (int[]) add(array, index, Integer.valueOf(element), Integer.TYPE);
     }
 
@@ -4212,7 +4212,7 @@ public class ArrayUtils {
      * @throws IndexOutOfBoundsException if the index is out of range
      * (index < 0 || index > array.length).
      */
-    public static long[] add(long[] array, int index, long element) {
+    public static long[] add(final long[] array, final int index, final long element) {
         return (long[]) add(array, index, Long.valueOf(element), Long.TYPE);
     }
 
@@ -4243,7 +4243,7 @@ public class ArrayUtils {
      * @throws IndexOutOfBoundsException if the index is out of range
      * (index < 0 || index > array.length).
      */
-    public static float[] add(float[] array, int index, float element) {
+    public static float[] add(final float[] array, final int index, final float element) {
         return (float[]) add(array, index, Float.valueOf(element), Float.TYPE);
     }
 
@@ -4274,7 +4274,7 @@ public class ArrayUtils {
      * @throws IndexOutOfBoundsException if the index is out of range
      * (index < 0 || index > array.length).
      */
-    public static double[] add(double[] array, int index, double element) {
+    public static double[] add(final double[] array, final int index, final double element) {
         return (double[]) add(array, index, Double.valueOf(element), Double.TYPE);
     }
 
@@ -4289,7 +4289,7 @@ public class ArrayUtils {
      * @param clss the type of the element being added
      * @return A new array containing the existing elements and the new element
      */
-    private static Object add(Object array, int index, Object element, Class<?> clss) {
+    private static Object add(final Object array, final int index, final Object element, final Class<?> clss) {
         if (array == null) {
             if (index != 0) {
                 throw new IndexOutOfBoundsException("Index: " + index + ", Length: 0");
@@ -4341,7 +4341,7 @@ public class ArrayUtils {
      * @since 2.1
      */
     @SuppressWarnings("unchecked") // remove() always creates an array of the same type as its input
-    public static <T> T[] remove(T[] array, int index) {
+    public static <T> T[] remove(final T[] array, final int index) {
         return (T[]) remove((Object) array, index);
     }
 
@@ -4371,7 +4371,7 @@ public class ArrayUtils {
      *         occurrence of the specified element.
      * @since 2.1
      */
-    public static <T> T[] removeElement(T[] array, Object element) {
+    public static <T> T[] removeElement(final T[] array, final Object element) {
         int index = indexOf(array, element);
         if (index == INDEX_NOT_FOUND) {
             return clone(array);
@@ -4407,7 +4407,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 2.1
      */
-    public static boolean[] remove(boolean[] array, int index) {
+    public static boolean[] remove(final boolean[] array, final int index) {
         return (boolean[]) remove((Object) array, index);
     }
 
@@ -4436,7 +4436,7 @@ public class ArrayUtils {
      *         occurrence of the specified element.
      * @since 2.1
      */
-    public static boolean[] removeElement(boolean[] array, boolean element) {
+    public static boolean[] removeElement(final boolean[] array, final boolean element) {
         int index = indexOf(array, element);
         if (index == INDEX_NOT_FOUND) {
             return clone(array);
@@ -4472,7 +4472,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 2.1
      */
-    public static byte[] remove(byte[] array, int index) {
+    public static byte[] remove(final byte[] array, final int index) {
         return (byte[]) remove((Object) array, index);
     }
 
@@ -4501,7 +4501,7 @@ public class ArrayUtils {
      *         occurrence of the specified element.
      * @since 2.1
      */
-    public static byte[] removeElement(byte[] array, byte element) {
+    public static byte[] removeElement(final byte[] array, final byte element) {
         int index = indexOf(array, element);
         if (index == INDEX_NOT_FOUND) {
             return clone(array);
@@ -4537,7 +4537,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 2.1
      */
-    public static char[] remove(char[] array, int index) {
+    public static char[] remove(final char[] array, final int index) {
         return (char[]) remove((Object) array, index);
     }
 
@@ -4566,7 +4566,7 @@ public class ArrayUtils {
      *         occurrence of the specified element.
      * @since 2.1
      */
-    public static char[] removeElement(char[] array, char element) {
+    public static char[] removeElement(final char[] array, final char element) {
         int index = indexOf(array, element);
         if (index == INDEX_NOT_FOUND) {
             return clone(array);
@@ -4602,7 +4602,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 2.1
      */
-    public static double[] remove(double[] array, int index) {
+    public static double[] remove(final double[] array, final int index) {
         return (double[]) remove((Object) array, index);
     }
 
@@ -4631,7 +4631,7 @@ public class ArrayUtils {
      *         occurrence of the specified element.
      * @since 2.1
      */
-    public static double[] removeElement(double[] array, double element) {
+    public static double[] removeElement(final double[] array, final double element) {
         int index = indexOf(array, element);
         if (index == INDEX_NOT_FOUND) {
             return clone(array);
@@ -4667,7 +4667,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 2.1
      */
-    public static float[] remove(float[] array, int index) {
+    public static float[] remove(final float[] array, final int index) {
         return (float[]) remove((Object) array, index);
     }
 
@@ -4696,7 +4696,7 @@ public class ArrayUtils {
      *         occurrence of the specified element.
      * @since 2.1
      */
-    public static float[] removeElement(float[] array, float element) {
+    public static float[] removeElement(final float[] array, final float element) {
         int index = indexOf(array, element);
         if (index == INDEX_NOT_FOUND) {
             return clone(array);
@@ -4732,7 +4732,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 2.1
      */
-    public static int[] remove(int[] array, int index) {
+    public static int[] remove(final int[] array, final int index) {
         return (int[]) remove((Object) array, index);
     }
 
@@ -4761,7 +4761,7 @@ public class ArrayUtils {
      *         occurrence of the specified element.
      * @since 2.1
      */
-    public static int[] removeElement(int[] array, int element) {
+    public static int[] removeElement(final int[] array, final int element) {
         int index = indexOf(array, element);
         if (index == INDEX_NOT_FOUND) {
             return clone(array);
@@ -4797,7 +4797,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 2.1
      */
-    public static long[] remove(long[] array, int index) {
+    public static long[] remove(final long[] array, final int index) {
         return (long[]) remove((Object) array, index);
     }
 
@@ -4826,7 +4826,7 @@ public class ArrayUtils {
      *         occurrence of the specified element.
      * @since 2.1
      */
-    public static long[] removeElement(long[] array, long element) {
+    public static long[] removeElement(final long[] array, final long element) {
         int index = indexOf(array, element);
         if (index == INDEX_NOT_FOUND) {
             return clone(array);
@@ -4862,7 +4862,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 2.1
      */
-    public static short[] remove(short[] array, int index) {
+    public static short[] remove(final short[] array, final int index) {
         return (short[]) remove((Object) array, index);
     }
 
@@ -4891,7 +4891,7 @@ public class ArrayUtils {
      *         occurrence of the specified element.
      * @since 2.1
      */
-    public static short[] removeElement(short[] array, short element) {
+    public static short[] removeElement(final short[] array, final short element) {
         int index = indexOf(array, element);
         if (index == INDEX_NOT_FOUND) {
             return clone(array);
@@ -4920,7 +4920,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 2.1
      */
-    private static Object remove(Object array, int index) {
+    private static Object remove(final Object array, final int index) {
         int length = getLength(array);
         if (index < 0 || index >= length) {
             throw new IndexOutOfBoundsException("Index: " + index + ", Length: " + length);
@@ -4962,7 +4962,7 @@ public class ArrayUtils {
      * @since 3.0.1
      */
     @SuppressWarnings("unchecked") // removeAll() always creates an array of the same type as its input
-    public static <T> T[] removeAll(T[] array, int... indices) {
+    public static <T> T[] removeAll(final T[] array, final int... indices) {
         return (T[]) removeAll((Object) array, clone(indices));
     }
 
@@ -4994,7 +4994,7 @@ public class ArrayUtils {
      *         earliest-encountered occurrences of the specified elements.
      * @since 3.0.1
      */
-    public static <T> T[] removeElements(T[] array, T... values) {
+    public static <T> T[] removeElements(final T[] array, final T... values) {
         if (isEmpty(array) || isEmpty(values)) {
             return clone(array);
         }
@@ -5053,7 +5053,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 3.0.1
      */
-    public static byte[] removeAll(byte[] array, int... indices) {
+    public static byte[] removeAll(final byte[] array, final int... indices) {
         return (byte[]) removeAll((Object) array, clone(indices));
     }
 
@@ -5084,7 +5084,7 @@ public class ArrayUtils {
      *         earliest-encountered occurrences of the specified elements.
      * @since 3.0.1
      */
-    public static byte[] removeElements(byte[] array, byte... values) {
+    public static byte[] removeElements(final byte[] array, final byte... values) {
         if (isEmpty(array) || isEmpty(values)) {
             return clone(array);
         }
@@ -5142,7 +5142,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 3.0.1
      */
-    public static short[] removeAll(short[] array, int... indices) {
+    public static short[] removeAll(final short[] array, final int... indices) {
         return (short[]) removeAll((Object) array, clone(indices));
     }
 
@@ -5173,7 +5173,7 @@ public class ArrayUtils {
      *         earliest-encountered occurrences of the specified elements.
      * @since 3.0.1
      */
-    public static short[] removeElements(short[] array, short... values) {
+    public static short[] removeElements(final short[] array, final short... values) {
         if (isEmpty(array) || isEmpty(values)) {
             return clone(array);
         }
@@ -5231,7 +5231,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 3.0.1
      */
-    public static int[] removeAll(int[] array, int... indices) {
+    public static int[] removeAll(final int[] array, final int... indices) {
         return (int[]) removeAll((Object) array, clone(indices));
     }
 
@@ -5262,7 +5262,7 @@ public class ArrayUtils {
      *         earliest-encountered occurrences of the specified elements.
      * @since 3.0.1
      */
-    public static int[] removeElements(int[] array, int... values) {
+    public static int[] removeElements(final int[] array, final int... values) {
         if (isEmpty(array) || isEmpty(values)) {
             return clone(array);
         }
@@ -5320,7 +5320,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 3.0.1
      */
-    public static char[] removeAll(char[] array, int... indices) {
+    public static char[] removeAll(final char[] array, final int... indices) {
         return (char[]) removeAll((Object) array, clone(indices));
     }
 
@@ -5351,7 +5351,7 @@ public class ArrayUtils {
      *         earliest-encountered occurrences of the specified elements.
      * @since 3.0.1
      */
-    public static char[] removeElements(char[] array, char... values) {
+    public static char[] removeElements(final char[] array, final char... values) {
         if (isEmpty(array) || isEmpty(values)) {
             return clone(array);
         }
@@ -5409,7 +5409,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 3.0.1
      */
-    public static long[] removeAll(long[] array, int... indices) {
+    public static long[] removeAll(final long[] array, final int... indices) {
         return (long[]) removeAll((Object) array, clone(indices));
     }
 
@@ -5440,7 +5440,7 @@ public class ArrayUtils {
      *         earliest-encountered occurrences of the specified elements.
      * @since 3.0.1
      */
-    public static long[] removeElements(long[] array, long... values) {
+    public static long[] removeElements(final long[] array, final long... values) {
         if (isEmpty(array) || isEmpty(values)) {
             return clone(array);
         }
@@ -5498,7 +5498,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 3.0.1
      */
-    public static float[] removeAll(float[] array, int... indices) {
+    public static float[] removeAll(final float[] array, final int... indices) {
         return (float[]) removeAll((Object) array, clone(indices));
     }
 
@@ -5529,7 +5529,7 @@ public class ArrayUtils {
      *         earliest-encountered occurrences of the specified elements.
      * @since 3.0.1
      */
-    public static float[] removeElements(float[] array, float... values) {
+    public static float[] removeElements(final float[] array, final float... values) {
         if (isEmpty(array) || isEmpty(values)) {
             return clone(array);
         }
@@ -5587,7 +5587,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 3.0.1
      */
-    public static double[] removeAll(double[] array, int... indices) {
+    public static double[] removeAll(final double[] array, final int... indices) {
         return (double[]) removeAll((Object) array, clone(indices));
     }
 
@@ -5618,7 +5618,7 @@ public class ArrayUtils {
      *         earliest-encountered occurrences of the specified elements.
      * @since 3.0.1
      */
-    public static double[] removeElements(double[] array, double... values) {
+    public static double[] removeElements(final double[] array, final double... values) {
         if (isEmpty(array) || isEmpty(values)) {
             return clone(array);
         }
@@ -5672,7 +5672,7 @@ public class ArrayUtils {
      * (index < 0 || index >= array.length), or if the array is {@code null}.
      * @since 3.0.1
      */
-    public static boolean[] removeAll(boolean[] array, int... indices) {
+    public static boolean[] removeAll(final boolean[] array, final int... indices) {
         return (boolean[]) removeAll((Object) array, clone(indices));
     }
 
@@ -5703,7 +5703,7 @@ public class ArrayUtils {
      *         earliest-encountered occurrences of the specified elements.
      * @since 3.0.1
      */
-    public static boolean[] removeElements(boolean[] array, boolean... values) {
+    public static boolean[] removeElements(final boolean[] array, final boolean... values) {
         if (isEmpty(array) || isEmpty(values)) {
             return clone(array);
         }
@@ -5740,7 +5740,7 @@ public class ArrayUtils {
      * @since 3.0.1
      */
     // package protected for access by unit tests
-    static Object removeAll(Object array, int... indices) {
+    static Object removeAll(final Object array, final int... indices) {
         int length = getLength(array);
         int diff = 0; // number of distinct indexes, i.e. number of entries that will be removed
 
@@ -5791,7 +5791,7 @@ public class ArrayUtils {
      * @since 3.2
      */
     // package protected for access by unit tests
-    static Object removeAll(Object array, BitSet indices) {
+    static Object removeAll(final Object array, final BitSet indices) {
         final int srcLength = ArrayUtils.getLength(array);
         // No need to check maxIndex here, because method only currently called from removeElements()

[... 2 lines stripped ...]


Mime
View raw message