A negative startIndex is treated as zero. A startIndex larger than the array
* length will return an empty BitSet.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
* @return a BitSet of all the indices of the value within the array,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final byte[] array, final byte valueToFind, int startIndex) {
@@ -2296,10 +2296,10 @@ public static BitSet indexesOf(final byte[] array, final byte valueToFind, int s
*
*
This method returns an empty BitSet for a {@code null} input array.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
* @return a BitSet of all the indices of the value within the array,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final char[] array, final char valueToFind) {
@@ -2314,11 +2314,11 @@ public static BitSet indexesOf(final char[] array, final char valueToFind) {
*
A negative startIndex is treated as zero. A startIndex larger than the array
* length will return an empty BitSet.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
* @return a BitSet of all the indices of the value within the array,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final char[] array, final char valueToFind, int startIndex) {
@@ -2341,10 +2341,10 @@ public static BitSet indexesOf(final char[] array, final char valueToFind, int s
*
*
This method returns empty BitSet for a {@code null} input array.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
* @return a BitSet of all the indices of the value within the array,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final double[] array, final double valueToFind) {
@@ -2361,11 +2361,11 @@ public static BitSet indexesOf(final double[] array, final double valueToFind) {
*
*
This method returns an empty BitSet for a {@code null} input array.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param tolerance tolerance of the search.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param tolerance tolerance of the search
* @return a BitSet of all the indices of the value within the array,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final double[] array, final double valueToFind, final double tolerance) {
@@ -2380,11 +2380,11 @@ public static BitSet indexesOf(final double[] array, final double valueToFind, f
*
A negative startIndex is treated as zero. A startIndex larger than the array
* length will return an empty BitSet.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
* @return a BitSet of the indices of the value within the array,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final double[] array, final double valueToFind, int startIndex) {
@@ -2415,12 +2415,12 @@ public static BitSet indexesOf(final double[] array, final double valueToFind, i
*
A negative startIndex is treated as zero. A startIndex larger than the array
* length will return an empty BitSet.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
- * @param tolerance tolerance of the search.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
+ * @param tolerance tolerance of the search
* @return a BitSet of the indices of the value within the array,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final double[] array, final double valueToFind, int startIndex, final double tolerance) {
@@ -2443,10 +2443,10 @@ public static BitSet indexesOf(final double[] array, final double valueToFind, i
*
*
This method returns an empty BitSet for a {@code null} input array.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
* @return a BitSet of all the indices of the value within the array,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final float[] array, final float valueToFind) {
@@ -2461,11 +2461,11 @@ public static BitSet indexesOf(final float[] array, final float valueToFind) {
*
A negative startIndex is treated as zero. A startIndex larger than the array
* length will return empty BitSet.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
* @return a BitSet of all the indices of the value within the array,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final float[] array, final float valueToFind, int startIndex) {
@@ -2488,10 +2488,10 @@ public static BitSet indexesOf(final float[] array, final float valueToFind, int
*
*
This method returns an empty BitSet for a {@code null} input array.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
* @return a BitSet of all the indices of the value within the array,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final int[] array, final int valueToFind) {
@@ -2506,11 +2506,11 @@ public static BitSet indexesOf(final int[] array, final int valueToFind) {
*
A negative startIndex is treated as zero. A startIndex larger than the array
* length will return an empty BitSet.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
* @return a BitSet of all the indices of the value within the array,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final int[] array, final int valueToFind, int startIndex) {
@@ -2533,10 +2533,10 @@ public static BitSet indexesOf(final int[] array, final int valueToFind, int sta
*
*
This method returns an empty BitSet for a {@code null} input array.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
* @return a BitSet of all the indices of the value within the array,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final long[] array, final long valueToFind) {
@@ -2551,11 +2551,11 @@ public static BitSet indexesOf(final long[] array, final long valueToFind) {
*
A negative startIndex is treated as zero. A startIndex larger than the array
* length will return an empty BitSet.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
* @return a BitSet of all the indices of the value within the array,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final long[] array, final long valueToFind, int startIndex) {
@@ -2578,10 +2578,10 @@ public static BitSet indexesOf(final long[] array, final long valueToFind, int s
*
*
This method returns an empty BitSet for a {@code null} input array.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param objectToFind the object to find, may be {@code null}.
+ * @param array the array to search for the object, may be {@code null}
+ * @param objectToFind the object to find, may be {@code null}
* @return a BitSet of all the indices of the object within the array,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final Object[] array, final Object objectToFind) {
@@ -2596,11 +2596,11 @@ public static BitSet indexesOf(final Object[] array, final Object objectToFind)
*
A negative startIndex is treated as zero. A startIndex larger than the array
* length will return an empty BitSet.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param objectToFind the object to find, may be {@code null}.
- * @param startIndex the index to start searching.
+ * @param array the array to search for the object, may be {@code null}
+ * @param objectToFind the object to find, may be {@code null}
+ * @param startIndex the index to start searching
* @return a BitSet of all the indices of the object within the array starting at the index,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final Object[] array, final Object objectToFind, int startIndex) {
@@ -2623,10 +2623,10 @@ public static BitSet indexesOf(final Object[] array, final Object objectToFind,
*
*
This method returns an empty BitSet for a {@code null} input array.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
* @return a BitSet of all the indices of the value within the array,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final short[] array, final short valueToFind) {
@@ -2641,11 +2641,11 @@ public static BitSet indexesOf(final short[] array, final short valueToFind) {
*
A negative startIndex is treated as zero. A startIndex larger than the array
* length will return an empty BitSet.
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
* @return a BitSet of all the indices of the value within the array,
- * an empty BitSet if not found or {@code null} array input.
+ * an empty BitSet if not found or {@code null} array input
* @since 3.10
*/
public static BitSet indexesOf(final short[] array, final short valueToFind, int startIndex) {
@@ -2669,9 +2669,9 @@ public static BitSet indexesOf(final short[] array, final short valueToFind, int
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @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(final boolean[] array, final boolean valueToFind) {
return indexOf(array, valueToFind, 0);
@@ -2686,10 +2686,10 @@ public static int indexOf(final boolean[] array, final boolean valueToFind) {
* A negative startIndex is treated as zero. A startIndex larger than the array length will return {@link #INDEX_NOT_FOUND} ({@code -1}).
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
+ * @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(final boolean[] array, final boolean valueToFind, final int startIndex) {
if (isEmpty(array)) {
@@ -2709,9 +2709,9 @@ public static int indexOf(final boolean[] array, final boolean valueToFind, fina
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @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(final byte[] array, final byte valueToFind) {
return indexOf(array, valueToFind, 0);
@@ -2726,10 +2726,10 @@ public static int indexOf(final byte[] array, final byte valueToFind) {
* A negative startIndex is treated as zero. A startIndex larger than the array length will return {@link #INDEX_NOT_FOUND} ({@code -1}).
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
+ * @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(final byte[] array, final byte valueToFind, final int startIndex) {
if (isEmpty(array)) {
@@ -2749,9 +2749,9 @@ public static int indexOf(final byte[] array, final byte valueToFind, final int
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
* @since 2.1
*/
public static int indexOf(final char[] array, final char valueToFind) {
@@ -2767,10 +2767,10 @@ public static int indexOf(final char[] array, final char valueToFind) {
* A negative startIndex is treated as zero. A startIndex larger than the array length will return {@link #INDEX_NOT_FOUND} ({@code -1}).
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
+ * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
* @since 2.1
*/
public static int indexOf(final char[] array, final char valueToFind, final int startIndex) {
@@ -2791,9 +2791,9 @@ public static int indexOf(final char[] array, final char valueToFind, final int
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @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(final double[] array, final double valueToFind) {
return indexOf(array, valueToFind, 0);
@@ -2806,10 +2806,10 @@ public static int indexOf(final double[] array, final double valueToFind) {
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param tolerance tolerance of the search.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param tolerance tolerance of the search
+ * @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(final double[] array, final double valueToFind, final double tolerance) {
return indexOf(array, valueToFind, 0, tolerance);
@@ -2824,10 +2824,10 @@ public static int indexOf(final double[] array, final double valueToFind, final
* A negative startIndex is treated as zero. A startIndex larger than the array length will return {@link #INDEX_NOT_FOUND} ({@code -1}).
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
+ * @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(final double[] array, final double valueToFind, final int startIndex) {
if (Double.isNaN(valueToFind)) {
@@ -2854,11 +2854,11 @@ public static int indexOf(final double[] array, final double valueToFind, final
* A negative startIndex is treated as zero. A startIndex larger than the array length will return {@link #INDEX_NOT_FOUND} ({@code -1}).
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
- * @param tolerance tolerance of the search.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
+ * @param tolerance tolerance of the search
+ * @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(final double[] array, final double valueToFind, final int startIndex, final double tolerance) {
if (Double.isNaN(valueToFind)) {
@@ -2883,9 +2883,9 @@ public static int indexOf(final double[] array, final double valueToFind, final
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @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(final float[] array, final float valueToFind) {
return indexOf(array, valueToFind, 0);
@@ -2900,10 +2900,10 @@ public static int indexOf(final float[] array, final float valueToFind) {
* A negative startIndex is treated as zero. A startIndex larger than the array length will return {@link #INDEX_NOT_FOUND} ({@code -1}).
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
+ * @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(final float[] array, final float valueToFind, final int startIndex) {
if (isEmpty(array)) {
@@ -2925,9 +2925,9 @@ public static int indexOf(final float[] array, final float valueToFind, final in
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @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(final int[] array, final int valueToFind) {
return indexOf(array, valueToFind, 0);
@@ -2942,10 +2942,10 @@ public static int indexOf(final int[] array, final int valueToFind) {
* A negative startIndex is treated as zero. A startIndex larger than the array length will return {@link #INDEX_NOT_FOUND} ({@code -1}).
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
+ * @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(final int[] array, final int valueToFind, final int startIndex) {
if (isEmpty(array)) {
@@ -2965,9 +2965,9 @@ public static int indexOf(final int[] array, final int valueToFind, final int st
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @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(final long[] array, final long valueToFind) {
return indexOf(array, valueToFind, 0);
@@ -2982,10 +2982,10 @@ public static int indexOf(final long[] array, final long valueToFind) {
* A negative startIndex is treated as zero. A startIndex larger than the array length will return {@link #INDEX_NOT_FOUND} ({@code -1}).
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
+ * @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(final long[] array, final long valueToFind, final int startIndex) {
if (isEmpty(array)) {
@@ -3005,9 +3005,9 @@ public static int indexOf(final long[] array, final long valueToFind, final int
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param objectToFind the object to find, may be {@code null}.
- * @return the index of the object within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param objectToFind the object to find, may be {@code null}
+ * @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(final Object[] array, final Object objectToFind) {
return indexOf(array, objectToFind, 0);
@@ -3022,10 +3022,10 @@ public static int indexOf(final Object[] array, final Object objectToFind) {
* A negative startIndex is treated as zero. A startIndex larger than the array length will return {@link #INDEX_NOT_FOUND} ({@code -1}).
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param objectToFind the object to find, may be {@code null}.
- * @param startIndex the index to start searching.
- * @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.
+ * @param array the array to search for the object, may be {@code null}
+ * @param objectToFind the object to find, may be {@code null}
+ * @param startIndex the index to start searching
+ * @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(final Object[] array, final Object objectToFind, int startIndex) {
if (isEmpty(array)) {
@@ -3055,8 +3055,8 @@ public static int indexOf(final Object[] array, final Object objectToFind, int s
*
*
* @param array the array to search for the object, may be {@code null}
- * @param valueToFind the value to find.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param valueToFind the value to find
+ * @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(final short[] array, final short valueToFind) {
return indexOf(array, valueToFind, 0);
@@ -3071,10 +3071,10 @@ public static int indexOf(final short[] array, final short valueToFind) {
* A negative startIndex is treated as zero. A startIndex larger than the array length will return {@link #INDEX_NOT_FOUND} ({@code -1}).
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the index to start searching.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the index to start searching
+ * @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(final short[] array, final short valueToFind, final int startIndex) {
if (isEmpty(array)) {
@@ -3090,9 +3090,10 @@ public static int indexOf(final short[] array, final short valueToFind, final in
/**
* Finds the index of the NaN value in a double array.
- * @param array the array to search for NaN, may be {@code null}.
- * @param startIndex the index to start searching.
- * @return the index of the NaN value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ *
+ * @param array the array to search for NaN, may be {@code null}
+ * @param startIndex the index to start searching
+ * @return the index of the NaN value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
*/
private static int indexOfNaN(final double[] array, final int startIndex) {
if (isEmpty(array)) {
@@ -3119,11 +3120,11 @@ private static int indexOfNaN(final double[] array, final int startIndex) {
* ArrayUtils.insert(index, null, values) = null
*
*
- * @param index the position within {@code array} to insert the new values.
- * @param array the array to insert the values into, may be {@code null}.
- * @param values the new values to insert, may be {@code null}.
- * @return The new array or {@code null} if the given array is {@code null}.
- * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}.
+ * @param index the position within {@code array} to insert the new values
+ * @param array the array to insert the values into, may be {@code null}
+ * @param values the new values to insert, may be {@code null}
+ * @return the new array or {@code null} if the given array is {@code null}
+ * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}
* @since 3.6
*/
public static boolean[] insert(final int index, final boolean[] array, final boolean... values) {
@@ -3160,11 +3161,11 @@ public static boolean[] insert(final int index, final boolean[] array, final boo
* ArrayUtils.insert(index, null, values) = null
*
*
- * @param index the position within {@code array} to insert the new values.
- * @param array the array to insert the values into, may be {@code null}.
- * @param values the new values to insert, may be {@code null}.
- * @return The new array or {@code null} if the given array is {@code null}.
- * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}.
+ * @param index the position within {@code array} to insert the new values
+ * @param array the array to insert the values into, may be {@code null}
+ * @param values the new values to insert, may be {@code null}
+ * @return the new array or {@code null} if the given array is {@code null}
+ * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}
* @since 3.6
*/
public static byte[] insert(final int index, final byte[] array, final byte... values) {
@@ -3201,11 +3202,11 @@ public static byte[] insert(final int index, final byte[] array, final byte... v
* ArrayUtils.insert(index, null, values) = null
*
*
- * @param index the position within {@code array} to insert the new values.
- * @param array the array to insert the values into, may be {@code null}.
- * @param values the new values to insert, may be {@code null}.
- * @return The new array or {@code null} if the given array is {@code null}.
- * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}.
+ * @param index the position within {@code array} to insert the new values
+ * @param array the array to insert the values into, may be {@code null}
+ * @param values the new values to insert, may be {@code null}
+ * @return the new array or {@code null} if the given array is {@code null}
+ * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}
* @since 3.6
*/
public static char[] insert(final int index, final char[] array, final char... values) {
@@ -3242,11 +3243,11 @@ public static char[] insert(final int index, final char[] array, final char... v
* ArrayUtils.insert(index, null, values) = null
*
*
- * @param index the position within {@code array} to insert the new values.
- * @param array the array to insert the values into, may be {@code null}.
- * @param values the new values to insert, may be {@code null}.
- * @return The new array or {@code null} if the given array is {@code null}.
- * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}.
+ * @param index the position within {@code array} to insert the new values
+ * @param array the array to insert the values into, may be {@code null}
+ * @param values the new values to insert, may be {@code null}
+ * @return the new array or {@code null} if the given array is {@code null}
+ * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}
* @since 3.6
*/
public static double[] insert(final int index, final double[] array, final double... values) {
@@ -3283,11 +3284,11 @@ public static double[] insert(final int index, final double[] array, final doubl
* ArrayUtils.insert(index, null, values) = null
*
*
- * @param index the position within {@code array} to insert the new values.
- * @param array the array to insert the values into, may be {@code null}.
- * @param values the new values to insert, may be {@code null}.
- * @return The new array or {@code null} if the given array is {@code null}.
- * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}.
+ * @param index the position within {@code array} to insert the new values
+ * @param array the array to insert the values into, may be {@code null}
+ * @param values the new values to insert, may be {@code null}
+ * @return the new array or {@code null} if the given array is {@code null}
+ * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}
* @since 3.6
*/
public static float[] insert(final int index, final float[] array, final float... values) {
@@ -3324,11 +3325,11 @@ public static float[] insert(final int index, final float[] array, final float..
* ArrayUtils.insert(index, null, values) = null
*
*
- * @param index the position within {@code array} to insert the new values.
- * @param array the array to insert the values into, may be {@code null}.
- * @param values the new values to insert, may be {@code null}.
- * @return The new array or {@code null} if the given array is {@code null}.
- * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}.
+ * @param index the position within {@code array} to insert the new values
+ * @param array the array to insert the values into, may be {@code null}
+ * @param values the new values to insert, may be {@code null}
+ * @return the new array or {@code null} if the given array is {@code null}
+ * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}
* @since 3.6
*/
public static int[] insert(final int index, final int[] array, final int... values) {
@@ -3365,11 +3366,11 @@ public static int[] insert(final int index, final int[] array, final int... valu
* ArrayUtils.insert(index, null, values) = null
*
*
- * @param index the position within {@code array} to insert the new values.
- * @param array the array to insert the values into, may be {@code null}.
- * @param values the new values to insert, may be {@code null}.
- * @return The new array or {@code null} if the given array is {@code null}.
- * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}.
+ * @param index the position within {@code array} to insert the new values
+ * @param array the array to insert the values into, may be {@code null}
+ * @param values the new values to insert, may be {@code null}
+ * @return the new array or {@code null} if the given array is {@code null}
+ * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}
* @since 3.6
*/
public static long[] insert(final int index, final long[] array, final long... values) {
@@ -3406,11 +3407,11 @@ public static long[] insert(final int index, final long[] array, final long... v
* ArrayUtils.insert(index, null, values) = null
*
*
- * @param index the position within {@code array} to insert the new values.
- * @param array the array to insert the values into, may be {@code null}.
- * @param values the new values to insert, may be {@code null}.
- * @return The new array or {@code null} if the given array is {@code null}.
- * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}.
+ * @param index the position within {@code array} to insert the new values
+ * @param array the array to insert the values into, may be {@code null}
+ * @param values the new values to insert, may be {@code null}
+ * @return the new array or {@code null} if the given array is {@code null}
+ * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}
* @since 3.6
*/
public static short[] insert(final int index, final short[] array, final short... values) {
@@ -3447,12 +3448,12 @@ public static short[] insert(final int index, final short[] array, final short..
* ArrayUtils.insert(index, null, values) = null
*
*
- * @param The type of elements in {@code array} and {@code values}.
- * @param index the position within {@code array} to insert the new values.
- * @param array the array to insert the values into, may be {@code null}.
- * @param values the new values to insert, may be {@code null}.
- * @return The new array or {@code null} if the given array is {@code null}.
- * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}.
+ * @param the type of elements in {@code array} and {@code values}
+ * @param index the position within {@code array} to insert the new values
+ * @param array the array to insert the values into, may be {@code null}
+ * @param values the new values to insert, may be {@code null}
+ * @return the new array or {@code null} if the given array is {@code null}
+ * @throws IndexOutOfBoundsException if {@code array} is provided and either {@code index < 0} or {@code index > array.length}
* @since 3.6
*/
@SafeVarargs
@@ -3489,8 +3490,8 @@ public static T[] insert(final int index, final T[] array, final T... values
/**
* Checks if an array is empty or {@code null}.
*
- * @param array the array to test.
- * @return {@code true} if the array is empty or {@code null}.
+ * @param array the array to test
+ * @return {@code true} if the array is empty or {@code null}
*/
private static boolean isArrayEmpty(final Object array) {
return getLength(array) == 0;
@@ -3505,10 +3506,10 @@ private static boolean isArrayEmpty(final Object array) {
* ArrayUtils.isArrayIndexValid(["a"], 0) = true
*
*
- * @param the component type of the array.
- * @param array the array to inspect, may be {@code null}.
- * @param index the index of the array to be inspected.
- * @return Whether the given index is safely-accessible in the given array.
+ * @param the component type of the array
+ * @param array the array to inspect, may be {@code null}
+ * @param index the index of the array to be inspected
+ * @return whether the given index is safely-accessible in the given array
* @since 3.8
*/
public static boolean isArrayIndexValid(final T[] array, final int index) {
@@ -3518,8 +3519,8 @@ public static boolean isArrayIndexValid(final T[] array, final int index) {
/**
* Tests whether 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}.
+ * @param array the array to test
+ * @return {@code true} if the array is empty or {@code null}
* @since 2.1
*/
public static boolean isEmpty(final boolean[] array) {
@@ -3529,8 +3530,8 @@ public static boolean isEmpty(final boolean[] array) {
/**
* Tests whether 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}.
+ * @param array the array to test
+ * @return {@code true} if the array is empty or {@code null}
* @since 2.1
*/
public static boolean isEmpty(final byte[] array) {
@@ -3540,8 +3541,8 @@ public static boolean isEmpty(final byte[] array) {
/**
* Tests whether 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}.
+ * @param array the array to test
+ * @return {@code true} if the array is empty or {@code null}
* @since 2.1
*/
public static boolean isEmpty(final char[] array) {
@@ -3551,8 +3552,8 @@ public static boolean isEmpty(final char[] array) {
/**
* Tests whether 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}.
+ * @param array the array to test
+ * @return {@code true} if the array is empty or {@code null}
* @since 2.1
*/
public static boolean isEmpty(final double[] array) {
@@ -3562,8 +3563,8 @@ public static boolean isEmpty(final double[] array) {
/**
* Tests whether 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}.
+ * @param array the array to test
+ * @return {@code true} if the array is empty or {@code null}
* @since 2.1
*/
public static boolean isEmpty(final float[] array) {
@@ -3573,8 +3574,8 @@ public static boolean isEmpty(final float[] array) {
/**
* Tests whether 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}.
+ * @param array the array to test
+ * @return {@code true} if the array is empty or {@code null}
* @since 2.1
*/
public static boolean isEmpty(final int[] array) {
@@ -3584,8 +3585,8 @@ public static boolean isEmpty(final int[] array) {
/**
* Tests whether 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}.
+ * @param array the array to test
+ * @return {@code true} if the array is empty or {@code null}
* @since 2.1
*/
public static boolean isEmpty(final long[] array) {
@@ -3595,8 +3596,8 @@ public static boolean isEmpty(final long[] array) {
/**
* Tests whether 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}.
+ * @param array the array to test
+ * @return {@code true} if the array is empty or {@code null}
* @since 2.1
*/
public static boolean isEmpty(final Object[] array) {
@@ -3606,8 +3607,8 @@ public static boolean isEmpty(final Object[] array) {
/**
* Tests whether 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}.
+ * @param array the array to test
+ * @return {@code true} if the array is empty or {@code null}
* @since 2.1
*/
public static boolean isEmpty(final short[] array) {
@@ -3615,18 +3616,18 @@ public static boolean isEmpty(final short[] array) {
}
/**
- * Tests whether two arrays have equal content, using equals(), handling multidimensional arrays
- * correctly.
- *
- * Multi-dimensional primitive arrays are also handled correctly by this method.
- *
- *
- * @param array1 the left-hand side array to compare, may be {@code null}.
- * @param array2 the right-hand side array to compare, may be {@code null}.
- * @return {@code true} if the arrays are equal.
- * @deprecated Replaced by {@code java.util.Objects.deepEquals(Object, Object)} and will be
+ * Tests whether two arrays have equal content, using equals(), handling multidimensional arrays
+ * correctly.
+ *
+ * Multi-dimensional primitive arrays are also handled correctly by this method.
+ *
+ *
+ * @param array1 the left-hand side array to compare, may be {@code null}
+ * @param array2 the right-hand side array to compare, may be {@code null}
+ * @return {@code true} if the arrays are equal
+ * @deprecated Replaced by {@code java.util.Objects.deepEquals(Object, Object)} and will be
* removed from future releases.
- */
+ */
@Deprecated
public static boolean isEquals(final Object array1, final Object array2) {
return new EqualsBuilder().append(array1, array2).isEquals();
@@ -3635,8 +3636,8 @@ public static boolean isEquals(final Object array1, final Object array2) {
/**
* Tests whether an array of primitive booleans is not empty and not {@code null}.
*
- * @param array the array to test.
- * @return {@code true} if the array is not empty and not {@code null}.
+ * @param array the array to test
+ * @return {@code true} if the array is not empty and not {@code null}
* @since 2.5
*/
public static boolean isNotEmpty(final boolean[] array) {
@@ -3646,8 +3647,8 @@ public static boolean isNotEmpty(final boolean[] array) {
/**
* Tests whether an array of primitive bytes is not empty and not {@code null}.
*
- * @param array the array to test.
- * @return {@code true} if the array is not empty and not {@code null}.
+ * @param array the array to test
+ * @return {@code true} if the array is not empty and not {@code null}
* @since 2.5
*/
public static boolean isNotEmpty(final byte[] array) {
@@ -3657,8 +3658,8 @@ public static boolean isNotEmpty(final byte[] array) {
/**
* Tests whether an array of primitive chars is not empty and not {@code null}.
*
- * @param array the array to test.
- * @return {@code true} if the array is not empty and not {@code null}.
+ * @param array the array to test
+ * @return {@code true} if the array is not empty and not {@code null}
* @since 2.5
*/
public static boolean isNotEmpty(final char[] array) {
@@ -3668,8 +3669,8 @@ public static boolean isNotEmpty(final char[] array) {
/**
* Tests whether an array of primitive doubles is not empty and not {@code null}.
*
- * @param array the array to test.
- * @return {@code true} if the array is not empty and not {@code null}.
+ * @param array the array to test
+ * @return {@code true} if the array is not empty and not {@code null}
* @since 2.5
*/
public static boolean isNotEmpty(final double[] array) {
@@ -3679,8 +3680,8 @@ public static boolean isNotEmpty(final double[] array) {
/**
* Tests whether an array of primitive floats is not empty and not {@code null}.
*
- * @param array the array to test.
- * @return {@code true} if the array is not empty and not {@code null}.
+ * @param array the array to test
+ * @return {@code true} if the array is not empty and not {@code null}
* @since 2.5
*/
public static boolean isNotEmpty(final float[] array) {
@@ -3690,8 +3691,8 @@ public static boolean isNotEmpty(final float[] array) {
/**
* Tests whether an array of primitive ints is not empty and not {@code null}.
*
- * @param array the array to test.
- * @return {@code true} if the array is not empty and not {@code null}.
+ * @param array the array to test
+ * @return {@code true} if the array is not empty and not {@code null}
* @since 2.5
*/
public static boolean isNotEmpty(final int[] array) {
@@ -3701,8 +3702,8 @@ public static boolean isNotEmpty(final int[] array) {
/**
* Tests whether an array of primitive longs is not empty and not {@code null}.
*
- * @param array the array to test.
- * @return {@code true} if the array is not empty and not {@code null}.
+ * @param array the array to test
+ * @return {@code true} if the array is not empty and not {@code null}
* @since 2.5
*/
public static boolean isNotEmpty(final long[] array) {
@@ -3712,8 +3713,8 @@ public static boolean isNotEmpty(final long[] array) {
/**
* Tests whether an array of primitive shorts is not empty and not {@code null}.
*
- * @param array the array to test.
- * @return {@code true} if the array is not empty and not {@code null}.
+ * @param array the array to test
+ * @return {@code true} if the array is not empty and not {@code null}
* @since 2.5
*/
public static boolean isNotEmpty(final short[] array) {
@@ -3724,8 +3725,8 @@ public static boolean isNotEmpty(final short[] array) {
* Tests whether an array of Objects is not empty and not {@code null}.
*
* @param the component type of the array
- * @param array the array to test.
- * @return {@code true} if the array is not empty and not {@code null}.
+ * @param array the array to test
+ * @return {@code true} if the array is not empty and not {@code null}
* @since 2.5
*/
public static boolean isNotEmpty(final T[] array) {
@@ -3733,12 +3734,12 @@ public static boolean isNotEmpty(final T[] array) {
}
/**
- * Tests whether two arrays are the same length, treating {@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}.
- * @return {@code true} if length of arrays matches, treating {@code null} as an empty array.
- */
+ * Tests whether two arrays are the same length, treating {@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}
+ * @return {@code true} if length of arrays matches, treating {@code null} as an empty array
+ */
public static boolean isSameLength(final boolean[] array1, final boolean[] array2) {
return getLength(array1) == getLength(array2);
}
@@ -3746,9 +3747,9 @@ public static boolean isSameLength(final boolean[] array1, final boolean[] array
/**
* Tests whether two arrays are the same length, treating {@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}.
- * @return {@code true} if length of arrays matches, treating {@code null} as an empty array.
+ * @param array1 the first array, may be {@code null}
+ * @param array2 the second array, may be {@code null}
+ * @return {@code true} if length of arrays matches, treating {@code null} as an empty array
*/
public static boolean isSameLength(final byte[] array1, final byte[] array2) {
return getLength(array1) == getLength(array2);
@@ -3757,9 +3758,9 @@ public static boolean isSameLength(final byte[] array1, final byte[] array2) {
/**
* Tests whether two arrays are the same length, treating {@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}.
- * @return {@code true} if length of arrays matches, treating {@code null} as an empty array.
+ * @param array1 the first array, may be {@code null}
+ * @param array2 the second array, may be {@code null}
+ * @return {@code true} if length of arrays matches, treating {@code null} as an empty array
*/
public static boolean isSameLength(final char[] array1, final char[] array2) {
return getLength(array1) == getLength(array2);
@@ -3768,9 +3769,9 @@ public static boolean isSameLength(final char[] array1, final char[] array2) {
/**
* Tests whether two arrays are the same length, treating {@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}.
- * @return {@code true} if length of arrays matches, treating {@code null} as an empty array.
+ * @param array1 the first array, may be {@code null}
+ * @param array2 the second array, may be {@code null}
+ * @return {@code true} if length of arrays matches, treating {@code null} as an empty array
*/
public static boolean isSameLength(final double[] array1, final double[] array2) {
return getLength(array1) == getLength(array2);
@@ -3779,9 +3780,9 @@ public static boolean isSameLength(final double[] array1, final double[] array2)
/**
* Tests whether two arrays are the same length, treating {@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}.
- * @return {@code true} if length of arrays matches, treating {@code null} as an empty array.
+ * @param array1 the first array, may be {@code null}
+ * @param array2 the second array, may be {@code null}
+ * @return {@code true} if length of arrays matches, treating {@code null} as an empty array
*/
public static boolean isSameLength(final float[] array1, final float[] array2) {
return getLength(array1) == getLength(array2);
@@ -3790,9 +3791,9 @@ public static boolean isSameLength(final float[] array1, final float[] array2) {
/**
* Tests whether two arrays are the same length, treating {@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}.
- * @return {@code true} if length of arrays matches, treating {@code null} as an empty array.
+ * @param array1 the first array, may be {@code null}
+ * @param array2 the second array, may be {@code null}
+ * @return {@code true} if length of arrays matches, treating {@code null} as an empty array
*/
public static boolean isSameLength(final int[] array1, final int[] array2) {
return getLength(array1) == getLength(array2);
@@ -3801,9 +3802,9 @@ public static boolean isSameLength(final int[] array1, final int[] array2) {
/**
* Tests whether two arrays are the same length, treating {@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}.
- * @return {@code true} if length of arrays matches, treating {@code null} as an empty array.
+ * @param array1 the first array, may be {@code null}
+ * @param array2 the second array, may be {@code null}
+ * @return {@code true} if length of arrays matches, treating {@code null} as an empty array
*/
public static boolean isSameLength(final long[] array1, final long[] array2) {
return getLength(array1) == getLength(array2);
@@ -3815,9 +3816,9 @@ public static boolean isSameLength(final long[] array1, final long[] array2) {
* 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}.
- * @return {@code true} if length of arrays matches, treating {@code null} as an empty array.
+ * @param array1 the first array, may be {@code null}
+ * @param array2 the second array, may be {@code null}
+ * @return {@code true} if length of arrays matches, treating {@code null} as an empty array
* @since 3.11
*/
public static boolean isSameLength(final Object array1, final Object array2) {
@@ -3830,9 +3831,9 @@ public static boolean isSameLength(final Object array1, final Object array2) {
* 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}.
- * @return {@code true} if length of arrays matches, treating {@code null} as an empty array.
+ * @param array1 the first array, may be {@code null}
+ * @param array2 the second array, may be {@code null}
+ * @return {@code true} if length of arrays matches, treating {@code null} as an empty array
*/
public static boolean isSameLength(final Object[] array1, final Object[] array2) {
return getLength(array1) == getLength(array2);
@@ -3841,9 +3842,9 @@ public static boolean isSameLength(final Object[] array1, final Object[] array2)
/**
* Tests whether two arrays are the same length, treating {@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}.
- * @return {@code true} if length of arrays matches, treating {@code null} as an empty array.
+ * @param array1 the first array, may be {@code null}
+ * @param array2 the second array, may be {@code null}
+ * @return {@code true} if length of arrays matches, treating {@code null} as an empty array
*/
public static boolean isSameLength(final short[] array1, final short[] array2) {
return getLength(array1) == getLength(array2);
@@ -3852,10 +3853,10 @@ public static boolean isSameLength(final short[] array1, final short[] array2) {
/**
* Tests whether two arrays are the same type taking into account multidimensional arrays.
*
- * @param array1 the first array, must not be {@code null}.
- * @param array2 the second array, must not be {@code null}.
- * @return {@code true} if type of arrays matches.
- * @throws IllegalArgumentException if either array is {@code null}.
+ * @param array1 the first array, must not be {@code null}
+ * @param array2 the second array, must not be {@code null}
+ * @return {@code true} if type of arrays matches
+ * @throws IllegalArgumentException if either array is {@code null}
*/
public static boolean isSameType(final Object array1, final Object array2) {
if (array1 == null || array2 == null) {
@@ -3867,8 +3868,8 @@ public static boolean isSameType(final Object array1, final Object array2) {
/**
* Tests whether whether the provided array is sorted according to natural ordering ({@code false} before {@code true}).
*
- * @param array the array to check.
- * @return whether the array is sorted according to natural ordering.
+ * @param array the array to check
+ * @return whether the array is sorted according to natural ordering
* @since 3.4
*/
public static boolean isSorted(final boolean[] array) {
@@ -3890,8 +3891,8 @@ public static boolean isSorted(final boolean[] array) {
/**
* Tests 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.
+ * @param array the array to check
+ * @return whether the array is sorted according to natural ordering
* @since 3.4
*/
public static boolean isSorted(final byte[] array) {
@@ -3913,8 +3914,8 @@ public static boolean isSorted(final byte[] array) {
/**
* Tests 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.
+ * @param array the array to check
+ * @return whether the array is sorted according to natural ordering
* @since 3.4
*/
public static boolean isSorted(final char[] array) {
@@ -3936,8 +3937,8 @@ public static boolean isSorted(final char[] array) {
/**
* Tests 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.
+ * @param array the array to check
+ * @return whether the array is sorted according to natural ordering
* @since 3.4
*/
public static boolean isSorted(final double[] array) {
@@ -3959,8 +3960,8 @@ public static boolean isSorted(final double[] array) {
/**
* Tests 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.
+ * @param array the array to check
+ * @return whether the array is sorted according to natural ordering
* @since 3.4
*/
public static boolean isSorted(final float[] array) {
@@ -3982,8 +3983,8 @@ public static boolean isSorted(final float[] array) {
/**
* Tests 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.
+ * @param array the array to check
+ * @return whether the array is sorted according to natural ordering
* @since 3.4
*/
public static boolean isSorted(final int[] array) {
@@ -4005,8 +4006,8 @@ public static boolean isSorted(final int[] array) {
/**
* Tests 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.
+ * @param array the array to check
+ * @return whether the array is sorted according to natural ordering
* @since 3.4
*/
public static boolean isSorted(final long[] array) {
@@ -4028,8 +4029,8 @@ public static boolean isSorted(final long[] array) {
/**
* Tests 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.
+ * @param array the array to check
+ * @return whether the array is sorted according to natural ordering
* @since 3.4
*/
public static boolean isSorted(final short[] array) {
@@ -4052,9 +4053,9 @@ public static boolean isSorted(final short[] array) {
* Tests whether the provided array is sorted according to the class's
* {@code compareTo} method.
*
- * @param array the array to check.
- * @param the datatype of the array to check, it must implement {@link Comparable}.
- * @return whether the array is sorted.
+ * @param array the array to check
+ * @param the datatype of the array to check, it must implement {@link Comparable}
+ * @return whether the array is sorted
* @since 3.4
*/
public static > boolean isSorted(final T[] array) {
@@ -4064,11 +4065,11 @@ public static > boolean isSorted(final T[] array
/**
* Tests whether the provided array is sorted according to the provided {@link Comparator}.
*
- * @param array the array to check.
- * @param comparator the {@link Comparator} to compare over.
- * @param the datatype of the array.
- * @return whether the array is sorted.
- * @throws NullPointerException if {@code comparator} is {@code null}.
+ * @param array the array to check
+ * @param comparator the {@link Comparator} to compare over
+ * @param the datatype of the array
+ * @return whether the array is sorted
+ * @throws NullPointerException if {@code comparator} is {@code null}
* @since 3.4
*/
public static boolean isSorted(final T[] array, final Comparator comparator) {
@@ -4094,9 +4095,9 @@ public static boolean isSorted(final T[] array, final Comparator comparat
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) if {@code null} array input.
*
*
- * @param array the array to traverse backwards looking for the object, may be {@code null}.
- * @param valueToFind the object to find.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse backwards looking for the object, may be {@code null}
+ * @param valueToFind the object to find
+ * @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(final boolean[] array, final boolean valueToFind) {
return lastIndexOf(array, valueToFind, Integer.MAX_VALUE);
@@ -4111,10 +4112,10 @@ public static int lastIndexOf(final boolean[] array, final boolean valueToFind)
* 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.
*
*
- * @param array the array to traverse for looking for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the start index to traverse backwards from.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse for looking for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the start index to traverse backwards from
+ * @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(final boolean[] array, final boolean valueToFind, int startIndex) {
if (isEmpty(array) || startIndex < 0) {
@@ -4137,9 +4138,9 @@ public static int lastIndexOf(final boolean[] array, final boolean valueToFind,
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to traverse backwards looking for the object, may be {@code null}.
- * @param valueToFind the object to find.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse backwards looking for the object, may be {@code null}
+ * @param valueToFind the object to find
+ * @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(final byte[] array, final byte valueToFind) {
return lastIndexOf(array, valueToFind, Integer.MAX_VALUE);
@@ -4154,10 +4155,10 @@ public static int lastIndexOf(final byte[] array, final byte valueToFind) {
* 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.
*
*
- * @param array the array to traverse for looking for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the start index to traverse backwards from.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse for looking for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the start index to traverse backwards from
+ * @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(final byte[] array, final byte valueToFind, int startIndex) {
if (array == null || startIndex < 0) {
@@ -4180,9 +4181,9 @@ public static int lastIndexOf(final byte[] array, final byte valueToFind, int st
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to traverse backwards looking for the object, may be {@code null}.
- * @param valueToFind the object to find.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse backwards looking for the object, may be {@code null}
+ * @param valueToFind the object to find
+ * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
* @since 2.1
*/
public static int lastIndexOf(final char[] array, final char valueToFind) {
@@ -4198,10 +4199,10 @@ public static int lastIndexOf(final char[] array, final char valueToFind) {
* 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.
*
*
- * @param array the array to traverse for looking for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the start index to traverse backwards from.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse for looking for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the start index to traverse backwards from
+ * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input
* @since 2.1
*/
public static int lastIndexOf(final char[] array, final char valueToFind, int startIndex) {
@@ -4225,9 +4226,9 @@ public static int lastIndexOf(final char[] array, final char valueToFind, int st
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to traverse backwards looking for the object, may be {@code null}.
- * @param valueToFind the object to find.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse backwards looking for the object, may be {@code null}
+ * @param valueToFind the object to find
+ * @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(final double[] array, final double valueToFind) {
return lastIndexOf(array, valueToFind, Integer.MAX_VALUE);
@@ -4240,10 +4241,10 @@ public static int lastIndexOf(final double[] array, final double valueToFind) {
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to search for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param tolerance tolerance of the search.
- * @return the index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to search for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param tolerance tolerance of the search
+ * @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(final double[] array, final double valueToFind, final double tolerance) {
return lastIndexOf(array, valueToFind, Integer.MAX_VALUE, tolerance);
@@ -4258,10 +4259,10 @@ public static int lastIndexOf(final double[] array, final double valueToFind, fi
* 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.
*
*
- * @param array the array to traverse for looking for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the start index to traverse backwards from.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse for looking for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the start index to traverse backwards from
+ * @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(final double[] array, final double valueToFind, int startIndex) {
if (isEmpty(array) || startIndex < 0) {
@@ -4288,11 +4289,11 @@ public static int lastIndexOf(final double[] array, final double valueToFind, in
* 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.
*
*
- * @param array the array to traverse for looking for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the start index to traverse backwards from.
- * @param tolerance search for value within plus/minus this amount.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse for looking for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the start index to traverse backwards from
+ * @param tolerance search for value within plus/minus this amount
+ * @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(final double[] array, final double valueToFind, int startIndex, final double tolerance) {
if (isEmpty(array) || startIndex < 0) {
@@ -4317,9 +4318,9 @@ public static int lastIndexOf(final double[] array, final double valueToFind, in
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to traverse backwards looking for the object, may be {@code null}.
- * @param valueToFind the object to find.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse backwards looking for the object, may be {@code null}
+ * @param valueToFind the object to find
+ * @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(final float[] array, final float valueToFind) {
return lastIndexOf(array, valueToFind, Integer.MAX_VALUE);
@@ -4334,10 +4335,10 @@ public static int lastIndexOf(final float[] array, final float valueToFind) {
* 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.
*
*
- * @param array the array to traverse for looking for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the start index to traverse backwards from.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse for looking for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the start index to traverse backwards from
+ * @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(final float[] array, final float valueToFind, int startIndex) {
if (isEmpty(array) || startIndex < 0) {
@@ -4360,9 +4361,9 @@ public static int lastIndexOf(final float[] array, final float valueToFind, int
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to traverse backwards looking for the object, may be {@code null}.
- * @param valueToFind the object to find.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse backwards looking for the object, may be {@code null}
+ * @param valueToFind the object to find
+ * @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(final int[] array, final int valueToFind) {
return lastIndexOf(array, valueToFind, Integer.MAX_VALUE);
@@ -4377,10 +4378,10 @@ public static int lastIndexOf(final int[] array, final int valueToFind) {
* 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.
*
*
- * @param array the array to traverse for looking for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the start index to traverse backwards from.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse for looking for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the start index to traverse backwards from
+ * @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(final int[] array, final int valueToFind, int startIndex) {
if (array == null || startIndex < 0) {
@@ -4403,9 +4404,9 @@ public static int lastIndexOf(final int[] array, final int valueToFind, int star
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to traverse backwards looking for the object, may be {@code null}.
- * @param valueToFind the object to find.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse backwards looking for the object, may be {@code null}
+ * @param valueToFind the object to find
+ * @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(final long[] array, final long valueToFind) {
return lastIndexOf(array, valueToFind, Integer.MAX_VALUE);
@@ -4420,10 +4421,10 @@ public static int lastIndexOf(final long[] array, final long valueToFind) {
* 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.
*
*
- * @param array the array to traverse for looking for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the start index to traverse backwards from.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse for looking for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the start index to traverse backwards from
+ * @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(final long[] array, final long valueToFind, int startIndex) {
if (array == null || startIndex < 0) {
@@ -4446,9 +4447,9 @@ public static int lastIndexOf(final long[] array, final long valueToFind, int st
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to traverse backwards looking for the object, may be {@code null}.
- * @param objectToFind the object to find, may be {@code null}.
- * @return the last index of the object within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse backwards looking for the object, may be {@code null}
+ * @param objectToFind the object to find, may be {@code null}
+ * @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(final Object[] array, final Object objectToFind) {
return lastIndexOf(array, objectToFind, Integer.MAX_VALUE);
@@ -4463,10 +4464,10 @@ public static int lastIndexOf(final Object[] array, final Object objectToFind) {
* 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.
*
*
- * @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}.
- * @param startIndex the start index to traverse backwards from.
- * @return the last index of the object within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @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}
+ * @param startIndex the start index to traverse backwards from
+ * @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(final Object[] array, final Object objectToFind, int startIndex) {
if (array == null || startIndex < 0) {
@@ -4497,9 +4498,9 @@ public static int lastIndexOf(final Object[] array, final Object objectToFind, i
* This method returns {@link #INDEX_NOT_FOUND} ({@code -1}) for a {@code null} input array.
*
*
- * @param array the array to traverse backwards looking for the object, may be {@code null}.
- * @param valueToFind the object to find.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse backwards looking for the object, may be {@code null}
+ * @param valueToFind the object to find
+ * @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(final short[] array, final short valueToFind) {
return lastIndexOf(array, valueToFind, Integer.MAX_VALUE);
@@ -4514,10 +4515,10 @@ public static int lastIndexOf(final short[] array, final short valueToFind) {
* 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.
*
*
- * @param array the array to traverse for looking for the object, may be {@code null}.
- * @param valueToFind the value to find.
- * @param startIndex the start index to traverse backwards from.
- * @return the last index of the value within the array, {@link #INDEX_NOT_FOUND} ({@code -1}) if not found or {@code null} array input.
+ * @param array the array to traverse for looking for the object, may be {@code null}
+ * @param valueToFind the value to find
+ * @param startIndex the start index to traverse backwards from
+ * @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(final short[] array, final short valueToFind, int startIndex) {
if (array == null || startIndex < 0) {
@@ -4537,14 +4538,14 @@ public static int lastIndexOf(final short[] array, final short valueToFind, int
/**
* Maps elements from an array into elements of a new array of a given type, while mapping old elements to new elements.
*
- * @param The input array type.
- * @param The output array type.
- * @param The type of exceptions thrown when the mapper function fails.
- * @param array The input array.
- * @param componentType the component type of the result array.
- * @param mapper a non-interfering, stateless function to apply to each element.
- * @return a new array.
- * @throws E Thrown when the mapper function fails.
+ * @param the input array type
+ * @param the output array type
+ * @param the type of exceptions thrown when the mapper function fails
+ * @param array the input array
+ * @param componentType the component type of the result array
+ * @param mapper a non-interfering, stateless function to apply to each element
+ * @return a new array
+ * @throws E thrown when the mapper function fails
*/
private static R[] map(final T[] array, final Class componentType, final FailableFunction super T, ? extends R, E> mapper)
throws E {
@@ -4558,11 +4559,11 @@ private static int max0(final int other) {
/**
* Delegates to {@link Array#newInstance(Class,int)} using generics.
*
- * @param The array type.
- * @param componentType The array class.
+ * @param the array type
+ * @param componentType the array class
* @param length the array length
- * @return The new array.
- * @throws NullPointerException if the specified {@code componentType} parameter is null.
+ * @return the new array
+ * @throws NullPointerException if the specified {@code componentType} parameter is null
* @since 3.13.0
*/
@SuppressWarnings("unchecked") // OK, because array and values are of type T
@@ -4581,10 +4582,10 @@ public static T[] newInstance(final Class componentType, final int length
* the empty {@code public static} references in this class.
*
*
- * @param The array type.
+ * @param the array type
* @param array the array to check for {@code null} or empty
- * @param defaultArray A default array, usually empty.
- * @return the same array, or defaultArray if {@code null} or empty input.
+ * @param defaultArray a default array, usually empty
+ * @return the same array, or defaultArray if {@code null} or empty input
* @since 3.15.0
*/
public static T[] nullTo(final T[] array, final T[] defaultArray) {
@@ -4602,8 +4603,8 @@ public static T[] nullTo(final T[] array, final T[] defaultArray) {
* 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.
+ * @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
* @since 2.5
*/
public static boolean[] nullToEmpty(final boolean[] array) {
@@ -4621,8 +4622,8 @@ public static boolean[] nullToEmpty(final boolean[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static Boolean[] nullToEmpty(final Boolean[] array) {
@@ -4640,8 +4641,8 @@ public static Boolean[] nullToEmpty(final Boolean[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static byte[] nullToEmpty(final byte[] array) {
@@ -4659,8 +4660,8 @@ public static byte[] nullToEmpty(final byte[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static Byte[] nullToEmpty(final Byte[] array) {
@@ -4678,8 +4679,8 @@ public static Byte[] nullToEmpty(final Byte[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static char[] nullToEmpty(final char[] array) {
@@ -4697,8 +4698,8 @@ public static char[] nullToEmpty(final char[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static Character[] nullToEmpty(final Character[] array) {
@@ -4716,8 +4717,8 @@ public static Character[] nullToEmpty(final Character[] array) {
* 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.
+ * @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
* @since 3.2
*/
public static Class>[] nullToEmpty(final Class>[] array) {
@@ -4735,8 +4736,8 @@ public static Class>[] nullToEmpty(final Class>[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static double[] nullToEmpty(final double[] array) {
@@ -4754,8 +4755,8 @@ public static double[] nullToEmpty(final double[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static Double[] nullToEmpty(final Double[] array) {
@@ -4773,8 +4774,8 @@ public static Double[] nullToEmpty(final Double[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static float[] nullToEmpty(final float[] array) {
@@ -4792,8 +4793,8 @@ public static float[] nullToEmpty(final float[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static Float[] nullToEmpty(final Float[] array) {
@@ -4811,8 +4812,8 @@ public static Float[] nullToEmpty(final Float[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static int[] nullToEmpty(final int[] array) {
@@ -4830,8 +4831,8 @@ public static int[] nullToEmpty(final int[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static Integer[] nullToEmpty(final Integer[] array) {
@@ -4849,8 +4850,8 @@ public static Integer[] nullToEmpty(final Integer[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static long[] nullToEmpty(final long[] array) {
@@ -4868,8 +4869,8 @@ public static long[] nullToEmpty(final long[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static Long[] nullToEmpty(final Long[] array) {
@@ -4887,8 +4888,8 @@ public static Long[] nullToEmpty(final Long[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static Object[] nullToEmpty(final Object[] array) {
@@ -4906,8 +4907,8 @@ public static Object[] nullToEmpty(final Object[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static short[] nullToEmpty(final short[] array) {
@@ -4925,8 +4926,8 @@ public static short[] nullToEmpty(final short[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static Short[] nullToEmpty(final Short[] array) {
@@ -4944,8 +4945,8 @@ public static Short[] nullToEmpty(final Short[] array) {
* 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.
+ * @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
* @since 2.5
*/
public static String[] nullToEmpty(final String[] array) {
@@ -4959,11 +4960,11 @@ public static String[] nullToEmpty(final String[] 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.
+ * @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
*/
public static T[] nullToEmpty(final T[] array, final Class type) {
@@ -4979,7 +4980,7 @@ public static T[] nullToEmpty(final T[] array, final Class type) {
/**
* Gets the {@link ThreadLocalRandom} for {@code shuffle} methods that don't take a {@link Random} argument.
*
- * @return the current ThreadLocalRandom.
+ * @return the current ThreadLocalRandom
*/
private static ThreadLocalRandom random() {
return ThreadLocalRandom.current();
@@ -5003,10 +5004,10 @@ private static ThreadLocalRandom random() {
* ArrayUtils.remove([true, true, false], 1) = [true, false]
*
*
- * @param array the array to remove the element from, may not be {@code null}.
- * @param index the position of the element to be removed.
- * @return A new array containing the existing elements except the element at the specified position.
- * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param index the position of the element to be removed
+ * @return a new array containing the existing elements except the element at the specified position
+ * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 2.1
*/
public static boolean[] remove(final boolean[] array, final int index) {
@@ -5031,10 +5032,10 @@ public static boolean[] remove(final boolean[] array, final int index) {
* ArrayUtils.remove([1, 0, 1], 1) = [1, 1]
*
*
- * @param array the array to remove the element from, may not be {@code null}.
- * @param index the position of the element to be removed.
- * @return A new array containing the existing elements except the element at the specified position.
- * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param index the position of the element to be removed
+ * @return a new array containing the existing elements except the element at the specified position
+ * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 2.1
*/
public static byte[] remove(final byte[] array, final int index) {
@@ -5059,10 +5060,10 @@ public static byte[] remove(final byte[] array, final int index) {
* ArrayUtils.remove(['a', 'b', 'c'], 1) = ['a', 'c']
*
*
- * @param array the array to remove the element from, may not be {@code null}.
- * @param index the position of the element to be removed.
- * @return A new array containing the existing elements except the element at the specified position.
- * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param index the position of the element to be removed
+ * @return a new array containing the existing elements except the element at the specified position
+ * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 2.1
*/
public static char[] remove(final char[] array, final int index) {
@@ -5087,10 +5088,10 @@ public static char[] remove(final char[] array, final int index) {
* ArrayUtils.remove([2.5, 6.0, 3.8], 1) = [2.5, 3.8]
*
*
- * @param array the array to remove the element from, may not be {@code null}.
- * @param index the position of the element to be removed.
- * @return A new array containing the existing elements except the element at the specified position.
- * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param index the position of the element to be removed
+ * @return a new array containing the existing elements except the element at the specified position
+ * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 2.1
*/
public static double[] remove(final double[] array, final int index) {
@@ -5115,10 +5116,10 @@ public static double[] remove(final double[] array, final int index) {
* ArrayUtils.remove([2.5, 6.0, 3.8], 1) = [2.5, 3.8]
*
*
- * @param array the array to remove the element from, may not be {@code null}.
- * @param index the position of the element to be removed.
- * @return A new array containing the existing elements except the element at the specified position.
- * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param index the position of the element to be removed
+ * @return a new array containing the existing elements except the element at the specified position
+ * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 2.1
*/
public static float[] remove(final float[] array, final int index) {
@@ -5143,10 +5144,10 @@ public static float[] remove(final float[] array, final int index) {
* ArrayUtils.remove([2, 6, 3], 1) = [2, 3]
*
*
- * @param array the array to remove the element from, may not be {@code null}.
- * @param index the position of the element to be removed.
- * @return A new array containing the existing elements except the element at the specified position.
- * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param index the position of the element to be removed
+ * @return a new array containing the existing elements except the element at the specified position
+ * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 2.1
*/
public static int[] remove(final int[] array, final int index) {
@@ -5171,10 +5172,10 @@ public static int[] remove(final int[] array, final int index) {
* ArrayUtils.remove([2, 6, 3], 1) = [2, 3]
*
*
- * @param array the array to remove the element from, may not be {@code null}.
- * @param index the position of the element to be removed.
- * @return A new array containing the existing elements except the element at the specified position.
- * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param index the position of the element to be removed
+ * @return a new array containing the existing elements except the element at the specified position
+ * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 2.1
*/
public static long[] remove(final long[] array, final int index) {
@@ -5192,10 +5193,10 @@ public static long[] remove(final long[] array, final int index) {
* If the input array is {@code null}, an IndexOutOfBoundsException 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.
- * @return A new array containing the existing elements except the element at the specified position.
- * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param index the position of the element to be removed
+ * @return a new array containing the existing elements except the element at the specified position
+ * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 2.1
*/
private static Object remove(final Object array, final int index) {
@@ -5229,10 +5230,10 @@ private static Object remove(final Object array, final int index) {
* ArrayUtils.remove([2, 6, 3], 1) = [2, 3]
*
*
- * @param array the array to remove the element from, may not be {@code null}.
- * @param index the position of the element to be removed.
- * @return A new array containing the existing elements except the element at the specified position.
- * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param index the position of the element to be removed
+ * @return a new array containing the existing elements except the element at the specified position
+ * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 2.1
*/
public static short[] remove(final short[] array, final int index) {
@@ -5257,11 +5258,11 @@ public static short[] remove(final short[] array, final int index) {
* ArrayUtils.remove(["a", "b", "c"], 1) = ["a", "c"]
*
*
- * @param the component type of the array.
- * @param array the array to remove the element from, may not be {@code null}.
- * @param index the position of the element to be removed.
- * @return A new array containing the existing elements except the element at the specified position.
- * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param the component type of the array
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param index the position of the element to be removed
+ * @return a new array containing the existing elements except the element at the specified position
+ * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 2.1
*/
@SuppressWarnings("unchecked") // remove() always creates an array of the same type as its input
@@ -5284,10 +5285,10 @@ public static T[] remove(final T[] array, final int index) {
* ArrayUtils.removeAll([true, false, true], 1, 2) = [true]
*
*
- * @param array the array to remove the element from, may not be {@code null}.
- * @param indices the positions of the elements to be removed.
- * @return A new array containing the existing elements except those at the specified positions.
- * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param indices the positions of the elements to be removed
+ * @return a new array containing the existing elements except those at the specified positions
+ * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 3.0.1
*/
public static boolean[] removeAll(final boolean[] array, final int... indices) {
@@ -5313,10 +5314,10 @@ public static boolean[] removeAll(final boolean[] array, final int... indices) {
* ArrayUtils.removeAll([2, 6, 3], 0, 1, 2) = []
*
*
- * @param array the array to remove the element from, may not be {@code null}.
- * @param indices the positions of the elements to be removed.
- * @return A new array containing the existing elements except those at the specified positions.
- * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param indices the positions of the elements to be removed
+ * @return a new array containing the existing elements except those at the specified positions
+ * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 3.0.1
*/
public static byte[] removeAll(final byte[] array, final int... indices) {
@@ -5342,10 +5343,10 @@ public static byte[] removeAll(final byte[] array, final int... indices) {
* ArrayUtils.removeAll([2, 6, 3], 0, 1, 2) = []
*
*
- * @param array the array to remove the element from, may not be {@code null}.
- * @param indices the positions of the elements to be removed.
- * @return A new array containing the existing elements except those at the specified positions.
- * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param indices the positions of the elements to be removed
+ * @return a new array containing the existing elements except those at the specified positions
+ * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 3.0.1
*/
public static char[] removeAll(final char[] array, final int... indices) {
@@ -5371,10 +5372,10 @@ public static char[] removeAll(final char[] array, final int... indices) {
* ArrayUtils.removeAll([2, 6, 3], 0, 1, 2) = []
*
*
- * @param array the array to remove the element from, may not be {@code null}.
- * @param indices the positions of the elements to be removed.
- * @return A new array containing the existing elements except those at the specified positions.
- * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param indices the positions of the elements to be removed
+ * @return a new array containing the existing elements except those at the specified positions
+ * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 3.0.1
*/
public static double[] removeAll(final double[] array, final int... indices) {
@@ -5400,10 +5401,10 @@ public static double[] removeAll(final double[] array, final int... indices) {
* ArrayUtils.removeAll([2, 6, 3], 0, 1, 2) = []
*
*
- * @param array the array to remove the element from, may not be {@code null}.
- * @param indices the positions of the elements to be removed.
- * @return A new array containing the existing elements except those at the specified positions.
- * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param indices the positions of the elements to be removed
+ * @return a new array containing the existing elements except those at the specified positions
+ * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 3.0.1
*/
public static float[] removeAll(final float[] array, final int... indices) {
@@ -5429,10 +5430,10 @@ public static float[] removeAll(final float[] array, final int... indices) {
* ArrayUtils.removeAll([2, 6, 3], 0, 1, 2) = []
*
*
- * @param array the array to remove the element from, may not be {@code null}.
- * @param indices the positions of the elements to be removed.
- * @return A new array containing the existing elements except those at the specified positions.
- * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param indices the positions of the elements to be removed
+ * @return a new array containing the existing elements except those at the specified positions
+ * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 3.0.1
*/
public static int[] removeAll(final int[] array, final int... indices) {
@@ -5458,10 +5459,10 @@ public static int[] removeAll(final int[] array, final int... indices) {
* ArrayUtils.removeAll([2, 6, 3], 0, 1, 2) = []
*
*
- * @param array the array to remove the element from, may not be {@code null}.
- * @param indices the positions of the elements to be removed.
- * @return A new array containing the existing elements except those at the specified positions.
- * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param indices the positions of the elements to be removed
+ * @return a new array containing the existing elements except those at the specified positions
+ * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 3.0.1
*/
public static long[] removeAll(final long[] array, final int... indices) {
@@ -5540,10 +5541,10 @@ static Object removeAll(final Object array, final int... indices) {
* ArrayUtils.removeAll([2, 6, 3], 0, 1, 2) = []
*
*
- * @param array the array to remove the element from, may not be {@code null}.
- * @param indices the positions of the elements to be removed.
- * @return A new array containing the existing elements except those at the specified positions.
- * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param indices the positions of the elements to be removed
+ * @return a new array containing the existing elements except those at the specified positions
+ * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 3.0.1
*/
public static short[] removeAll(final short[] array, final int... indices) {
@@ -5565,11 +5566,11 @@ public static short[] removeAll(final short[] array, final int... indices) {
* ArrayUtils.removeAll(["a", "b", "c"], 1, 2) = ["a"]
*
*
- * @param the component type of the array.
- * @param array the array to remove the element from, may not be {@code null}.
- * @param indices the positions of the elements to be removed.
- * @return A new array containing the existing elements except those at the specified positions.
- * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}.
+ * @param the component type of the array
+ * @param array the array to remove the element from, may not be {@code null}
+ * @param indices the positions of the elements to be removed
+ * @return a new array containing the existing elements except those at the specified positions
+ * @throws IndexOutOfBoundsException if any index is out of range (index < 0 || index >= array.length), or if the array is {@code null}
* @since 3.0.1
*/
@SuppressWarnings("unchecked") // removeAll() always creates an array of the same type as its input
@@ -5585,9 +5586,9 @@ public static T[] removeAll(final T[] array, final int... indices) {
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.5
* @deprecated Use {@link #removeAllOccurrences(boolean[], boolean)}.
*/
@@ -5604,9 +5605,9 @@ public static boolean[] removeAllOccurences(final boolean[] array, final boolean
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.5
* @deprecated Use {@link #removeAllOccurrences(byte[], byte)}.
*/
@@ -5623,9 +5624,9 @@ public static byte[] removeAllOccurences(final byte[] array, final byte element)
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.5
* @deprecated Use {@link #removeAllOccurrences(char[], char)}.
*/
@@ -5642,9 +5643,9 @@ public static char[] removeAllOccurences(final char[] array, final char element)
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.5
* @deprecated Use {@link #removeAllOccurrences(double[], double)}.
*/
@@ -5661,9 +5662,9 @@ public static double[] removeAllOccurences(final double[] array, final double el
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.5
* @deprecated Use {@link #removeAllOccurrences(float[], float)}.
*/
@@ -5680,9 +5681,9 @@ public static float[] removeAllOccurences(final float[] array, final float eleme
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.5
* @deprecated Use {@link #removeAllOccurrences(int[], int)}.
*/
@@ -5699,9 +5700,9 @@ public static int[] removeAllOccurences(final int[] array, final int element) {
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.5
* @deprecated Use {@link #removeAllOccurrences(long[], long)}.
*/
@@ -5718,9 +5719,9 @@ public static long[] removeAllOccurences(final long[] array, final long element)
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.5
* @deprecated Use {@link #removeAllOccurrences(short[], short)}.
*/
@@ -5737,10 +5738,10 @@ public static short[] removeAllOccurences(final short[] array, final short eleme
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param the type of object in the array, may be {@code null}.
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove, may be {@code null}.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param the type of object in the array, may be {@code null}
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove, may be {@code null}
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.5
* @deprecated Use {@link #removeAllOccurrences(Object[], Object)}.
*/
@@ -5757,9 +5758,9 @@ public static T[] removeAllOccurences(final T[] array, final T element) {
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.10
*/
public static boolean[] removeAllOccurrences(final boolean[] array, final boolean element) {
@@ -5774,9 +5775,9 @@ public static boolean[] removeAllOccurrences(final boolean[] array, final boolea
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.10
*/
public static byte[] removeAllOccurrences(final byte[] array, final byte element) {
@@ -5791,9 +5792,9 @@ public static byte[] removeAllOccurrences(final byte[] array, final byte element
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.10
*/
public static char[] removeAllOccurrences(final char[] array, final char element) {
@@ -5808,9 +5809,9 @@ public static char[] removeAllOccurrences(final char[] array, final char element
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.10
*/
public static double[] removeAllOccurrences(final double[] array, final double element) {
@@ -5825,9 +5826,9 @@ public static double[] removeAllOccurrences(final double[] array, final double e
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.10
*/
public static float[] removeAllOccurrences(final float[] array, final float element) {
@@ -5842,9 +5843,9 @@ public static float[] removeAllOccurrences(final float[] array, final float elem
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.10
*/
public static int[] removeAllOccurrences(final int[] array, final int element) {
@@ -5859,9 +5860,9 @@ public static int[] removeAllOccurrences(final int[] array, final int element) {
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.10
*/
public static long[] removeAllOccurrences(final long[] array, final long element) {
@@ -5876,9 +5877,9 @@ public static long[] removeAllOccurrences(final long[] array, final long element
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.10
*/
public static short[] removeAllOccurrences(final short[] array, final short element) {
@@ -5893,10 +5894,10 @@ public static short[] removeAllOccurrences(final short[] array, final short elem
* {@code null} will be returned if the input array is {@code null}.
*
*
- * @param the type of object in the array, may be {@code null}.
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param element the element to remove, may be {@code null}.
- * @return A new array containing the existing elements except the occurrences of the specified element.
+ * @param the type of object in the array, may be {@code null}
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param element the element to remove, may be {@code null}
+ * @return a new array containing the existing elements except the occurrences of the specified element
* @since 3.10
*/
public static T[] removeAllOccurrences(final T[] array, final T element) {
@@ -5906,9 +5907,9 @@ public static T[] removeAllOccurrences(final T[] array, final T element) {
/**
* Removes multiple array elements specified by indices.
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param indices to remove.
- * @return new array of same type minus elements specified by the set bits in {@code indices}.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param indices to remove
+ * @return new array of same type minus elements specified by the set bits in {@code indices}
*/
// package protected for access by unit tests
static Object removeAt(final Object array, final BitSet indices) {
@@ -5962,10 +5963,10 @@ static Object removeAt(final Object array, final BitSet indices) {
* ArrayUtils.removeElement([true, false, true], true) = [false, true]
*
*
- * @param array the input array, may be {@code null}.
- * @param element the element to be removed.
- * @return A new array containing the existing elements except the first
- * occurrence of the specified element.
+ * @param array the input array, may be {@code null}
+ * @param element the element to be removed
+ * @return a new array containing the existing elements except the first
+ * occurrence of the specified element
* @since 2.1
*/
public static boolean[] removeElement(final boolean[] array, final boolean element) {
@@ -5992,10 +5993,10 @@ public static boolean[] removeElement(final boolean[] array, final boolean eleme
* ArrayUtils.removeElement([1, 0, 1], 1) = [0, 1]
*
*
- * @param array the input array, may be {@code null}.
- * @param element the element to be removed.
- * @return A new array containing the existing elements except the first
- * occurrence of the specified element.
+ * @param array the input array, may be {@code null}
+ * @param element the element to be removed
+ * @return a new array containing the existing elements except the first
+ * occurrence of the specified element
* @since 2.1
*/
public static byte[] removeElement(final byte[] array, final byte element) {
@@ -6022,10 +6023,10 @@ public static byte[] removeElement(final byte[] array, final byte element) {
* ArrayUtils.removeElement(['a', 'b', 'a'], 'a') = ['b', 'a']
*
*
- * @param array the input array, may be {@code null}.
- * @param element the element to be removed.
- * @return A new array containing the existing elements except the first
- * occurrence of the specified element.
+ * @param array the input array, may be {@code null}
+ * @param element the element to be removed
+ * @return a new array containing the existing elements except the first
+ * occurrence of the specified element
* @since 2.1
*/
public static char[] removeElement(final char[] array, final char element) {
@@ -6052,10 +6053,10 @@ public static char[] removeElement(final char[] array, final char element) {
* ArrayUtils.removeElement([1.1, 2.3, 1.1], 1.1) = [2.3, 1.1]
*
*
- * @param array the input array, may be {@code null}.
- * @param element the element to be removed.
- * @return A new array containing the existing elements except the first
- * occurrence of the specified element.
+ * @param array the input array, may be {@code null}
+ * @param element the element to be removed
+ * @return a new array containing the existing elements except the first
+ * occurrence of the specified element
* @since 2.1
*/
public static double[] removeElement(final double[] array, final double element) {
@@ -6082,10 +6083,10 @@ public static double[] removeElement(final double[] array, final double element)
* ArrayUtils.removeElement([1.1, 2.3, 1.1], 1.1) = [2.3, 1.1]
*
*
- * @param array the input array, may be {@code null}.
- * @param element the element to be removed.
- * @return A new array containing the existing elements except the first
- * occurrence of the specified element.
+ * @param array the input array, may be {@code null}
+ * @param element the element to be removed
+ * @return a new array containing the existing elements except the first
+ * occurrence of the specified element
* @since 2.1
*/
public static float[] removeElement(final float[] array, final float element) {
@@ -6112,10 +6113,10 @@ public static float[] removeElement(final float[] array, final float element) {
* ArrayUtils.removeElement([1, 3, 1], 1) = [3, 1]
*
*
- * @param array the input array, may be {@code null}.
- * @param element the element to be removed.
- * @return A new array containing the existing elements except the first
- * occurrence of the specified element.
+ * @param array the input array, may be {@code null}
+ * @param element the element to be removed
+ * @return a new array containing the existing elements except the first
+ * occurrence of the specified element
* @since 2.1
*/
public static int[] removeElement(final int[] array, final int element) {
@@ -6142,10 +6143,10 @@ public static int[] removeElement(final int[] array, final int element) {
* ArrayUtils.removeElement([1, 3, 1], 1) = [3, 1]
*
*
- * @param array the input array, may be {@code null}.
- * @param element the element to be removed.
- * @return A new array containing the existing elements except the first
- * occurrence of the specified element.
+ * @param array the input array, may be {@code null}
+ * @param element the element to be removed
+ * @return a new array containing the existing elements except the first
+ * occurrence of the specified element
* @since 2.1
*/
public static long[] removeElement(final long[] array, final long element) {
@@ -6172,10 +6173,10 @@ public static long[] removeElement(final long[] array, final long element) {
* ArrayUtils.removeElement([1, 3, 1], 1) = [3, 1]
*
*
- * @param array the input array, may be {@code null}.
- * @param element the element to be removed.
- * @return A new array containing the existing elements except the first
- * occurrence of the specified element.
+ * @param array the input array, may be {@code null}
+ * @param element the element to be removed
+ * @return a new array containing the existing elements except the first
+ * occurrence of the specified element
* @since 2.1
*/
public static short[] removeElement(final short[] array, final short element) {
@@ -6203,10 +6204,10 @@ public static short[] removeElement(final short[] array, final short element) {
*
*
* @param the component type of the array
- * @param array the input array, may be {@code null}.
- * @param element the element to be removed, may be {@code null}.
- * @return A new array containing the existing elements except the first
- * occurrence of the specified element.
+ * @param array the input array, may be {@code null}
+ * @param element the element to be removed, may be {@code null}
+ * @return a new array containing the existing elements except the first
+ * occurrence of the specified element
* @since 2.1
*/
public static T[] removeElement(final T[] array, final Object element) {
@@ -6235,10 +6236,10 @@ public static T[] removeElement(final T[] array, final Object element) {
* ArrayUtils.removeElements([true, false, true], true, true) = [false]
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param values the values to be removed.
- * @return A new array containing the existing elements except the
- * earliest-encountered occurrences of the specified elements.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param values the values to be removed
+ * @return a new array containing the existing elements except the
+ * earliest-encountered occurrences of the specified elements
* @since 3.0.1
*/
public static boolean[] removeElements(final boolean[] array, final boolean... values) {
@@ -6284,10 +6285,10 @@ public static boolean[] removeElements(final boolean[] array, final boolean... v
* ArrayUtils.removeElements([1, 3, 1], 1, 1) = [3]
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param values the values to be removed.
- * @return A new array containing the existing elements except the
- * earliest-encountered occurrences of the specified elements.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param values the values to be removed
+ * @return a new array containing the existing elements except the
+ * earliest-encountered occurrences of the specified elements
* @since 3.0.1
*/
public static byte[] removeElements(final byte[] array, final byte... values) {
@@ -6333,10 +6334,10 @@ public static byte[] removeElements(final byte[] array, final byte... values) {
* ArrayUtils.removeElements([1, 3, 1], 1, 1) = [3]
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param values the values to be removed.
- * @return A new array containing the existing elements except the
- * earliest-encountered occurrences of the specified elements.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param values the values to be removed
+ * @return a new array containing the existing elements except the
+ * earliest-encountered occurrences of the specified elements
* @since 3.0.1
*/
public static char[] removeElements(final char[] array, final char... values) {
@@ -6382,10 +6383,10 @@ public static char[] removeElements(final char[] array, final char... values) {
* ArrayUtils.removeElements([1, 3, 1], 1, 1) = [3]
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param values the values to be removed.
- * @return A new array containing the existing elements except the
- * earliest-encountered occurrences of the specified elements.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param values the values to be removed
+ * @return a new array containing the existing elements except the
+ * earliest-encountered occurrences of the specified elements
* @since 3.0.1
*/
public static double[] removeElements(final double[] array, final double... values) {
@@ -6431,10 +6432,10 @@ public static double[] removeElements(final double[] array, final double... valu
* ArrayUtils.removeElements([1, 3, 1], 1, 1) = [3]
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param values the values to be removed.
- * @return A new array containing the existing elements except the
- * earliest-encountered occurrences of the specified elements.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param values the values to be removed
+ * @return a new array containing the existing elements except the
+ * earliest-encountered occurrences of the specified elements
* @since 3.0.1
*/
public static float[] removeElements(final float[] array, final float... values) {
@@ -6480,10 +6481,10 @@ public static float[] removeElements(final float[] array, final float... values)
* ArrayUtils.removeElements([1, 3, 1], 1, 1) = [3]
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param values the values to be removed.
- * @return A new array containing the existing elements except the
- * earliest-encountered occurrences of the specified elements.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param values the values to be removed
+ * @return a new array containing the existing elements except the
+ * earliest-encountered occurrences of the specified elements
* @since 3.0.1
*/
public static int[] removeElements(final int[] array, final int... values) {
@@ -6529,10 +6530,10 @@ public static int[] removeElements(final int[] array, final int... values) {
* ArrayUtils.removeElements([1, 3, 1], 1, 1) = [3]
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param values the values to be removed.
- * @return A new array containing the existing elements except the
- * earliest-encountered occurrences of the specified elements.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param values the values to be removed
+ * @return a new array containing the existing elements except the
+ * earliest-encountered occurrences of the specified elements
* @since 3.0.1
*/
public static long[] removeElements(final long[] array, final long... values) {
@@ -6578,10 +6579,10 @@ public static long[] removeElements(final long[] array, final long... values) {
* ArrayUtils.removeElements([1, 3, 1], 1, 1) = [3]
*
*
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param values the values to be removed.
- * @return A new array containing the existing elements except the
- * earliest-encountered occurrences of the specified elements.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param values the values to be removed
+ * @return a new array containing the existing elements except the
+ * earliest-encountered occurrences of the specified elements
* @since 3.0.1
*/
public static short[] removeElements(final short[] array, final short... values) {
@@ -6628,10 +6629,10 @@ public static short[] removeElements(final short[] array, final short... values)
*
*
* @param the component type of the array
- * @param array the input array, will not be modified, and may be {@code null}.
- * @param values the values to be removed.
- * @return A new array containing the existing elements except the
- * earliest-encountered occurrences of the specified elements.
+ * @param array the input array, will not be modified, and may be {@code null}
+ * @param values the values to be removed
+ * @return a new array containing the existing elements except the
+ * earliest-encountered occurrences of the specified elements
* @since 3.0.1
*/
@SafeVarargs
@@ -6665,7 +6666,7 @@ public static T[] removeElements(final T[] array, final T... values) {
* This method does nothing for a {@code null} input array.
*
*
- * @param array the array to reverse, may be {@code null}.
+ * @param array the array to reverse, may be {@code null}
*/
public static void reverse(final boolean[] array) {
if (array != null) {
@@ -6680,7 +6681,7 @@ public static void reverse(final boolean[] array) {
*
*
* @param array
- * the array to reverse, may be {@code null}.
+ * the array to reverse, may be {@code null}
* @param startIndexInclusive
* the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no
* change.
@@ -6711,7 +6712,7 @@ public static void reverse(final boolean[] array, final int startIndexInclusive,
* This method does nothing for a {@code null} input array.
*
*
- * @param array the array to reverse, may be {@code null}.
+ * @param array the array to reverse, may be {@code null}
*/
public static void reverse(final byte[] array) {
if (array != null) {
@@ -6725,7 +6726,7 @@ public static void reverse(final byte[] array) {
* This method does nothing for a {@code null} input array.
*
*
- * @param array the array to reverse, may be {@code null}.
+ * @param array the array to reverse, may be {@code null}
* @param startIndexInclusive the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no change.
* @param endIndexExclusive elements up to endIndex-1 are reversed in the array. Undervalue (< start index) results in no change. Overvalue
* (>array.length) is demoted to array length.
@@ -6753,7 +6754,7 @@ public static void reverse(final byte[] array, final int startIndexInclusive, fi
* This method does nothing for a {@code null} input array.
*
*
- * @param array the array to reverse, may be {@code null}.
+ * @param array the array to reverse, may be {@code null}
*/
public static void reverse(final char[] array) {
if (array != null) {
@@ -6767,7 +6768,7 @@ public static void reverse(final char[] array) {
* This method does nothing for a {@code null} input array.
*
*
- * @param array the array to reverse, may be {@code null}.
+ * @param array the array to reverse, may be {@code null}
* @param startIndexInclusive the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no change.
* @param endIndexExclusive elements up to endIndex-1 are reversed in the array. Undervalue (< start index) results in no change. Overvalue
* (>array.length) is demoted to array length.
@@ -6795,7 +6796,7 @@ public static void reverse(final char[] array, final int startIndexInclusive, fi
* This method does nothing for a {@code null} input array.
*
*
- * @param array the array to reverse, may be {@code null}
+ * @param array the array to reverse, may be {@code null}
*/
public static void reverse(final double[] array) {
if (array != null) {
@@ -6809,7 +6810,7 @@ public static void reverse(final double[] array) {
* This method does nothing for a {@code null} input array.
*
*
- * @param array the array to reverse, may be {@code null}.
+ * @param array the array to reverse, may be {@code null}
* @param startIndexInclusive the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no change.
* @param endIndexExclusive elements up to endIndex-1 are reversed in the array. Undervalue (< start index) results in no change. Overvalue
* (>array.length) is demoted to array length.
@@ -6837,7 +6838,7 @@ public static void reverse(final double[] array, final int startIndexInclusive,
* This method does nothing for a {@code null} input array.
*
*
- * @param array the array to reverse, may be {@code null}.
+ * @param array the array to reverse, may be {@code null}
*/
public static void reverse(final float[] array) {
if (array != null) {
@@ -6851,7 +6852,7 @@ public static void reverse(final float[] array) {
* This method does nothing for a {@code null} input array.
*
*
- * @param array the array to reverse, may be {@code null}.
+ * @param array the array to reverse, may be {@code null}
* @param startIndexInclusive the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no change.
* @param endIndexExclusive elements up to endIndex-1 are reversed in the array. Undervalue (< start index) results in no change. Overvalue
* (>array.length) is demoted to array length.
@@ -6879,7 +6880,7 @@ public static void reverse(final float[] array, final int startIndexInclusive, f
* This method does nothing for a {@code null} input array.
*
*
- * @param array the array to reverse, may be {@code null}.
+ * @param array the array to reverse, may be {@code null}
*/
public static void reverse(final int[] array) {
if (array != null) {
@@ -6894,7 +6895,7 @@ public static void reverse(final int[] array) {
*
*
* @param array
- * the array to reverse, may be {@code null}.
+ * the array to reverse, may be {@code null}
* @param startIndexInclusive
* the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no
* change.
@@ -6925,7 +6926,7 @@ public static void reverse(final int[] array, final int startIndexInclusive, fin
* This method does nothing for a {@code null} input array.
*
*
- * @param array the array to reverse, may be {@code null}.
+ * @param array the array to reverse, may be {@code null}
*/
public static void reverse(final long[] array) {
if (array != null) {
@@ -6940,7 +6941,7 @@ public static void reverse(final long[] array) {
*
*
* @param array
- * the array to reverse, may be {@code null}.
+ * the array to reverse, may be {@code null}
* @param startIndexInclusive
* the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no
* change.
@@ -6974,7 +6975,7 @@ public static void reverse(final long[] array, final int startIndexInclusive, fi
* This method does nothing for a {@code null} input array.
*
*
- * @param array the array to reverse, may be {@code null}.
+ * @param array the array to reverse, may be {@code null}
*/
public static void reverse(final Object[] array) {
if (array != null) {
@@ -6989,7 +6990,7 @@ public static void reverse(final Object[] array) {
*
*
* @param array
- * the array to reverse, may be {@code null}.
+ * the array to reverse, may be {@code null}
* @param startIndexInclusive
* the starting index. Under value (<0) is promoted to 0, over value (>array.length) results in no
* change.
@@ -7020,7 +7021,7 @@ public static void reverse(final Object[] array, final int startIndexInclusive,
* This method does nothing for a {@code null} input array.
*
*
- * @param array the array to reverse, may be {@code null}.
+ * @param array the array to reverse, may be {@code null}
*/
public static void reverse(final short[] array) {
if (array != null) {
@@ -7035,7 +7036,7 @@ public static void reverse(final short[] array) {
*
*
* @param array
- * the array to reverse, may be {@code null}.
+ * the array to reverse, may be {@code null}
* @param startIndexInclusive
* the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no
* change.
@@ -7067,9 +7068,9 @@ public static void reverse(final short[] array, final int startIndexInclusive, f
* state.
*
*
- * @param type of elements of the array, may be {@code null}.
- * @param array array to be initialized, may be {@code null}.
- * @param generator a function accepting an index and producing the desired value for that position.
+ * @param type of elements of the array, may be {@code null}
+ * @param array array to be initialized, may be {@code null}
+ * @param generator a function accepting an index and producing the desired value for that position
* @return the input array
* @since 3.13.0
*/
@@ -7087,9 +7088,9 @@ public static T[] setAll(final T[] array, final IntFunction extends T> gen
* state.
*
*
- * @param type of elements of the array, may be {@code null}.
- * @param array array to be initialized, may be {@code null}.
- * @param generator a function accepting an index and producing the desired value for that position.
+ * @param type of elements of the array, may be {@code null}
+ * @param array array to be initialized, may be {@code null}
+ * @param generator a function accepting an index and producing the desired value for that position
* @return the input array
* @since 3.13.0
*/
@@ -7108,7 +7109,7 @@ public static T[] setAll(final T[] array, final Supplier extends T> genera
*
There is no special handling for multi-dimensional arrays. This method
* does nothing for {@code null} or empty input arrays.
*
- * @param array the array to shift, may be {@code null}.
+ * @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.
@@ -7127,7 +7128,7 @@ public static void shift(final boolean[] array, final int offset) {
* does nothing for {@code null} or empty input arrays.
*
* @param array
- * the array to shift, may be {@code null}.
+ * the array to shift, may be {@code null}
* @param startIndexInclusive
* the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no
* change.
@@ -7178,7 +7179,7 @@ public static void shift(final boolean[] array, int startIndexInclusive, int end
*
There is no special handling for multi-dimensional arrays. This method
* does nothing for {@code null} or empty input arrays.
*
- * @param array the array to shift, may be {@code null}.
+ * @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.
@@ -7197,7 +7198,7 @@ public static void shift(final byte[] array, final int offset) {
* does nothing for {@code null} or empty input arrays.
*
* @param array
- * the array to shift, may be {@code null}.
+ * the array to shift, may be {@code null}
* @param startIndexInclusive
* the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no
* change.
@@ -7248,7 +7249,7 @@ public static void shift(final byte[] array, int startIndexInclusive, int endInd
*
There is no special handling for multi-dimensional arrays. This method
* does nothing for {@code null} or empty input arrays.
*
- * @param array the array to shift, may be {@code null}.
+ * @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.
@@ -7267,7 +7268,7 @@ public static void shift(final char[] array, final int offset) {
* does nothing for {@code null} or empty input arrays.
*
* @param array
- * the array to shift, may be {@code null}.
+ * the array to shift, may be {@code null}
* @param startIndexInclusive
* the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no
* change.
@@ -7318,7 +7319,7 @@ public static void shift(final char[] array, int startIndexInclusive, int endInd
*
There is no special handling for multi-dimensional arrays. This method
* does nothing for {@code null} or empty input arrays.
*
- * @param array the array to shift, may be {@code null}.
+ * @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.
@@ -7337,7 +7338,7 @@ public static void shift(final double[] array, final int offset) {
* does nothing for {@code null} or empty input arrays.
*
* @param array
- * the array to shift, may be {@code null}.
+ * the array to shift, may be {@code null}
* @param startIndexInclusive
* the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no
* change.
@@ -7388,7 +7389,7 @@ public static void shift(final double[] array, int startIndexInclusive, int endI
*
There is no special handling for multi-dimensional arrays. This method
* does nothing for {@code null} or empty input arrays.
*
- * @param array the array to shift, may be {@code null}.
+ * @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.
@@ -7407,7 +7408,7 @@ public static void shift(final float[] array, final int offset) {
* does nothing for {@code null} or empty input arrays.
*
* @param array
- * the array to shift, may be {@code null}.
+ * the array to shift, may be {@code null}
* @param startIndexInclusive
* the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no
* change.
@@ -7458,7 +7459,7 @@ public static void shift(final float[] array, int startIndexInclusive, int endIn
*
There is no special handling for multi-dimensional arrays. This method
* does nothing for {@code null} or empty input arrays.
*
- * @param array the array to shift, may be {@code null}.
+ * @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.
@@ -7477,7 +7478,7 @@ public static void shift(final int[] array, final int offset) {
* does nothing for {@code null} or empty input arrays.
*
* @param array
- * the array to shift, may be {@code null}.
+ * the array to shift, may be {@code null}
* @param startIndexInclusive
* the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no
* change.
@@ -7528,7 +7529,7 @@ public static void shift(final int[] array, int startIndexInclusive, int endInde
*
There is no special handling for multi-dimensional arrays. This method
* does nothing for {@code null} or empty input arrays.
*
- * @param array the array to shift, may be {@code null}.
+ * @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.
@@ -7547,7 +7548,7 @@ public static void shift(final long[] array, final int offset) {
* does nothing for {@code null} or empty input arrays.
*
* @param array
- * the array to shift, may be {@code null}.
+ * the array to shift, may be {@code null}
* @param startIndexInclusive
* the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no
* change.
@@ -7598,7 +7599,7 @@ public static void shift(final long[] array, int startIndexInclusive, int endInd
*
There is no special handling for multi-dimensional arrays. This method
* does nothing for {@code null} or empty input arrays.
*
- * @param array the array to shift, may be {@code null}.
+ * @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.
@@ -7617,7 +7618,7 @@ public static void shift(final Object[] array, final int offset) {
* does nothing for {@code null} or empty input arrays.
*
* @param array
- * the array to shift, may be {@code null}.
+ * the array to shift, may be {@code null}
* @param startIndexInclusive
* the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no
* change.
@@ -7668,7 +7669,7 @@ public static void shift(final Object[] array, int startIndexInclusive, int endI
*
There is no special handling for multi-dimensional arrays. This method
* does nothing for {@code null} or empty input arrays.
*
- * @param array the array to shift, may be {@code null}.
+ * @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.
@@ -7687,7 +7688,7 @@ public static void shift(final short[] array, final int offset) {
* does nothing for {@code null} or empty input arrays.
*
* @param array
- * the array to shift, may be {@code null}.
+ * the array to shift, may be {@code null}
* @param startIndexInclusive
* the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in no
* change.
@@ -7743,7 +7744,7 @@ public static void shift(final short[] array, int startIndexInclusive, int endIn
* with a {@link SecureRandom} argument.
*
*
- * @param array the array to shuffle.
+ * @param array the array to shuffle
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -7755,8 +7756,8 @@ public static void shuffle(final boolean[] array) {
* Shuffles randomly the elements of the specified array using the Fisher-Yates shuffle
* algorithm.
*
- * @param array the array to shuffle, no-op if {@code null}.
- * @param random the source of randomness used to permute the elements, no-op if {@code null}.
+ * @param array the array to shuffle, no-op if {@code null}
+ * @param random the source of randomness used to permute the elements, no-op if {@code null}
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -7779,7 +7780,7 @@ public static void shuffle(final boolean[] array, final Random random) {
* with a {@link SecureRandom} argument.
*
*
- * @param array the array to shuffle.
+ * @param array the array to shuffle
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -7791,8 +7792,8 @@ public static void shuffle(final byte[] array) {
* Shuffles randomly the elements of the specified array using the Fisher-Yates shuffle
* algorithm.
*
- * @param array the array to shuffle, no-op if {@code null}.
- * @param random the source of randomness used to permute the elements, no-op if {@code null}.
+ * @param array the array to shuffle, no-op if {@code null}
+ * @param random the source of randomness used to permute the elements, no-op if {@code null}
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -7815,7 +7816,7 @@ public static void shuffle(final byte[] array, final Random random) {
* with a {@link SecureRandom} argument.
*
*
- * @param array the array to shuffle.
+ * @param array the array to shuffle
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -7827,8 +7828,8 @@ public static void shuffle(final char[] array) {
* Shuffles randomly the elements of the specified array using the Fisher-Yates shuffle
* algorithm.
*
- * @param array the array to shuffle, no-op if {@code null}.
- * @param random the source of randomness used to permute the elements, no-op if {@code null}.
+ * @param array the array to shuffle, no-op if {@code null}
+ * @param random the source of randomness used to permute the elements, no-op if {@code null}
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -7851,7 +7852,7 @@ public static void shuffle(final char[] array, final Random random) {
* with a {@link SecureRandom} argument.
*
*
- * @param array the array to shuffle.
+ * @param array the array to shuffle
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -7863,8 +7864,8 @@ public static void shuffle(final double[] array) {
* Shuffles randomly the elements of the specified array using the Fisher-Yates shuffle
* algorithm.
*
- * @param array the array to shuffle, no-op if {@code null}.
- * @param random the source of randomness used to permute the elements, no-op if {@code null}.
+ * @param array the array to shuffle, no-op if {@code null}
+ * @param random the source of randomness used to permute the elements, no-op if {@code null}
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -7887,7 +7888,7 @@ public static void shuffle(final double[] array, final Random random) {
* with a {@link SecureRandom} argument.
*
*
- * @param array the array to shuffle.
+ * @param array the array to shuffle
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -7899,8 +7900,8 @@ public static void shuffle(final float[] array) {
* Shuffles randomly the elements of the specified array using the Fisher-Yates shuffle
* algorithm.
*
- * @param array the array to shuffle, no-op if {@code null}.
- * @param random the source of randomness used to permute the elements, no-op if {@code null}.
+ * @param array the array to shuffle, no-op if {@code null}
+ * @param random the source of randomness used to permute the elements, no-op if {@code null}
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -7923,7 +7924,7 @@ public static void shuffle(final float[] array, final Random random) {
* with a {@link SecureRandom} argument.
*
*
- * @param array the array to shuffle.
+ * @param array the array to shuffle
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -7935,8 +7936,8 @@ public static void shuffle(final int[] array) {
* Shuffles randomly the elements of the specified array using the Fisher-Yates shuffle
* algorithm.
*
- * @param array the array to shuffle, no-op if {@code null}.
- * @param random the source of randomness used to permute the elements, no-op if {@code null}.
+ * @param array the array to shuffle, no-op if {@code null}
+ * @param random the source of randomness used to permute the elements, no-op if {@code null}
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -7959,7 +7960,7 @@ public static void shuffle(final int[] array, final Random random) {
* with a {@link SecureRandom} argument.
*
*
- * @param array the array to shuffle.
+ * @param array the array to shuffle
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -7971,8 +7972,8 @@ public static void shuffle(final long[] array) {
* Shuffles randomly the elements of the specified array using the Fisher-Yates shuffle
* algorithm.
*
- * @param array the array to shuffle, no-op if {@code null}.
- * @param random the source of randomness used to permute the elements, no-op if {@code null}.
+ * @param array the array to shuffle, no-op if {@code null}
+ * @param random the source of randomness used to permute the elements, no-op if {@code null}
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -7995,7 +7996,7 @@ public static void shuffle(final long[] array, final Random random) {
* with a {@link SecureRandom} argument.
*
*
- * @param array the array to shuffle.
+ * @param array the array to shuffle
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -8007,8 +8008,8 @@ public static void shuffle(final Object[] array) {
* Shuffles randomly the elements of the specified array using the Fisher-Yates shuffle
* algorithm.
*
- * @param array the array to shuffle, no-op if {@code null}.
- * @param random the source of randomness used to permute the elements, no-op if {@code null}.
+ * @param array the array to shuffle, no-op if {@code null}
+ * @param random the source of randomness used to permute the elements, no-op if {@code null}
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -8031,7 +8032,7 @@ public static void shuffle(final Object[] array, final Random random) {
* with a {@link SecureRandom} argument.
*
*
- * @param array the array to shuffle.
+ * @param array the array to shuffle
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -8043,8 +8044,8 @@ public static void shuffle(final short[] array) {
* Shuffles randomly the elements of the specified array using the Fisher-Yates shuffle
* algorithm.
*
- * @param array the array to shuffle, no-op if {@code null}.
- * @param random the source of randomness used to permute the elements, no-op if {@code null}.
+ * @param array the array to shuffle, no-op if {@code null}
+ * @param random the source of randomness used to permute the elements, no-op if {@code null}
* @see Fisher-Yates shuffle algorithm
* @since 3.6
*/
@@ -8062,9 +8063,9 @@ public static void shuffle(final short[] array, final Random random) {
* If both arrays are null, the method returns true. The method return false when one array is null and the other not.
*
*
- * @param data The data to search, maybe larger than the expected data.
- * @param expected The expected data to find.
- * @return whether a match was found.
+ * @param data the data to search, maybe larger than the expected data
+ * @param expected the expected data to find
+ * @return whether a match was found
* @since 3.18.0
*/
public static boolean startsWith(final byte[] data, final byte[] expected) {
@@ -8097,13 +8098,13 @@ public static boolean startsWith(final byte[] data, final byte[] expected) {
* The start index is inclusive, the end index exclusive. Null array input produces null output.
*
*
- * @param array the input array.
+ * @param array the input array
* @param startIndexInclusive the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in an empty array.
* @param endIndexExclusive elements up to endIndex-1 are present in the returned subarray. Undervalue (< startIndex) produces empty array, overvalue
* (>array.length) is demoted to array length.
- * @return a new array containing the elements between the start and end indices.
- * @since 2.1
+ * @return a new array containing the elements between the start and end indices
* @see Arrays#copyOfRange(boolean[], int, int)
+ * @since 2.1
*/
public static boolean[] subarray(final boolean[] array, int startIndexInclusive, int endIndexExclusive) {
if (array == null) {
@@ -8124,13 +8125,13 @@ public static boolean[] subarray(final boolean[] array, int startIndexInclusive,
* The start index is inclusive, the end index exclusive. Null array input produces null output.
*
*
- * @param array the input array.
+ * @param array the input array
* @param startIndexInclusive the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in an empty array.
* @param endIndexExclusive elements up to endIndex-1 are present in the returned subarray. Undervalue (< startIndex) produces empty array, overvalue
* (>array.length) is demoted to array length.
- * @return a new array containing the elements between the start and end indices.
- * @since 2.1
+ * @return a new array containing the elements between the start and end indices
* @see Arrays#copyOfRange(byte[], int, int)
+ * @since 2.1
*/
public static byte[] subarray(final byte[] array, int startIndexInclusive, int endIndexExclusive) {
if (array == null) {
@@ -8151,13 +8152,13 @@ public static byte[] subarray(final byte[] array, int startIndexInclusive, int e
* The start index is inclusive, the end index exclusive. Null array input produces null output.
*
*
- * @param array the input array.
+ * @param array the input array
* @param startIndexInclusive the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in an empty array.
* @param endIndexExclusive elements up to endIndex-1 are present in the returned subarray. Undervalue (< startIndex) produces empty array, overvalue
* (>array.length) is demoted to array length.
- * @return a new array containing the elements between the start and end indices.
- * @since 2.1
+ * @return a new array containing the elements between the start and end indices
* @see Arrays#copyOfRange(char[], int, int)
+ * @since 2.1
*/
public static char[] subarray(final char[] array, int startIndexInclusive, int endIndexExclusive) {
if (array == null) {
@@ -8178,13 +8179,13 @@ public static char[] subarray(final char[] array, int startIndexInclusive, int e
* The start index is inclusive, the end index exclusive. Null array input produces null output.
*
*
- * @param array the input array.
+ * @param array the input array
* @param startIndexInclusive the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in an empty array.
* @param endIndexExclusive elements up to endIndex-1 are present in the returned subarray. Undervalue (< startIndex) produces empty array, overvalue
* (>array.length) is demoted to array length.
- * @return a new array containing the elements between the start and end indices.
- * @since 2.1
+ * @return a new array containing the elements between the start and end indices
* @see Arrays#copyOfRange(double[], int, int)
+ * @since 2.1
*/
public static double[] subarray(final double[] array, int startIndexInclusive, int endIndexExclusive) {
if (array == null) {
@@ -8205,13 +8206,13 @@ public static double[] subarray(final double[] array, int startIndexInclusive, i
* The start index is inclusive, the end index exclusive. Null array input produces null output.
*
*
- * @param array the input array.
+ * @param array the input array
* @param startIndexInclusive the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in an empty array.
* @param endIndexExclusive elements up to endIndex-1 are present in the returned subarray. Undervalue (< startIndex) produces empty array, overvalue
* (>array.length) is demoted to array length.
- * @return a new array containing the elements between the start and end indices.
- * @since 2.1
+ * @return a new array containing the elements between the start and end indices
* @see Arrays#copyOfRange(float[], int, int)
+ * @since 2.1
*/
public static float[] subarray(final float[] array, int startIndexInclusive, int endIndexExclusive) {
if (array == null) {
@@ -8232,13 +8233,13 @@ public static float[] subarray(final float[] array, int startIndexInclusive, int
* The start index is inclusive, the end index exclusive. Null array input produces null output.
*
*
- * @param array the input array.
+ * @param array the input array
* @param startIndexInclusive the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in an empty array.
* @param endIndexExclusive elements up to endIndex-1 are present in the returned subarray. Undervalue (< startIndex) produces empty array, overvalue
* (>array.length) is demoted to array length.
- * @return a new array containing the elements between the start and end indices.
- * @since 2.1
+ * @return a new array containing the elements between the start and end indices
* @see Arrays#copyOfRange(int[], int, int)
+ * @since 2.1
*/
public static int[] subarray(final int[] array, int startIndexInclusive, int endIndexExclusive) {
if (array == null) {
@@ -8259,13 +8260,13 @@ public static int[] subarray(final int[] array, int startIndexInclusive, int end
* The start index is inclusive, the end index exclusive. Null array input produces null output.
*
*
- * @param array the input array.
+ * @param array the input array
* @param startIndexInclusive the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in an empty array.
* @param endIndexExclusive elements up to endIndex-1 are present in the returned subarray. Undervalue (< startIndex) produces empty array, overvalue
* (>array.length) is demoted to array length.
- * @return a new array containing the elements between the start and end indices.
- * @since 2.1
+ * @return a new array containing the elements between the start and end indices
* @see Arrays#copyOfRange(long[], int, int)
+ * @since 2.1
*/
public static long[] subarray(final long[] array, int startIndexInclusive, int endIndexExclusive) {
if (array == null) {
@@ -8286,13 +8287,13 @@ public static long[] subarray(final long[] array, int startIndexInclusive, int e
* The start index is inclusive, the end index exclusive. Null array input produces null output.
*
*
- * @param array the input array.
+ * @param array the input array
* @param startIndexInclusive the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in an empty array.
* @param endIndexExclusive elements up to endIndex-1 are present in the returned subarray. Undervalue (< startIndex) produces empty array, overvalue
* (>array.length) is demoted to array length.
- * @return a new array containing the elements between the start and end indices.
- * @since 2.1
+ * @return a new array containing the elements between the start and end indices
* @see Arrays#copyOfRange(short[], int, int)
+ * @since 2.1
*/
public static short[] subarray(final short[] array, int startIndexInclusive, int endIndexExclusive) {
if (array == null) {
@@ -8322,14 +8323,14 @@ public static short[] subarray(final short[] array, int startIndexInclusive, int
* Date[] someDates = (Date[]) ArrayUtils.subarray(allDates, 2, 5);
*
*
- * @param the component type of the array.
- * @param array the input array.
+ * @param the component type of the array
+ * @param array the input array
* @param startIndexInclusive the starting index. Undervalue (<0) is promoted to 0, overvalue (>array.length) results in an empty array.
* @param endIndexExclusive elements up to endIndex-1 are present in the returned subarray. Undervalue (< startIndex) produces empty array, overvalue
* (>array.length) is demoted to array length.
- * @return a new array containing the elements between the start and end indices.
- * @since 2.1
+ * @return a new array containing the elements between the start and end indices
* @see Arrays#copyOfRange(Object[], int, int)
+ * @since 2.1
*/
public static T[] subarray(final T[] array, int startIndexInclusive, int endIndexExclusive) {
if (array == null) {
@@ -8361,9 +8362,9 @@ public static T[] subarray(final T[] array, int startIndexInclusive, int end
*
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.
- * @param offset2 the index of the second element to swap.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element to swap
+ * @param offset2 the index of the second element to swap
* @since 3.5
*/
public static void swap(final boolean[] array, final int offset1, final int offset2) {
@@ -8388,10 +8389,10 @@ public static void swap(final boolean[] array, final int offset1, final int offs
*
*
*
- * @param array the array to swap, may be {@code null}.
- * @param offset1 the index of the first element in the series to swap.
- * @param offset2 the index of the second element in the series to swap.
- * @param len the number of elements to swap starting with the given indices.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element in the series to swap
+ * @param offset2 the index of the second element in the series to swap
+ * @param len the number of elements to swap starting with the given indices
* @since 3.5
*/
public static void swap(final boolean[] array, int offset1, int offset2, int len) {
@@ -8424,9 +8425,9 @@ public static void swap(final boolean[] array, int offset1, int offset2, int len
*
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.
- * @param offset2 the index of the second element to swap.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element to swap
+ * @param offset2 the index of the second element to swap
* @since 3.5
*/
public static void swap(final byte[] array, final int offset1, final int offset2) {
@@ -8451,10 +8452,10 @@ public static void swap(final byte[] array, final int offset1, final int offset2
*
*
*
- * @param array the array to swap, may be {@code null}.
- * @param offset1 the index of the first element in the series to swap.
- * @param offset2 the index of the second element in the series to swap.
- * @param len the number of elements to swap starting with the given indices.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element in the series to swap
+ * @param offset2 the index of the second element in the series to swap
+ * @param len the number of elements to swap starting with the given indices
* @since 3.5
*/
public static void swap(final byte[] array, int offset1, int offset2, int len) {
@@ -8487,9 +8488,9 @@ public static void swap(final byte[] array, int offset1, int offset2, int len) {
*
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.
- * @param offset2 the index of the second element to swap.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element to swap
+ * @param offset2 the index of the second element to swap
* @since 3.5
*/
public static void swap(final char[] array, final int offset1, final int offset2) {
@@ -8514,10 +8515,10 @@ public static void swap(final char[] array, final int offset1, final int offset2
*
*
*
- * @param array the array to swap, may be {@code null}.
- * @param offset1 the index of the first element in the series to swap.
- * @param offset2 the index of the second element in the series to swap.
- * @param len the number of elements to swap starting with the given indices.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element in the series to swap
+ * @param offset2 the index of the second element in the series to swap
+ * @param len the number of elements to swap starting with the given indices
* @since 3.5
*/
public static void swap(final char[] array, int offset1, int offset2, int len) {
@@ -8550,9 +8551,9 @@ public static void swap(final char[] array, int offset1, int offset2, int len) {
*
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.
- * @param offset2 the index of the second element to swap.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element to swap
+ * @param offset2 the index of the second element to swap
* @since 3.5
*/
public static void swap(final double[] array, final int offset1, final int offset2) {
@@ -8577,10 +8578,10 @@ public static void swap(final double[] array, final int offset1, final int offse
*
*
*
- * @param array the array to swap, may be {@code null}.
- * @param offset1 the index of the first element in the series to swap.
- * @param offset2 the index of the second element in the series to swap.
- * @param len the number of elements to swap starting with the given indices.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element in the series to swap
+ * @param offset2 the index of the second element in the series to swap
+ * @param len the number of elements to swap starting with the given indices
* @since 3.5
*/
public static void swap(final double[] array, int offset1, int offset2, int len) {
@@ -8613,9 +8614,9 @@ public static void swap(final double[] array, int offset1, int offset2, int len
*
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.
- * @param offset2 the index of the second element to swap.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element to swap
+ * @param offset2 the index of the second element to swap
* @since 3.5
*/
public static void swap(final float[] array, final int offset1, final int offset2) {
@@ -8640,10 +8641,10 @@ public static void swap(final float[] array, final int offset1, final int offset
*
*
*
- * @param array the array to swap, may be {@code null}.
- * @param offset1 the index of the first element in the series to swap.
- * @param offset2 the index of the second element in the series to swap.
- * @param len the number of elements to swap starting with the given indices.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element in the series to swap
+ * @param offset2 the index of the second element in the series to swap
+ * @param len the number of elements to swap starting with the given indices
* @since 3.5
*/
public static void swap(final float[] array, int offset1, int offset2, int len) {
@@ -8677,9 +8678,9 @@ public static void swap(final float[] array, int offset1, int offset2, int len)
*
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.
- * @param offset2 the index of the second element to swap.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element to swap
+ * @param offset2 the index of the second element to swap
* @since 3.5
*/
public static void swap(final int[] array, final int offset1, final int offset2) {
@@ -8704,10 +8705,10 @@ public static void swap(final int[] array, final int offset1, final int offset2)
*
*
*
- * @param array the array to swap, may be {@code null}.
- * @param offset1 the index of the first element in the series to swap.
- * @param offset2 the index of the second element in the series to swap.
- * @param len the number of elements to swap starting with the given indices.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element in the series to swap
+ * @param offset2 the index of the second element in the series to swap
+ * @param len the number of elements to swap starting with the given indices
* @since 3.5
*/
public static void swap(final int[] array, int offset1, int offset2, int len) {
@@ -8740,9 +8741,9 @@ public static void swap(final int[] array, int offset1, int offset2, int len) {
*
*
*
- * @param array the array to swap, may be {@code null}.
- * @param offset1 the index of the first element to swap.
- * @param offset2 the index of the second element to swap.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element to swap
+ * @param offset2 the index of the second element to swap
* @since 3.5
*/
public static void swap(final long[] array, final int offset1, final int offset2) {
@@ -8767,10 +8768,10 @@ public static void swap(final long[] array, final int offset1, final int offset2
*
*
*
- * @param array the array to swap, may be {@code null}.
- * @param offset1 the index of the first element in the series to swap.
- * @param offset2 the index of the second element in the series to swap.
- * @param len the number of elements to swap starting with the given indices.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element in the series to swap
+ * @param offset2 the index of the second element in the series to swap
+ * @param len the number of elements to swap starting with the given indices
* @since 3.5
*/
public static void swap(final long[] array, int offset1, int offset2, int len) {
@@ -8803,9 +8804,9 @@ public static void swap(final long[] array, int offset1, int offset2, int len)
*
*
*
- * @param array the array to swap, may be {@code null}.
- * @param offset1 the index of the first element to swap.
- * @param offset2 the index of the second element to swap.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element to swap
+ * @param offset2 the index of the second element to swap
* @since 3.5
*/
public static void swap(final Object[] array, final int offset1, final int offset2) {
@@ -8830,10 +8831,10 @@ public static void swap(final Object[] array, final int offset1, final int offse
*
*
*
- * @param array the array to swap, may be {@code null}.
- * @param offset1 the index of the first element in the series to swap.
- * @param offset2 the index of the second element in the series to swap.
- * @param len the number of elements to swap starting with the given indices.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element in the series to swap
+ * @param offset2 the index of the second element in the series to swap
+ * @param len the number of elements to swap starting with the given indices
* @since 3.5
*/
public static void swap(final Object[] array, int offset1, int offset2, int len) {
@@ -8866,9 +8867,9 @@ public static void swap(final Object[] array, int offset1, int offset2, int len
*
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.
- * @param offset2 the index of the second element to swap.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element to swap
+ * @param offset2 the index of the second element to swap
* @since 3.5
*/
public static void swap(final short[] array, final int offset1, final int offset2) {
@@ -8893,10 +8894,10 @@ public static void swap(final short[] array, final int offset1, final int offset
*
*
*
- * @param array the array to swap, may be {@code null}.
- * @param offset1 the index of the first element in the series to swap.
- * @param offset2 the index of the second element in the series to swap.
- * @param len the number of elements to swap starting with the given indices.
+ * @param array the array to swap, may be {@code null}
+ * @param offset1 the index of the first element in the series to swap
+ * @param offset2 the index of the second element in the series to swap
+ * @param len the number of elements to swap starting with the given indices
* @since 3.5
*/
public static void swap(final short[] array, int offset1, int offset2, int len) {
@@ -8922,12 +8923,12 @@ public static void swap(final short[] array, int offset1, int offset2, int len)
* The Java language does not allow an array to be created from a generic type:
*
*
- public static <T> T[] createAnArray(int size) {
- return new T[size]; // compiler error here
- }
- public static <T> T[] createAnArray(int size) {
- return (T[]) new Object[size]; // ClassCastException at runtime
- }
+ * public static <T> T[] createAnArray(int size) {
+ * return new T[size]; // compiler error here
+ * }
+ * public static <T> T[] createAnArray(int size) {
+ * return (T[]) new Object[size]; // ClassCastException at runtime
+ * }
*
*
* Therefore new arrays of generic types can be created with this method.
@@ -8950,9 +8951,9 @@ public static void swap(final short[] array, int offset1, int offset2, int len)
* {@code new Number[] {Integer.valueOf(42), Double.valueOf(Math.PI)}}.
*
*
- * @param the array's element type.
- * @param items the varargs array items, null allowed.
- * @return the array, not null unless a null array is passed in.
+ * @param the array's element type
+ * @param items the varargs array items, null allowed
+ * @return the array, not null unless a null array is passed in
* @since 3.0
*/
public static T[] toArray(@SuppressWarnings("unchecked") final T... items) {
@@ -8975,10 +8976,10 @@ public static T[] toArray(@SuppressWarnings("unchecked") final T... items) {
* 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}.
- * @return a {@link Map} that was created from the array.
- * @throws IllegalArgumentException if one element of this Array is itself an Array containing less than two elements.
- * @throws IllegalArgumentException if the array contains elements other than {@link java.util.Map.Entry} and an 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}
+ * @return a {@link Map} that was created from the array
+ * @throws IllegalArgumentException if one element of this Array is itself an Array containing less than two elements
+ * @throws IllegalArgumentException if the array contains elements other than {@link java.util.Map.Entry} and an Array
*/
public static Map, sections 5.1.1, 5.1.2 and 5.1.4 for details.
*
*
- * @param cls the Class to check, may be null.
- * @param toClass the Class to try to assign into, returns false if null.
- * @param autoboxing whether to use implicit autoboxing/unboxing between primitives and wrappers.
- * @return {@code true} if assignment possible.
+ * @param cls the Class to check, may be null
+ * @param toClass the Class to try to assign into, returns false if null
+ * @param autoboxing whether to use implicit autoboxing/unboxing between primitives and wrappers
+ * @return {@code true} if assignment possible
*/
public static boolean isAssignable(Class> cls, final Class> toClass, final boolean autoboxing) {
if (toClass == null) {
@@ -1428,9 +1428,9 @@ public static boolean isAssignable(Class> cls, final Class> toClass, final b
* VMs running Java versions > 1.5.
*
*
- * @param classArray the array of Classes to check, may be {@code null}.
- * @param toClassArray the array of Classes to try to assign into, may be {@code null}.
- * @return {@code true} if assignment possible.
+ * @param classArray the array of Classes to check, may be {@code null}
+ * @param toClassArray the array of Classes to try to assign into, may be {@code null}
+ * @return {@code true} if assignment possible
*/
public static boolean isAssignable(final Class>[] classArray, final Class>... toClassArray) {
return isAssignable(classArray, toClassArray, true);
@@ -1489,8 +1489,8 @@ public static boolean isAssignable(Class>[] classArray, Class>[] toClassArra
/**
* Tests whether the specified class an inner class or static nested class.
*
- * @param cls the class to check, may be null.
- * @return {@code true} if the class is an inner or static nested class, false if not or {@code null}.
+ * @param cls the class to check, may be null
+ * @return {@code true} if the class is an inner or static nested class, false if not or {@code null}
*/
public static boolean isInnerClass(final Class> cls) {
return cls != null && cls.getEnclosingClass() != null;
@@ -1500,9 +1500,9 @@ public static boolean isInnerClass(final Class> cls) {
* Tests whether the given {@code type} is a primitive or primitive wrapper ({@link Boolean}, {@link Byte},
* {@link Character}, {@link Short}, {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
*
- * @param type The class to query or null.
+ * @param type the class to query or null
* @return true if the given {@code type} is a primitive or primitive wrapper ({@link Boolean}, {@link Byte},
- * {@link Character}, {@link Short}, {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
+ * {@link Character}, {@link Short}, {@link Integer}, {@link Long}, {@link Double}, {@link Float})
* @since 3.1
*/
public static boolean isPrimitiveOrWrapper(final Class> type) {
@@ -1513,9 +1513,9 @@ public static boolean isPrimitiveOrWrapper(final Class> type) {
* Tests whether the given {@code type} is a primitive wrapper ({@link Boolean}, {@link Byte}, {@link Character},
* {@link Short}, {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
*
- * @param type The class to query or null.
+ * @param type the class to query or null
* @return true if the given {@code type} is a primitive wrapper ({@link Boolean}, {@link Byte}, {@link Character},
- * {@link Short}, {@link Integer}, {@link Long}, {@link Double}, {@link Float}).
+ * {@link Short}, {@link Integer}, {@link Long}, {@link Double}, {@link Float})
* @since 3.1
*/
public static boolean isPrimitiveWrapper(final Class> type) {
@@ -1525,8 +1525,8 @@ public static boolean isPrimitiveWrapper(final Class> type) {
/**
* Tests whether a {@link Class} is public.
*
- * @param cls Class to test.
- * @return {@code true} if {@code cls} is public.
+ * @param cls class to test
+ * @return {@code true} if {@code cls} is public
* @since 3.13.0
*/
public static boolean isPublic(final Class> cls) {
@@ -1536,7 +1536,7 @@ public static boolean isPublic(final Class> cls) {
/**
* Converts the specified array of primitive Class objects to an array of its corresponding wrapper Class objects.
*
- * @param classes the class array to convert, may be null or empty.
+ * @param classes the class array to convert, may be null or empty
* @return an array which contains for each given class, the wrapper class or the original class if class is not a primitive. {@code null} if null input.
* Empty array if an empty array passed in.
* @since 2.1
@@ -1558,7 +1558,7 @@ public static Class>[] primitivesToWrappers(final Class>... classes) {
* NOTE: From v2.2, this method handles {@code Void.TYPE}, returning {@code Void.TYPE}.
*
*
- * @param cls the class to convert, may be null.
+ * @param cls the class to convert, may be null
* @return the wrapper class for {@code cls} or {@code cls} if {@code cls} is not a primitive. {@code null} if null input.
* @since 2.1
*/
@@ -1574,8 +1574,8 @@ public static Class> primitiveToWrapper(final Class> cls) {
* This method returns {@code null} for a {@code null} input array.
*
*
- * @param array an {@link Object} array.
- * @return a {@link Class} array, {@code null} if null array input.
+ * @param array an {@link Object} array
+ * @return a {@link Class} array, {@code null} if null array input
* @since 2.4
*/
public static Class>[] toClass(final Object... array) {
@@ -1595,11 +1595,11 @@ public static Class>[] toClass(final Object... array) {
* been collapsed.
*
*
- * @param className the class name.
- * @return the converted name.
- * @throws NullPointerException if the className is null.
- * @throws IllegalArgumentException Thrown if the class name represents an array with more dimensions than the JVM supports, 255.
- * @throws IllegalArgumentException Thrown if the class name length is greater than 65,535.
+ * @param className the class name
+ * @return the converted name
+ * @throws IllegalArgumentException thrown if the class name represents an array with more dimensions than the JVM supports, 255
+ * @throws IllegalArgumentException thrown if the class name length is greater than 65,535
+ * @throws NullPointerException if the className is null
* @see JVM: Array dimension limits in JVM Specification
* CONSTANT_Class_info
* @see JLS: Fully Qualified Names and Canonical Names
@@ -1666,12 +1666,12 @@ private static String toCleanName(final String className) {
*
*
* @param runAheadTarget the target index (where the characters were copied to) pointing after the last character copied
- * when the current part was copied.
+ * when the current part was copied
* @param source the source index (where the characters were copied from) pointing after the last character copied when
- * the current part was copied.
- * @param originalLength the original length of the class full name, which is abbreviated.
- * @param desiredLength the desired length of the abbreviated class name.
- * @return {@code true} if it can be kept in its original length; {@code false} if the current part has to be abbreviated.
+ * the current part was copied
+ * @param originalLength the original length of the class full name, which is abbreviated
+ * @param desiredLength the desired length of the abbreviated class name
+ * @return {@code true} if it can be kept in its original length; {@code false} if the current part has to be abbreviated
*/
private static boolean useFull(final int runAheadTarget, final int source, final int originalLength, final int desiredLength) {
return source >= originalLength || runAheadTarget + originalLength - source <= desiredLength;
@@ -1684,7 +1684,7 @@ private static boolean useFull(final int runAheadTarget, final int source, final
* This method invokes {@code wrapperToPrimitive()} for each element of the passed in array.
*
*
- * @param classes the class array to convert, may be null or empty.
+ * @param classes the class array to convert, may be null or empty
* @return an array which contains for each given class, the primitive class or null if the original class is not a wrapper class.
* {@code null} if null input. Empty array if an empty array passed in.
* @see #wrapperToPrimitive(Class)
@@ -1709,8 +1709,8 @@ public static Class>[] wrappersToPrimitives(final Class>... classes) {
* classes, or if the parameter is null, the return value is null.
*
*
- * @param cls the class to convert, may be null.
- * @return the corresponding primitive type if {@code cls} is a wrapper class, null otherwise.
+ * @param cls the class to convert, may be null
+ * @return the corresponding primitive type if {@code cls} is a wrapper class, null otherwise
* @see #primitiveToWrapper(Class)
* @since 2.4
*/
diff --git a/src/main/java/org/apache/commons/lang3/Conversion.java b/src/main/java/org/apache/commons/lang3/Conversion.java
index 2b858a05997..4237c714d72 100644
--- a/src/main/java/org/apache/commons/lang3/Conversion.java
+++ b/src/main/java/org/apache/commons/lang3/Conversion.java
@@ -85,10 +85,10 @@ public class Conversion {
* (1, 0, 0, 0) is converted as follow: '8' (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0) is converted to '4'.
*
*
- * @param src the binary to convert.
- * @return a hexadecimal digit representing the selected bits.
- * @throws IllegalArgumentException if {@code src} is empty.
- * @throws NullPointerException if {@code src} is {@code null}.
+ * @param src the binary to convert
+ * @return a hexadecimal digit representing the selected bits
+ * @throws IllegalArgumentException if {@code src} is empty
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static char binaryBeMsb0ToHexDigit(final boolean[] src) {
return binaryBeMsb0ToHexDigit(src, 0);
@@ -101,12 +101,12 @@ public static char binaryBeMsb0ToHexDigit(final boolean[] src) {
* (1, 0, 0, 0) with srcPos = 0 is converted as follow: '8' (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0) with srcPos = 2 is converted to '5'.
*
*
- * @param src the binary to convert.
- * @param srcPos the position of the LSB to start the conversion.
- * @return a hexadecimal digit representing the selected bits.
- * @throws IllegalArgumentException if {@code src} is empty.
- * @throws NullPointerException if {@code src} is {@code null}.
- * @throws IndexOutOfBoundsException if {@code srcPos} is outside the array.
+ * @param src the binary to convert
+ * @param srcPos the position of the LSB to start the conversion
+ * @return a hexadecimal digit representing the selected bits
+ * @throws IllegalArgumentException if {@code src} is empty
+ * @throws IndexOutOfBoundsException if {@code srcPos} is outside the array
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static char binaryBeMsb0ToHexDigit(final boolean[] src, final int srcPos) {
// JDK 9: Objects.checkIndex(int index, int length)
@@ -146,15 +146,15 @@ public static char binaryBeMsb0ToHexDigit(final boolean[] src, final int srcPos)
/**
* Converts binary (represented as boolean array) into a byte using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the binary to convert.
- * @param srcPos the position in {@code src}, in boolean unit, from where to start the conversion.
- * @param dstInit initial value of the destination byte.
- * @param dstPos the position of the LSB, in bits, in the result byte.
- * @param nBools the number of booleans to convert.
- * @return a byte containing the selected bits.
- * @throws NullPointerException if {@code src} is {@code null}.
- * @throws IllegalArgumentException if {@code nBools - 1 + dstPos >= 8}.
- * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nBools > src.length}.
+ * @param src the binary to convert
+ * @param srcPos the position in {@code src}, in boolean unit, from where to start the conversion
+ * @param dstInit initial value of the destination byte
+ * @param dstPos the position of the LSB, in bits, in the result byte
+ * @param nBools the number of booleans to convert
+ * @return a byte containing the selected bits
+ * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nBools > src.length}
+ * @throws IllegalArgumentException if {@code nBools - 1 + dstPos >= 8}
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static byte binaryToByte(final boolean[] src, final int srcPos, final byte dstInit, final int dstPos, final int nBools) {
if (src.length == 0 && srcPos == 0 || 0 == nBools) {
@@ -180,10 +180,10 @@ public static byte binaryToByte(final boolean[] src, final int srcPos, final byt
* (1, 0, 0, 0) is converted as follow: '1'.
*
*
- * @param src the binary to convert.
- * @return a hexadecimal digit representing the selected bits.
- * @throws IllegalArgumentException if {@code src} is empty.
- * @throws NullPointerException if {@code src} is {@code null}.
+ * @param src the binary to convert
+ * @return a hexadecimal digit representing the selected bits
+ * @throws IllegalArgumentException if {@code src} is empty
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static char binaryToHexDigit(final boolean[] src) {
return binaryToHexDigit(src, 0);
@@ -196,11 +196,11 @@ public static char binaryToHexDigit(final boolean[] src) {
* (1, 0, 0, 0) is converted as follow: '1'.
*
*
- * @param src the binary to convert.
- * @param srcPos the position of the LSB to start the conversion.
- * @return a hexadecimal digit representing the selected bits.
- * @throws IllegalArgumentException if {@code src} is empty.
- * @throws NullPointerException if {@code src} is {@code null}.
+ * @param src the binary to convert
+ * @param srcPos the position of the LSB to start the conversion
+ * @return a hexadecimal digit representing the selected bits
+ * @throws IllegalArgumentException if {@code src} is empty
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static char binaryToHexDigit(final boolean[] src, final int srcPos) {
if (src.length == 0) {
@@ -237,10 +237,10 @@ public static char binaryToHexDigit(final boolean[] src, final int srcPos) {
* (1, 0, 0, 0) is converted as follow: '8'.
*
*
- * @param src the binary to convert.
- * @return a hexadecimal digit representing the selected bits.
- * @throws IllegalArgumentException if {@code src} is empty, {@code src.length < 4} or {@code src.length > 8}.
- * @throws NullPointerException if {@code src} is {@code null}.
+ * @param src the binary to convert
+ * @return a hexadecimal digit representing the selected bits
+ * @throws IllegalArgumentException if {@code src} is empty, {@code src.length < 4} or {@code src.length > 8}
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static char binaryToHexDigitMsb0_4bits(final boolean[] src) {
return binaryToHexDigitMsb0_4bits(src, 0);
@@ -253,11 +253,11 @@ public static char binaryToHexDigitMsb0_4bits(final boolean[] src) {
* (1, 0, 0, 0) is converted as follow: '8' (1, 0, 0, 1, 1, 0, 1, 0) with srcPos = 3 is converted to 'D'
*
*
- * @param src the binary to convert.
- * @param srcPos the position of the LSB to start the conversion.
- * @return a hexadecimal digit representing the selected bits.
- * @throws IllegalArgumentException if {@code src} is empty, {@code src.length > 8} or {@code src.length - srcPos < 4}.
- * @throws NullPointerException if {@code src} is {@code null}.
+ * @param src the binary to convert
+ * @param srcPos the position of the LSB to start the conversion
+ * @return a hexadecimal digit representing the selected bits
+ * @throws IllegalArgumentException if {@code src} is empty, {@code src.length > 8} or {@code src.length - srcPos < 4}
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static char binaryToHexDigitMsb0_4bits(final boolean[] src, final int srcPos) {
if (src.length > Byte.SIZE) {
@@ -293,15 +293,15 @@ public static char binaryToHexDigitMsb0_4bits(final boolean[] src, final int src
/**
* Converts binary (represented as boolean array) into an int using the default (little endian, LSB0) byte and bit ordering.
*
- * @param src the binary to convert.
- * @param srcPos the position in {@code src}, in boolean unit, from where to start the conversion.
- * @param dstInit initial value of the destination int.
- * @param dstPos the position of the LSB, in bits, in the result int.
- * @param nBools the number of booleans to convert.
- * @return an int containing the selected bits.
- * @throws NullPointerException if {@code src} is {@code null}.
- * @throws IllegalArgumentException if {@code nBools - 1 + dstPos >= 32}.
- * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nBools > src.length}.
+ * @param src the binary to convert
+ * @param srcPos the position in {@code src}, in boolean unit, from where to start the conversion
+ * @param dstInit initial value of the destination int
+ * @param dstPos the position of the LSB, in bits, in the result int
+ * @param nBools the number of booleans to convert
+ * @return an int containing the selected bits
+ * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nBools > src.length}
+ * @throws IllegalArgumentException if {@code nBools - 1 + dstPos >= 32}
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static int binaryToInt(final boolean[] src, final int srcPos, final int dstInit, final int dstPos, final int nBools) {
if (src.length == 0 && srcPos == 0 || 0 == nBools) {
@@ -323,15 +323,15 @@ public static int binaryToInt(final boolean[] src, final int srcPos, final int d
/**
* Converts binary (represented as boolean array) into a long using the default (little endian, LSB0) byte and bit ordering.
*
- * @param src the binary to convert.
- * @param srcPos the position in {@code src}, in boolean unit, from where to start the conversion.
- * @param dstInit initial value of the destination long.
- * @param dstPos the position of the LSB, in bits, in the result long.
- * @param nBools the number of booleans to convert.
- * @return a long containing the selected bits.
- * @throws NullPointerException if {@code src} is {@code null}.
- * @throws IllegalArgumentException if {@code nBools - 1 + dstPos >= 64}.
- * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nBools > src.length}.
+ * @param src the binary to convert
+ * @param srcPos the position in {@code src}, in boolean unit, from where to start the conversion
+ * @param dstInit initial value of the destination long
+ * @param dstPos the position of the LSB, in bits, in the result long
+ * @param nBools the number of booleans to convert
+ * @return a long containing the selected bits
+ * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nBools > src.length}
+ * @throws IllegalArgumentException if {@code nBools - 1 + dstPos >= 64}
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static long binaryToLong(final boolean[] src, final int srcPos, final long dstInit, final int dstPos, final int nBools) {
if (src.length == 0 && srcPos == 0 || 0 == nBools) {
@@ -353,15 +353,15 @@ public static long binaryToLong(final boolean[] src, final int srcPos, final lon
/**
* Converts binary (represented as boolean array) into a short using the default (little endian, LSB0) byte and bit ordering.
*
- * @param src the binary to convert.
- * @param srcPos the position in {@code src}, in boolean unit, from where to start the conversion.
- * @param dstInit initial value of the destination short.
- * @param dstPos the position of the LSB, in bits, in the result short.
- * @param nBools the number of booleans to convert.
- * @return a short containing the selected bits.
- * @throws NullPointerException if {@code src} is {@code null}.
- * @throws IllegalArgumentException if {@code nBools - 1 + dstPos >= 16}.
- * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nBools > src.length}.
+ * @param src the binary to convert
+ * @param srcPos the position in {@code src}, in boolean unit, from where to start the conversion
+ * @param dstInit initial value of the destination short
+ * @param dstPos the position of the LSB, in bits, in the result short
+ * @param nBools the number of booleans to convert
+ * @return a short containing the selected bits
+ * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nBools > src.length}
+ * @throws IllegalArgumentException if {@code nBools - 1 + dstPos >= 16}
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static short binaryToShort(final boolean[] src, final int srcPos, final short dstInit, final int dstPos, final int nBools) {
if (src.length == 0 && srcPos == 0 || 0 == nBools) {
@@ -383,15 +383,15 @@ public static short binaryToShort(final boolean[] src, final int srcPos, final s
/**
* Converts an array of byte into an int using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the byte array to convert.
- * @param srcPos the position in {@code src}, in byte unit, from where to start the conversion.
- * @param dstInit initial value of the destination int.
- * @param dstPos the position of the LSB, in bits, in the result int.
- * @param nBytes the number of bytes to convert.
- * @return an int containing the selected bits.
- * @throws NullPointerException if {@code src} is {@code null}.
- * @throws IllegalArgumentException if {@code (nBytes - 1) * 8 + dstPos >= 32}.
- * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nBytes > src.length}.
+ * @param src the byte array to convert
+ * @param srcPos the position in {@code src}, in byte unit, from where to start the conversion
+ * @param dstInit initial value of the destination int
+ * @param dstPos the position of the LSB, in bits, in the result int
+ * @param nBytes the number of bytes to convert
+ * @return an int containing the selected bits
+ * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nBytes > src.length}
+ * @throws IllegalArgumentException if {@code (nBytes - 1) * 8 + dstPos >= 32}
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static int byteArrayToInt(final byte[] src, final int srcPos, final int dstInit, final int dstPos, final int nBytes) {
if (src.length == 0 && srcPos == 0 || 0 == nBytes) {
@@ -413,15 +413,15 @@ public static int byteArrayToInt(final byte[] src, final int srcPos, final int d
/**
* Converts an array of byte into a long using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the byte array to convert.
- * @param srcPos the position in {@code src}, in byte unit, from where to start the conversion.
- * @param dstInit initial value of the destination long.
- * @param dstPos the position of the LSB, in bits, in the result long.
- * @param nBytes the number of bytes to convert.
- * @return a long containing the selected bits.
- * @throws NullPointerException if {@code src} is {@code null}.
- * @throws IllegalArgumentException if {@code (nBytes - 1) * 8 + dstPos >= 64}.
- * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nBytes > src.length}.
+ * @param src the byte array to convert
+ * @param srcPos the position in {@code src}, in byte unit, from where to start the conversion
+ * @param dstInit initial value of the destination long
+ * @param dstPos the position of the LSB, in bits, in the result long
+ * @param nBytes the number of bytes to convert
+ * @return a long containing the selected bits
+ * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nBytes > src.length}
+ * @throws IllegalArgumentException if {@code (nBytes - 1) * 8 + dstPos >= 64}
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static long byteArrayToLong(final byte[] src, final int srcPos, final long dstInit, final int dstPos, final int nBytes) {
if (src.length == 0 && srcPos == 0 || 0 == nBytes) {
@@ -443,15 +443,15 @@ public static long byteArrayToLong(final byte[] src, final int srcPos, final lon
/**
* Converts an array of byte into a short using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the byte array to convert.
- * @param srcPos the position in {@code src}, in byte unit, from where to start the conversion.
- * @param dstInit initial value of the destination short.
- * @param dstPos the position of the LSB, in bits, in the result short.
- * @param nBytes the number of bytes to convert.
- * @return a short containing the selected bits.
- * @throws NullPointerException if {@code src} is {@code null}.
- * @throws IllegalArgumentException if {@code (nBytes - 1) * 8 + dstPos >= 16}.
- * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nBytes > src.length}.
+ * @param src the byte array to convert
+ * @param srcPos the position in {@code src}, in byte unit, from where to start the conversion
+ * @param dstInit initial value of the destination short
+ * @param dstPos the position of the LSB, in bits, in the result short
+ * @param nBytes the number of bytes to convert
+ * @return a short containing the selected bits
+ * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nBytes > src.length}
+ * @throws IllegalArgumentException if {@code (nBytes - 1) * 8 + dstPos >= 16}
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static short byteArrayToShort(final byte[] src, final int srcPos, final short dstInit, final int dstPos, final int nBytes) {
if (src.length == 0 && srcPos == 0 || 0 == nBytes) {
@@ -473,11 +473,11 @@ public static short byteArrayToShort(final byte[] src, final int srcPos, final s
/**
* Converts bytes from an array into a UUID using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the byte array to convert.
- * @param srcPos the position in {@code src} where to copy the result from.
- * @return a UUID.
- * @throws NullPointerException if {@code src} is {@code null}.
- * @throws IllegalArgumentException if array does not contain at least 16 bytes beginning with {@code srcPos}.
+ * @param src the byte array to convert
+ * @param srcPos the position in {@code src} where to copy the result from
+ * @return a UUID
+ * @throws IllegalArgumentException if array does not contain at least 16 bytes beginning with {@code srcPos}
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static UUID byteArrayToUuid(final byte[] src, final int srcPos) {
if (src.length - srcPos < 16) {
@@ -489,15 +489,15 @@ public static UUID byteArrayToUuid(final byte[] src, final int srcPos) {
/**
* Converts a byte into an array of boolean using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the byte to convert.
- * @param srcPos the position in {@code src}, in bits, from where to start the conversion.
- * @param dst the destination array.
- * @param dstPos the position in {@code dst} where to copy the result.
- * @param nBools the number of booleans to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB).
- * @return {@code dst}.
- * @throws NullPointerException if {@code dst} is {@code null}.
- * @throws IllegalArgumentException if {@code nBools - 1 + srcPos >= 8}.
- * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nBools > dst.length}.
+ * @param src the byte to convert
+ * @param srcPos the position in {@code src}, in bits, from where to start the conversion
+ * @param dst the destination array
+ * @param dstPos the position in {@code dst} where to copy the result
+ * @param nBools the number of booleans to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB)
+ * @return {@code dst}
+ * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nBools > dst.length}
+ * @throws IllegalArgumentException if {@code nBools - 1 + srcPos >= 8}
+ * @throws NullPointerException if {@code dst} is {@code null}
*/
public static boolean[] byteToBinary(final byte src, final int srcPos, final boolean[] dst, final int dstPos, final int nBools) {
if (0 == nBools) {
@@ -516,14 +516,14 @@ public static boolean[] byteToBinary(final byte src, final int srcPos, final boo
/**
* Converts a byte into an array of char using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the byte to convert.
- * @param srcPos the position in {@code src}, in bits, from where to start the conversion.
- * @param dstInit the initial value for the result String.
- * @param dstPos the position in {@code dst} where to copy the result.
- * @param nHexs the number of chars to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB).
- * @return {@code dst}.
- * @throws IllegalArgumentException if {@code (nHexs - 1) * 4 + srcPos >= 8}.
- * @throws StringIndexOutOfBoundsException if {@code dst.init.length() < dstPos}.
+ * @param src the byte to convert
+ * @param srcPos the position in {@code src}, in bits, from where to start the conversion
+ * @param dstInit the initial value for the result String
+ * @param dstPos the position in {@code dst} where to copy the result
+ * @param nHexs the number of chars to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB)
+ * @return {@code dst}
+ * @throws IllegalArgumentException if {@code (nHexs - 1) * 4 + srcPos >= 8}
+ * @throws StringIndexOutOfBoundsException if {@code dst.init.length() < dstPos}
*/
public static String byteToHex(final byte src, final int srcPos, final String dstInit, final int dstPos, final int nHexs) {
if (0 == nHexs) {
@@ -554,9 +554,9 @@ public static String byteToHex(final byte src, final int srcPos, final String ds
* '1' is converted as follow: (0, 0, 0, 1).
*
*
- * @param hexChar the hexadecimal digit to convert.
- * @return a boolean array with the binary representation of {@code hexDigit}.
- * @throws IllegalArgumentException if {@code hexDigit} is not a hexadecimal digit.
+ * @param hexChar the hexadecimal digit to convert
+ * @return a boolean array with the binary representation of {@code hexDigit}
+ * @throws IllegalArgumentException if {@code hexDigit} is not a hexadecimal digit
*/
public static boolean[] hexDigitMsb0ToBinary(final char hexChar) {
switch (hexChar) {
@@ -610,9 +610,9 @@ public static boolean[] hexDigitMsb0ToBinary(final char hexChar) {
* '1' is converted to 8.
*
*
- * @param hexChar the hexadecimal digit to convert.
- * @return an int equals to {@code hexDigit}.
- * @throws IllegalArgumentException if {@code hexDigit} is not a hexadecimal digit.
+ * @param hexChar the hexadecimal digit to convert
+ * @return an int equals to {@code hexDigit}
+ * @throws IllegalArgumentException if {@code hexDigit} is not a hexadecimal digit
*/
public static int hexDigitMsb0ToInt(final char hexChar) {
switch (hexChar) {
@@ -666,9 +666,9 @@ public static int hexDigitMsb0ToInt(final char hexChar) {
* '1' is converted as follow: (1, 0, 0, 0).
*
*
- * @param hexChar the hexadecimal digit to convert.
- * @return a boolean array with the binary representation of {@code hexDigit}.
- * @throws IllegalArgumentException if {@code hexDigit} is not a hexadecimal digit.
+ * @param hexChar the hexadecimal digit to convert
+ * @return a boolean array with the binary representation of {@code hexDigit}
+ * @throws IllegalArgumentException if {@code hexDigit} is not a hexadecimal digit
*/
public static boolean[] hexDigitToBinary(final char hexChar) {
switch (hexChar) {
@@ -722,9 +722,9 @@ public static boolean[] hexDigitToBinary(final char hexChar) {
* '1' is converted to 1
*
*
- * @param hexChar the hexadecimal digit to convert.
- * @return an int equals to {@code hexDigit}.
- * @throws IllegalArgumentException if {@code hexDigit} is not a hexadecimal digit.
+ * @param hexChar the hexadecimal digit to convert
+ * @return an int equals to {@code hexDigit}
+ * @throws IllegalArgumentException if {@code hexDigit} is not a hexadecimal digit
*/
public static int hexDigitToInt(final char hexChar) {
final int digit = Character.digit(hexChar, 16);
@@ -737,13 +737,13 @@ public static int hexDigitToInt(final char hexChar) {
/**
* Converts a hexadecimal string into a byte using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the hexadecimal string to convert.
- * @param srcPos the position in {@code src}, in char unit, from where to start the conversion.
- * @param dstInit initial value of the destination byte.
- * @param dstPos the position of the LSB, in bits, in the result byte.
- * @param nHex the number of Chars to convert.
- * @return a byte containing the selected bits.
- * @throws IllegalArgumentException if {@code (nHex-1)*4+dstPos >= 8}.
+ * @param src the hexadecimal string to convert
+ * @param srcPos the position in {@code src}, in char unit, from where to start the conversion
+ * @param dstInit initial value of the destination byte
+ * @param dstPos the position of the LSB, in bits, in the result byte
+ * @param nHex the number of Chars to convert
+ * @return a byte containing the selected bits
+ * @throws IllegalArgumentException if {@code (nHex-1)*4+dstPos >= 8}
*/
public static byte hexToByte(final String src, final int srcPos, final byte dstInit, final int dstPos, final int nHex) {
if (0 == nHex) {
@@ -765,13 +765,13 @@ public static byte hexToByte(final String src, final int srcPos, final byte dstI
/**
* Converts an array of char into an int using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the hexadecimal string to convert.
- * @param srcPos the position in {@code src}, in char unit, from where to start the conversion.
- * @param dstInit initial value of the destination int.
- * @param dstPos the position of the LSB, in bits, in the result int.
- * @param nHex the number of chars to convert.
- * @return an int containing the selected bits.
- * @throws IllegalArgumentException if {@code (nHexs - 1) * 4 + dstPos >= 32}.
+ * @param src the hexadecimal string to convert
+ * @param srcPos the position in {@code src}, in char unit, from where to start the conversion
+ * @param dstInit initial value of the destination int
+ * @param dstPos the position of the LSB, in bits, in the result int
+ * @param nHex the number of chars to convert
+ * @return an int containing the selected bits
+ * @throws IllegalArgumentException if {@code (nHexs - 1) * 4 + dstPos >= 32}
*/
public static int hexToInt(final String src, final int srcPos, final int dstInit, final int dstPos, final int nHex) {
if (0 == nHex) {
@@ -793,13 +793,13 @@ public static int hexToInt(final String src, final int srcPos, final int dstInit
/**
* Converts an array of char into a long using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the hexadecimal string to convert.
- * @param srcPos the position in {@code src}, in char unit, from where to start the conversion.
- * @param dstInit initial value of the destination long.
- * @param dstPos the position of the LSB, in bits, in the result long.
- * @param nHex the number of chars to convert.
- * @return a long containing the selected bits.
- * @throws IllegalArgumentException if {@code (nHexs - 1) * 4 + dstPos >= 64}.
+ * @param src the hexadecimal string to convert
+ * @param srcPos the position in {@code src}, in char unit, from where to start the conversion
+ * @param dstInit initial value of the destination long
+ * @param dstPos the position of the LSB, in bits, in the result long
+ * @param nHex the number of chars to convert
+ * @return a long containing the selected bits
+ * @throws IllegalArgumentException if {@code (nHexs - 1) * 4 + dstPos >= 64}
*/
public static long hexToLong(final String src, final int srcPos, final long dstInit, final int dstPos, final int nHex) {
if (0 == nHex) {
@@ -821,13 +821,13 @@ public static long hexToLong(final String src, final int srcPos, final long dstI
/**
* Converts an array of char into a short using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the hexadecimal string to convert.
- * @param srcPos the position in {@code src}, in char unit, from where to start the conversion.
- * @param dstInit initial value of the destination short.
- * @param dstPos the position of the LSB, in bits, in the result short.
- * @param nHex the number of chars to convert.
- * @return a short containing the selected bits.
- * @throws IllegalArgumentException if {@code (nHexs - 1) * 4 + dstPos >= 16}.
+ * @param src the hexadecimal string to convert
+ * @param srcPos the position in {@code src}, in char unit, from where to start the conversion
+ * @param dstInit initial value of the destination short
+ * @param dstPos the position of the LSB, in bits, in the result short
+ * @param nHex the number of chars to convert
+ * @return a short containing the selected bits
+ * @throws IllegalArgumentException if {@code (nHexs - 1) * 4 + dstPos >= 16}
*/
public static short hexToShort(final String src, final int srcPos, final short dstInit, final int dstPos, final int nHex) {
if (0 == nHex) {
@@ -849,15 +849,15 @@ public static short hexToShort(final String src, final int srcPos, final short d
/**
* Converts an array of int into a long using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the int array to convert.
- * @param srcPos the position in {@code src}, in int unit, from where to start the conversion.
- * @param dstInit initial value of the destination long.
- * @param dstPos the position of the LSB, in bits, in the result long.
- * @param nInts the number of ints to convert.
- * @return a long containing the selected bits.
- * @throws IllegalArgumentException if {@code (nInts - 1) * 32 + dstPos >= 64}.
- * @throws NullPointerException if {@code src} is {@code null}.
- * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nInts > src.length}.
+ * @param src the int array to convert
+ * @param srcPos the position in {@code src}, in int unit, from where to start the conversion
+ * @param dstInit initial value of the destination long
+ * @param dstPos the position of the LSB, in bits, in the result long
+ * @param nInts the number of ints to convert
+ * @return a long containing the selected bits
+ * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nInts > src.length}
+ * @throws IllegalArgumentException if {@code (nInts - 1) * 32 + dstPos >= 64}
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static long intArrayToLong(final int[] src, final int srcPos, final long dstInit, final int dstPos, final int nInts) {
if (src.length == 0 && srcPos == 0 || 0 == nInts) {
@@ -879,15 +879,15 @@ public static long intArrayToLong(final int[] src, final int srcPos, final long
/**
* Converts an int into an array of boolean using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the int to convert.
- * @param srcPos the position in {@code src}, in bits, from where to start the conversion.
- * @param dst the destination array.
- * @param dstPos the position in {@code dst} where to copy the result.
- * @param nBools the number of booleans to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB).
- * @return {@code dst}.
- * @throws NullPointerException if {@code dst} is {@code null}.
- * @throws IllegalArgumentException if {@code nBools - 1 + srcPos >= 32}.
- * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nBools > dst.length}.
+ * @param src the int to convert
+ * @param srcPos the position in {@code src}, in bits, from where to start the conversion
+ * @param dst the destination array
+ * @param dstPos the position in {@code dst} where to copy the result
+ * @param nBools the number of booleans to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB)
+ * @return {@code dst}
+ * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nBools > dst.length}
+ * @throws IllegalArgumentException if {@code nBools - 1 + srcPos >= 32}
+ * @throws NullPointerException if {@code dst} is {@code null}
*/
public static boolean[] intToBinary(final int src, final int srcPos, final boolean[] dst, final int dstPos, final int nBools) {
if (0 == nBools) {
@@ -906,15 +906,15 @@ public static boolean[] intToBinary(final int src, final int srcPos, final boole
/**
* Converts an int into an array of byte using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the int to convert.
- * @param srcPos the position in {@code src}, in bits, from where to start the conversion.
- * @param dst the destination array.
- * @param dstPos the position in {@code dst} where to copy the result.
- * @param nBytes the number of bytes to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB).
- * @return {@code dst}.
- * @throws NullPointerException if {@code dst} is {@code null}.
- * @throws IllegalArgumentException if {@code (nBytes - 1) * 8 + srcPos >= 32}.
- * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nBytes > dst.length}.
+ * @param src the int to convert
+ * @param srcPos the position in {@code src}, in bits, from where to start the conversion
+ * @param dst the destination array
+ * @param dstPos the position in {@code dst} where to copy the result
+ * @param nBytes the number of bytes to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB)
+ * @return {@code dst}
+ * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nBytes > dst.length}
+ * @throws IllegalArgumentException if {@code (nBytes - 1) * 8 + srcPos >= 32}
+ * @throws NullPointerException if {@code dst} is {@code null}
*/
public static byte[] intToByteArray(final int src, final int srcPos, final byte[] dst, final int dstPos, final int nBytes) {
if (0 == nBytes) {
@@ -933,14 +933,14 @@ public static byte[] intToByteArray(final int src, final int srcPos, final byte[
/**
* Converts an int into an array of char using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the int to convert.
- * @param srcPos the position in {@code src}, in bits, from where to start the conversion.
- * @param dstInit the initial value for the result String.
- * @param dstPos the position in {@code dst} where to copy the result.
- * @param nHexs the number of chars to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB).
- * @return {@code dst}.
- * @throws IllegalArgumentException if {@code (nHexs - 1) * 4 + srcPos >= 32}.
- * @throws StringIndexOutOfBoundsException if {@code dst.init.length() < dstPos}.
+ * @param src the int to convert
+ * @param srcPos the position in {@code src}, in bits, from where to start the conversion
+ * @param dstInit the initial value for the result String
+ * @param dstPos the position in {@code dst} where to copy the result
+ * @param nHexs the number of chars to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB)
+ * @return {@code dst}
+ * @throws IllegalArgumentException if {@code (nHexs - 1) * 4 + srcPos >= 32}
+ * @throws StringIndexOutOfBoundsException if {@code dst.init.length() < dstPos}
*/
public static String intToHex(final int src, final int srcPos, final String dstInit, final int dstPos, final int nHexs) {
if (0 == nHexs) {
@@ -977,9 +977,9 @@ public static String intToHex(final int src, final int srcPos, final String dstI
* 10 returns 'A' and so on...
*
*
- * @param nibble the 4 bits to convert.
- * @return a hexadecimal digit representing the 4 LSB of {@code nibble}.
- * @throws IllegalArgumentException if {@code nibble < 0} or {@code nibble > 15}.
+ * @param nibble the 4 bits to convert
+ * @return a hexadecimal digit representing the 4 LSB of {@code nibble}
+ * @throws IllegalArgumentException if {@code nibble < 0} or {@code nibble > 15}
*/
public static char intToHexDigit(final int nibble) {
final char c = Character.forDigit(nibble, 16);
@@ -1002,9 +1002,9 @@ public static char intToHexDigit(final int nibble) {
* 10 returns '5' and so on...
*
*
- * @param nibble the 4 bits to convert.
- * @return a hexadecimal digit representing the 4 LSB of {@code nibble}.
- * @throws IllegalArgumentException if {@code nibble < 0} or {@code nibble > 15}.
+ * @param nibble the 4 bits to convert
+ * @return a hexadecimal digit representing the 4 LSB of {@code nibble}
+ * @throws IllegalArgumentException if {@code nibble < 0} or {@code nibble > 15}
*/
public static char intToHexDigitMsb0(final int nibble) {
switch (nibble) {
@@ -1048,15 +1048,15 @@ public static char intToHexDigitMsb0(final int nibble) {
/**
* Converts an int into an array of short using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the int to convert.
- * @param srcPos the position in {@code src}, in bits, from where to start the conversion.
- * @param dst the destination array.
- * @param dstPos the position in {@code dst} where to copy the result.
- * @param nShorts the number of shorts to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB).
- * @return {@code dst}.
- * @throws NullPointerException if {@code dst} is {@code null}.
- * @throws IllegalArgumentException if {@code (nShorts - 1) * 16 + srcPos >= 32}.
- * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nShorts > dst.length}.
+ * @param src the int to convert
+ * @param srcPos the position in {@code src}, in bits, from where to start the conversion
+ * @param dst the destination array
+ * @param dstPos the position in {@code dst} where to copy the result
+ * @param nShorts the number of shorts to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB)
+ * @return {@code dst}
+ * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nShorts > dst.length}
+ * @throws IllegalArgumentException if {@code (nShorts - 1) * 16 + srcPos >= 32}
+ * @throws NullPointerException if {@code dst} is {@code null}
*/
public static short[] intToShortArray(final int src, final int srcPos, final short[] dst, final int dstPos, final int nShorts) {
if (0 == nShorts) {
@@ -1075,15 +1075,15 @@ public static short[] intToShortArray(final int src, final int srcPos, final sho
/**
* Converts a long into an array of boolean using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the long to convert.
- * @param srcPos the position in {@code src}, in bits, from where to start the conversion.
- * @param dst the destination array.
- * @param dstPos the position in {@code dst} where to copy the result.
- * @param nBools the number of booleans to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB).
- * @return {@code dst}.
- * @throws NullPointerException if {@code dst} is {@code null}.
- * @throws IllegalArgumentException if {@code nBools - 1 + srcPos >= 64}.
- * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nBools > dst.length}.
+ * @param src the long to convert
+ * @param srcPos the position in {@code src}, in bits, from where to start the conversion
+ * @param dst the destination array
+ * @param dstPos the position in {@code dst} where to copy the result
+ * @param nBools the number of booleans to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB)
+ * @return {@code dst}
+ * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nBools > dst.length}
+ * @throws IllegalArgumentException if {@code nBools - 1 + srcPos >= 64}
+ * @throws NullPointerException if {@code dst} is {@code null}
*/
public static boolean[] longToBinary(final long src, final int srcPos, final boolean[] dst, final int dstPos, final int nBools) {
if (0 == nBools) {
@@ -1102,15 +1102,15 @@ public static boolean[] longToBinary(final long src, final int srcPos, final boo
/**
* Converts a long into an array of byte using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the long to convert.
- * @param srcPos the position in {@code src}, in bits, from where to start the conversion.
- * @param dst the destination array.
- * @param dstPos the position in {@code dst} where to copy the result.
- * @param nBytes the number of bytes to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB).
- * @return {@code dst}.
- * @throws NullPointerException if {@code dst} is {@code null}.
- * @throws IllegalArgumentException if {@code (nBytes - 1) * 8 + srcPos >= 64}.
- * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nBytes > dst.length}.
+ * @param src the long to convert
+ * @param srcPos the position in {@code src}, in bits, from where to start the conversion
+ * @param dst the destination array
+ * @param dstPos the position in {@code dst} where to copy the result
+ * @param nBytes the number of bytes to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB)
+ * @return {@code dst}
+ * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nBytes > dst.length}
+ * @throws IllegalArgumentException if {@code (nBytes - 1) * 8 + srcPos >= 64}
+ * @throws NullPointerException if {@code dst} is {@code null}
*/
public static byte[] longToByteArray(final long src, final int srcPos, final byte[] dst, final int dstPos, final int nBytes) {
if (0 == nBytes) {
@@ -1129,14 +1129,14 @@ public static byte[] longToByteArray(final long src, final int srcPos, final byt
/**
* Converts a long into an array of char using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the long to convert.
- * @param srcPos the position in {@code src}, in bits, from where to start the conversion.
- * @param dstInit the initial value for the result String.
- * @param dstPos the position in {@code dst} where to copy the result.
- * @param nHexs the number of chars to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB).
- * @return {@code dst}.
- * @throws IllegalArgumentException if {@code (nHexs - 1) * 4 + srcPos >= 64}.
- * @throws StringIndexOutOfBoundsException if {@code dst.init.length() < dstPos}.
+ * @param src the long to convert
+ * @param srcPos the position in {@code src}, in bits, from where to start the conversion
+ * @param dstInit the initial value for the result String
+ * @param dstPos the position in {@code dst} where to copy the result
+ * @param nHexs the number of chars to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB)
+ * @return {@code dst}
+ * @throws IllegalArgumentException if {@code (nHexs - 1) * 4 + srcPos >= 64}
+ * @throws StringIndexOutOfBoundsException if {@code dst.init.length() < dstPos}
*/
public static String longToHex(final long src, final int srcPos, final String dstInit, final int dstPos, final int nHexs) {
if (0 == nHexs) {
@@ -1163,15 +1163,15 @@ public static String longToHex(final long src, final int srcPos, final String ds
/**
* Converts a long into an array of int using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the long to convert.
- * @param srcPos the position in {@code src}, in bits, from where to start the conversion.
- * @param dst the destination array.
- * @param dstPos the position in {@code dst} where to copy the result.
- * @param nInts the number of ints to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB).
- * @return {@code dst}.
- * @throws NullPointerException if {@code dst} is {@code null} and {@code nInts > 0}.
- * @throws IllegalArgumentException if {@code (nInts - 1) * 32 + srcPos >= 64}.
- * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nInts > dst.length}.
+ * @param src the long to convert
+ * @param srcPos the position in {@code src}, in bits, from where to start the conversion
+ * @param dst the destination array
+ * @param dstPos the position in {@code dst} where to copy the result
+ * @param nInts the number of ints to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB)
+ * @return {@code dst}
+ * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nInts > dst.length}
+ * @throws IllegalArgumentException if {@code (nInts - 1) * 32 + srcPos >= 64}
+ * @throws NullPointerException if {@code dst} is {@code null} and {@code nInts > 0}
*/
public static int[] longToIntArray(final long src, final int srcPos, final int[] dst, final int dstPos, final int nInts) {
if (0 == nInts) {
@@ -1190,15 +1190,15 @@ public static int[] longToIntArray(final long src, final int srcPos, final int[]
/**
* Converts a long into an array of short using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the long to convert.
- * @param srcPos the position in {@code src}, in bits, from where to start the conversion.
- * @param dst the destination array.
- * @param dstPos the position in {@code dst} where to copy the result.
- * @param nShorts the number of shorts to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB).
- * @return {@code dst}.
- * @throws NullPointerException if {@code dst} is {@code null}.
- * @throws IllegalArgumentException if {@code (nShorts - 1) * 16 + srcPos >= 64}.
- * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nShorts > dst.length}.
+ * @param src the long to convert
+ * @param srcPos the position in {@code src}, in bits, from where to start the conversion
+ * @param dst the destination array
+ * @param dstPos the position in {@code dst} where to copy the result
+ * @param nShorts the number of shorts to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB)
+ * @return {@code dst}
+ * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nShorts > dst.length}
+ * @throws IllegalArgumentException if {@code (nShorts - 1) * 16 + srcPos >= 64}
+ * @throws NullPointerException if {@code dst} is {@code null}
*/
public static short[] longToShortArray(final long src, final int srcPos, final short[] dst, final int dstPos, final int nShorts) {
if (0 == nShorts) {
@@ -1217,15 +1217,15 @@ public static short[] longToShortArray(final long src, final int srcPos, final s
/**
* Converts an array of short into an int using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the short array to convert.
- * @param srcPos the position in {@code src}, in short unit, from where to start the conversion.
- * @param dstInit initial value of the destination int.
- * @param dstPos the position of the LSB, in bits, in the result int.
- * @param nShorts the number of shorts to convert.
- * @return an int containing the selected bits.
- * @throws NullPointerException if {@code src} is {@code null}.
- * @throws IllegalArgumentException if {@code (nShorts - 1) * 16 + dstPos >= 32}.
- * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nShorts > src.length}.
+ * @param src the short array to convert
+ * @param srcPos the position in {@code src}, in short unit, from where to start the conversion
+ * @param dstInit initial value of the destination int
+ * @param dstPos the position of the LSB, in bits, in the result int
+ * @param nShorts the number of shorts to convert
+ * @return an int containing the selected bits
+ * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nShorts > src.length}
+ * @throws IllegalArgumentException if {@code (nShorts - 1) * 16 + dstPos >= 32}
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static int shortArrayToInt(final short[] src, final int srcPos, final int dstInit, final int dstPos, final int nShorts) {
if (src.length == 0 && srcPos == 0 || 0 == nShorts) {
@@ -1247,15 +1247,15 @@ public static int shortArrayToInt(final short[] src, final int srcPos, final int
/**
* Converts an array of short into a long using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the short array to convert.
- * @param srcPos the position in {@code src}, in short unit, from where to start the conversion.
- * @param dstInit initial value of the destination long.
- * @param dstPos the position of the LSB, in bits, in the result long.
- * @param nShorts the number of shorts to convert.
- * @return a long containing the selected bits.
- * @throws NullPointerException if {@code src} is {@code null}.
- * @throws IllegalArgumentException if {@code (nShorts - 1) * 16 + dstPos >= 64}.
- * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nShorts > src.length}.
+ * @param src the short array to convert
+ * @param srcPos the position in {@code src}, in short unit, from where to start the conversion
+ * @param dstInit initial value of the destination long
+ * @param dstPos the position of the LSB, in bits, in the result long
+ * @param nShorts the number of shorts to convert
+ * @return a long containing the selected bits
+ * @throws ArrayIndexOutOfBoundsException if {@code srcPos + nShorts > src.length}
+ * @throws IllegalArgumentException if {@code (nShorts - 1) * 16 + dstPos >= 64}
+ * @throws NullPointerException if {@code src} is {@code null}
*/
public static long shortArrayToLong(final short[] src, final int srcPos, final long dstInit, final int dstPos, final int nShorts) {
if (src.length == 0 && srcPos == 0 || 0 == nShorts) {
@@ -1277,15 +1277,15 @@ public static long shortArrayToLong(final short[] src, final int srcPos, final l
/**
* Converts a short into an array of boolean using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the short to convert.
- * @param srcPos the position in {@code src}, in bits, from where to start the conversion.
- * @param dst the destination array.
- * @param dstPos the position in {@code dst} where to copy the result.
- * @param nBools the number of booleans to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB).
- * @return {@code dst}.
- * @throws NullPointerException if {@code dst} is {@code null}.
- * @throws IllegalArgumentException if {@code nBools - 1 + srcPos >= 16}.
- * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nBools > dst.length}.
+ * @param src the short to convert
+ * @param srcPos the position in {@code src}, in bits, from where to start the conversion
+ * @param dst the destination array
+ * @param dstPos the position in {@code dst} where to copy the result
+ * @param nBools the number of booleans to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB)
+ * @return {@code dst}
+ * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nBools > dst.length}
+ * @throws IllegalArgumentException if {@code nBools - 1 + srcPos >= 16}
+ * @throws NullPointerException if {@code dst} is {@code null}
*/
public static boolean[] shortToBinary(final short src, final int srcPos, final boolean[] dst, final int dstPos, final int nBools) {
if (0 == nBools) {
@@ -1305,15 +1305,15 @@ public static boolean[] shortToBinary(final short src, final int srcPos, final b
/**
* Converts a short into an array of byte using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the short to convert.
- * @param srcPos the position in {@code src}, in bits, from where to start the conversion.
- * @param dst the destination array.
- * @param dstPos the position in {@code dst} where to copy the result.
- * @param nBytes the number of bytes to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB).
- * @return {@code dst}.
- * @throws NullPointerException if {@code dst} is {@code null}.
- * @throws IllegalArgumentException if {@code (nBytes - 1) * 8 + srcPos >= 16}.
- * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nBytes > dst.length}.
+ * @param src the short to convert
+ * @param srcPos the position in {@code src}, in bits, from where to start the conversion
+ * @param dst the destination array
+ * @param dstPos the position in {@code dst} where to copy the result
+ * @param nBytes the number of bytes to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB)
+ * @return {@code dst}
+ * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nBytes > dst.length}
+ * @throws IllegalArgumentException if {@code (nBytes - 1) * 8 + srcPos >= 16}
+ * @throws NullPointerException if {@code dst} is {@code null}
*/
public static byte[] shortToByteArray(final short src, final int srcPos, final byte[] dst, final int dstPos, final int nBytes) {
if (0 == nBytes) {
@@ -1332,14 +1332,14 @@ public static byte[] shortToByteArray(final short src, final int srcPos, final b
/**
* Converts a short into an array of char using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the short to convert.
- * @param srcPos the position in {@code src}, in bits, from where to start the conversion.
- * @param dstInit the initial value for the result String.
- * @param dstPos the position in {@code dst} where to copy the result.
- * @param nHexs the number of chars to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB).
- * @return {@code dst}.
- * @throws IllegalArgumentException if {@code (nHexs - 1) * 4 + srcPos >= 16}.
- * @throws StringIndexOutOfBoundsException if {@code dst.init.length() < dstPos}.
+ * @param src the short to convert
+ * @param srcPos the position in {@code src}, in bits, from where to start the conversion
+ * @param dstInit the initial value for the result String
+ * @param dstPos the position in {@code dst} where to copy the result
+ * @param nHexs the number of chars to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB)
+ * @return {@code dst}
+ * @throws IllegalArgumentException if {@code (nHexs - 1) * 4 + srcPos >= 16}
+ * @throws StringIndexOutOfBoundsException if {@code dst.init.length() < dstPos}
*/
public static String shortToHex(final short src, final int srcPos, final String dstInit, final int dstPos, final int nHexs) {
if (0 == nHexs) {
@@ -1366,14 +1366,14 @@ public static String shortToHex(final short src, final int srcPos, final String
/**
* Converts UUID into an array of byte using the default (little-endian, LSB0) byte and bit ordering.
*
- * @param src the UUID to convert.
- * @param dst the destination array.
- * @param dstPos the position in {@code dst} where to copy the result.
- * @param nBytes the number of bytes to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB).
- * @return {@code dst}.
- * @throws NullPointerException if {@code dst} is {@code null}.
- * @throws IllegalArgumentException if {@code nBytes > 16}.
- * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nBytes > dst.length}.
+ * @param src the UUID to convert
+ * @param dst the destination array
+ * @param dstPos the position in {@code dst} where to copy the result
+ * @param nBytes the number of bytes to copy to {@code dst}, must be smaller or equal to the width of the input (from srcPos to MSB)
+ * @return {@code dst}
+ * @throws ArrayIndexOutOfBoundsException if {@code dstPos + nBytes > dst.length}
+ * @throws IllegalArgumentException if {@code nBytes > 16}
+ * @throws NullPointerException if {@code dst} is {@code null}
*/
public static byte[] uuidToByteArray(final UUID src, final byte[] dst, final int dstPos, final int nBytes) {
if (0 == nBytes) {
diff --git a/src/main/java/org/apache/commons/lang3/DoubleRange.java b/src/main/java/org/apache/commons/lang3/DoubleRange.java
index 060f4116e5a..fd4f9d12ec8 100644
--- a/src/main/java/org/apache/commons/lang3/DoubleRange.java
+++ b/src/main/java/org/apache/commons/lang3/DoubleRange.java
@@ -41,9 +41,9 @@ public final class DoubleRange extends NumberRange {
* The arguments may be passed in the order (min, max) or (max,min). The getMinimum and getMaximum methods will return the correct values.
*
*
- * @param fromInclusive the first value that defines the edge of the range, inclusive.
- * @param toInclusive the second value that defines the edge of the range, inclusive.
- * @return the range object, not null.
+ * @param fromInclusive the first value that defines the edge of the range, inclusive
+ * @param toInclusive the second value that defines the edge of the range, inclusive
+ * @return the range object, not null
*/
public static DoubleRange of(final double fromInclusive, final double toInclusive) {
return of(Double.valueOf(fromInclusive), Double.valueOf(toInclusive));
@@ -60,10 +60,10 @@ public static DoubleRange of(final double fromInclusive, final double toInclusiv
* The arguments may be passed in the order (min, max) or (max,min). The getMinimum and getMaximum methods will return the correct values.
*
*
- * @param fromInclusive the first value that defines the edge of the range, inclusive.
- * @param toInclusive the second value that defines the edge of the range, inclusive.
- * @return the range object, not null.
- * @throws NullPointerException if either element is null.
+ * @param fromInclusive the first value that defines the edge of the range, inclusive
+ * @param toInclusive the second value that defines the edge of the range, inclusive
+ * @return the range object, not null
+ * @throws NullPointerException if either element is null
*/
public static DoubleRange of(final Double fromInclusive, final Double toInclusive) {
return new DoubleRange(fromInclusive, toInclusive);
@@ -72,10 +72,10 @@ public static DoubleRange of(final Double fromInclusive, final Double toInclusiv
/**
* Creates an instance.
*
- * @param number1 the first element, not null.
- * @param number2 the second element, not null.
- * @throws NullPointerException when element1 is null.
- * @throws NullPointerException when element2 is null.
+ * @param number1 the first element, not null
+ * @param number2 the second element, not null
+ * @throws NullPointerException when element1 is null
+ * @throws NullPointerException when element2 is null
*/
private DoubleRange(final Double number1, final Double number2) {
super(number1, number2, null);
@@ -98,8 +98,8 @@ private DoubleRange(final Double number1, final Double number2) {
* range.fit(99) --> 64
* }
*
- * @param element the element to test.
- * @return the minimum, the element, or the maximum depending on the element's location relative to the range.
+ * @param element the element to test
+ * @return the minimum, the element, or the maximum depending on the element's location relative to the range
* @since 3.19.0
*/
public double fit(final double element) {
diff --git a/src/main/java/org/apache/commons/lang3/EnumUtils.java b/src/main/java/org/apache/commons/lang3/EnumUtils.java
index 513b3140ae5..79c51c16eb3 100644
--- a/src/main/java/org/apache/commons/lang3/EnumUtils.java
+++ b/src/main/java/org/apache/commons/lang3/EnumUtils.java
@@ -47,11 +47,11 @@ public class EnumUtils {
/**
* Validate {@code enumClass}.
*
- * @param the type of the enumeration.
- * @param enumClass to check.
- * @return {@code enumClass}.
- * @throws NullPointerException if {@code enumClass} is {@code null}.
- * @throws IllegalArgumentException if {@code enumClass} is not an enum class.
+ * @param the type of the enumeration
+ * @param enumClass to check
+ * @return {@code enumClass}
+ * @throws IllegalArgumentException if {@code enumClass} is not an enum class
+ * @throws NullPointerException if {@code enumClass} is {@code null}
* @since 3.2
*/
private static > Class asEnum(final Class enumClass) {
@@ -63,11 +63,11 @@ private static > Class asEnum(final Class enumClass) {
/**
* Validate that {@code enumClass} is compatible with representation in a {@code long}.
*
- * @param the type of the enumeration.
- * @param enumClass to check.
- * @return {@code enumClass}.
- * @throws NullPointerException if {@code enumClass} is {@code null}.
- * @throws IllegalArgumentException if {@code enumClass} is not an enum class or has more than 64 values.
+ * @param the type of the enumeration
+ * @param enumClass to check
+ * @return {@code enumClass}
+ * @throws IllegalArgumentException if {@code enumClass} is not an enum class or has more than 64 values
+ * @throws NullPointerException if {@code enumClass} is {@code null}
* @since 3.0.1
*/
private static > Class checkBitVectorable(final Class enumClass) {
@@ -85,14 +85,14 @@ private static > Class checkBitVectorable(final Class en
*
Do not use this method if you have more than 64 values in your Enum, as this
* would create a value greater than a long can hold.
*
- * @param enumClass the class of the enum we are working with, not {@code null}.
- * @param values the values we want to convert, not {@code null}.
- * @param the type of the enumeration.
- * @return a long whose value provides a binary representation of the given set of enum values.
- * @throws NullPointerException if {@code enumClass} or {@code values} is {@code null}.
- * @throws IllegalArgumentException if {@code enumClass} is not an enum class or has more than 64 values.
- * @since 3.0.1
+ * @param enumClass the class of the enum we are working with, not {@code null}
+ * @param values the values we want to convert, not {@code null}
+ * @param the type of the enumeration
+ * @return a long whose value provides a binary representation of the given set of enum values
+ * @throws IllegalArgumentException if {@code enumClass} is not an enum class or has more than 64 values
+ * @throws NullPointerException if {@code enumClass} or {@code values} is {@code null}
* @see #generateBitVectors(Class, Iterable)
+ * @since 3.0.1
*/
@SafeVarargs
public static > long generateBitVector(final Class enumClass, final E... values) {
@@ -108,15 +108,15 @@ public static > long generateBitVector(final Class enumClas
*
Do not use this method if you have more than 64 values in your Enum, as this
* would create a value greater than a long can hold.
*
- * @param enumClass the class of the enum we are working with, not {@code null}.
- * @param values the values we want to convert, not {@code null}, neither containing {@code null}.
- * @param the type of the enumeration.
- * @return a long whose value provides a binary representation of the given set of enum values.
- * @throws NullPointerException if {@code enumClass} or {@code values} is {@code null}.
+ * @param enumClass the class of the enum we are working with, not {@code null}
+ * @param values the values we want to convert, not {@code null}, neither containing {@code null}
+ * @param the type of the enumeration
+ * @return a long whose value provides a binary representation of the given set of enum values
* @throws IllegalArgumentException if {@code enumClass} is not an enum class or has more than 64 values,
- * or if any {@code values} {@code null}.
- * @since 3.0.1
+ * or if any {@code values} {@code null}
+ * @throws NullPointerException if {@code enumClass} or {@code values} is {@code null}
* @see #generateBitVectors(Class, Iterable)
+ * @since 3.0.1
*/
public static > long generateBitVector(final Class enumClass, final Iterable extends E> values) {
checkBitVectorable(enumClass);
@@ -136,13 +136,13 @@ public static > long generateBitVector(final Class enumClas
*
*
Use this method if you have more than 64 values in your Enum.
*
- * @param enumClass the class of the enum we are working with, not {@code null}.
- * @param values the values we want to convert, not {@code null}, neither containing {@code null}.
- * @param the type of the enumeration.
+ * @param enumClass the class of the enum we are working with, not {@code null}
+ * @param values the values we want to convert, not {@code null}, neither containing {@code null}
+ * @param the type of the enumeration
* @return a long[] whose values provide a binary representation of the given set of enum values
- * with the least significant digits rightmost.
- * @throws NullPointerException if {@code enumClass} or {@code values} is {@code null}.
- * @throws IllegalArgumentException if {@code enumClass} is not an enum class, or if any {@code values} {@code null}.
+ * with the least significant digits rightmost
+ * @throws IllegalArgumentException if {@code enumClass} is not an enum class, or if any {@code values} {@code null}
+ * @throws NullPointerException if {@code enumClass} or {@code values} is {@code null}
* @since 3.2
*/
@SafeVarargs
@@ -166,13 +166,13 @@ public static > long[] generateBitVectors(final Class enumC
*
*
Use this method if you have more than 64 values in your Enum.
*
- * @param enumClass the class of the enum we are working with, not {@code null}.
- * @param values the values we want to convert, not {@code null}, neither containing {@code null}.
- * @param the type of the enumeration.
+ * @param enumClass the class of the enum we are working with, not {@code null}
+ * @param values the values we want to convert, not {@code null}, neither containing {@code null}
+ * @param the type of the enumeration
* @return a long[] whose values provide a binary representation of the given set of enum values
- * with the least significant digits rightmost.
- * @throws NullPointerException if {@code enumClass} or {@code values} is {@code null}.
- * @throws IllegalArgumentException if {@code enumClass} is not an enum class, or if any {@code values} {@code null}.
+ * with the least significant digits rightmost
+ * @throws IllegalArgumentException if {@code enumClass} is not an enum class, or if any {@code values} {@code null}
+ * @throws NullPointerException if {@code enumClass} or {@code values} is {@code null}
* @since 3.2
*/
public static > long[] generateBitVectors(final Class enumClass, final Iterable extends E> values) {
@@ -194,10 +194,10 @@ public static > long[] generateBitVectors(final Class enumC
*
This method differs from {@link Enum#valueOf} in that it does not throw an exception
* for an invalid enum name.
*
- * @param the type of the enumeration.
- * @param enumClass the class of the enum to query, not null.
- * @param enumName the enum name, null returns null.
- * @return the enum, null if not found.
+ * @param the type of the enumeration
+ * @param enumClass the class of the enum to query, not null
+ * @param enumName the enum name, null returns null
+ * @return the enum, null if not found
*/
public static > E getEnum(final Class enumClass, final String enumName) {
return getEnum(enumClass, enumName, null);
@@ -209,11 +209,11 @@ public static > E getEnum(final Class enumClass, final Stri
*
This method differs from {@link Enum#valueOf} in that it does not throw an exception
* for an invalid enum name.
*
- * @param the type of the enumeration.
- * @param enumClass the class of the enum to query, null returns default enum.
- * @param enumName the enum name, null returns default enum.
- * @param defaultEnum the default enum.
- * @return the enum, default enum if not found.
+ * @param the type of the enumeration
+ * @param enumClass the class of the enum to query, null returns default enum
+ * @param enumName the enum name, null returns default enum
+ * @param defaultEnum the default enum
+ * @return the enum, default enum if not found
* @since 3.10
*/
public static > E getEnum(final Class enumClass, final String enumName, final E defaultEnum) {
@@ -233,10 +233,10 @@ public static > E getEnum(final Class enumClass, final Stri
*
This method differs from {@link Enum#valueOf} in that it does not throw an exception
* for an invalid enum name and performs case insensitive matching of the name.
*
- * @param the type of the enumeration.
- * @param enumClass the class of the enum to query, may be null.
- * @param enumName the enum name, null returns null.
- * @return the enum, null if not found.
+ * @param the type of the enumeration
+ * @param enumClass the class of the enum to query, may be null
+ * @param enumName the enum name, null returns null
+ * @return the enum, null if not found
* @since 3.8
*/
public static > E getEnumIgnoreCase(final Class enumClass, final String enumName) {
@@ -249,11 +249,11 @@ public static > E getEnumIgnoreCase(final Class enumClass,
*
This method differs from {@link Enum#valueOf} in that it does not throw an exception
* for an invalid enum name and performs case insensitive matching of the name.
*
- * @param the type of the enumeration.
- * @param enumClass the class of the enum to query, null returns default enum.
- * @param enumName the enum name, null returns default enum.
- * @param defaultEnum the default enum.
- * @return the enum, default enum if not found.
+ * @param the type of the enumeration
+ * @param enumClass the class of the enum to query, null returns default enum
+ * @param enumName the enum name, null returns default enum
+ * @param defaultEnum the default enum
+ * @return the enum, default enum if not found
* @since 3.10
*/
public static > E getEnumIgnoreCase(final Class enumClass, final String enumName,
@@ -266,9 +266,9 @@ public static > E getEnumIgnoreCase(final Class enumClass,
*
*
This method is useful when you need a list of enums rather than an array.
*
- * @param the type of the enumeration.
- * @param enumClass the class of the enum to query, not null.
- * @return the modifiable list of enums, never null.
+ * @param the type of the enumeration
+ * @param enumClass the class of the enum to query, not null
+ * @return the modifiable list of enums, never null
*/
public static > List getEnumList(final Class enumClass) {
return new ArrayList<>(Arrays.asList(enumClass.getEnumConstants()));
@@ -279,9 +279,9 @@ public static > List getEnumList(final Class enumClass)
*
*
This method is useful when you need a map of enums by name.
*
- * @param the type of the enumeration.
- * @param enumClass the class of the enum to query, not null.
- * @return the modifiable map of enum names to enums, never null.
+ * @param the type of the enumeration
+ * @param enumClass the class of the enum to query, not null
+ * @return the modifiable map of enum names to enums, never null
*/
public static > Map getEnumMap(final Class enumClass) {
return getEnumMap(enumClass, E::name);
@@ -294,11 +294,11 @@ public static > Map getEnumMap(final Class enumC
* This method is useful when you need a map of enums by name.
*
*
- * @param the type of enumeration.
- * @param the type of the map key.
- * @param enumClass the class of the enum to query, not null.
- * @param keyFunction the function to query for the key, not null.
- * @return the modifiable map of enums, never null.
+ * @param the type of enumeration
+ * @param the type of the map key
+ * @param enumClass the class of the enum to query, not null
+ * @param keyFunction the function to query for the key, not null
+ * @return the modifiable map of enums, never null
* @since 3.13.0
*/
public static , K> Map getEnumMap(final Class enumClass, final Function keyFunction) {
@@ -315,11 +315,11 @@ public static , K> Map getEnumMap(final Class enumCla
* If a {@link SecurityException} is caught, the return value is {@code null}.
*
*
- * @param the type of the enumeration.
- * @param enumClass the class of the enum to query, not null.
- * @param propName the system property key for the enum name, null returns default enum.
- * @param defaultEnum the default enum.
- * @return the enum, default enum if not found.
+ * @param the type of the enumeration
+ * @param enumClass the class of the enum to query, not null
+ * @param propName the system property key for the enum name, null returns default enum
+ * @param defaultEnum the default enum
+ * @return the enum, default enum if not found
* @since 3.13.0
*/
public static > E getEnumSystemProperty(final Class enumClass, final String propName, final E defaultEnum) {
@@ -334,12 +334,12 @@ public static > E getEnumSystemProperty(final Class enumCla
* the name.
*
*
- * @param the type of the enumeration.
- * @param enumClass the class of the enum to query, not null.
- * @param value the enum name, null returns default enum.
- * @param toIntFunction the function that gets an int for an enum for comparison to {@code value}.
- * @param defaultEnum the default enum.
- * @return an enum, default enum if not found.
+ * @param the type of the enumeration
+ * @param enumClass the class of the enum to query, not null
+ * @param value the enum name, null returns default enum
+ * @param toIntFunction the function that gets an int for an enum for comparison to {@code value}
+ * @param defaultEnum the default enum
+ * @return an enum, default enum if not found
* @since 3.18.0
*/
public static > E getFirstEnum(final Class enumClass, final int value, final ToIntFunction toIntFunction, final E defaultEnum) {
@@ -355,12 +355,12 @@ public static > E getFirstEnum(final Class enumClass, final
*
This method differs from {@link Enum#valueOf} in that it does not throw an exception
* for an invalid enum name and performs case insensitive matching of the name.
*
- * @param the type of the enumeration.
- * @param enumClass the class of the enum to query, null returns default enum.
- * @param enumName the enum name, null returns default enum.
- * @param stringFunction the function that gets the string for an enum for comparison to {@code enumName}.
- * @param defaultEnum the default enum.
- * @return an enum, default enum if not found.
+ * @param the type of the enumeration
+ * @param enumClass the class of the enum to query, null returns default enum
+ * @param enumName the enum name, null returns default enum
+ * @param stringFunction the function that gets the string for an enum for comparison to {@code enumName}
+ * @param defaultEnum the default enum
+ * @return an enum, default enum if not found
* @since 3.13.0
*/
public static > E getFirstEnumIgnoreCase(final Class enumClass, final String enumName, final Function stringFunction,
@@ -382,10 +382,10 @@ private static > boolean isEnum(final Class enumClass) {
* This method differs from {@link Enum#valueOf} in that it checks if the name is a valid enum without needing to catch the exception.
*
*
- * @param the type of the enumeration.
- * @param enumClass the class of the enum to query, null returns false.
- * @param enumName the enum name, null returns false.
- * @return true if the enum name is valid, otherwise false.
+ * @param the type of the enumeration
+ * @param enumClass the class of the enum to query, null returns false
+ * @param enumName the enum name, null returns false
+ * @return true if the enum name is valid, otherwise false
*/
public static > boolean isValidEnum(final Class enumClass, final String enumName) {
return getEnum(enumClass, enumName) != null;
@@ -399,10 +399,10 @@ public static > boolean isValidEnum(final Class enumClass,
* insensitive matching of the name.
*
*
- * @param the type of the enumeration.
- * @param enumClass the class of the enum to query, null returns false.
- * @param enumName the enum name, null returns false.
- * @return true if the enum name is valid, otherwise false.
+ * @param the type of the enumeration
+ * @param enumClass the class of the enum to query, null returns false
+ * @param enumName the enum name, null returns false
+ * @return true if the enum name is valid, otherwise false
* @since 3.8
*/
public static > boolean isValidEnumIgnoreCase(final Class enumClass, final String enumName) {
@@ -415,12 +415,12 @@ public static > boolean isValidEnumIgnoreCase(final Class e
*
*
If you store this value, beware any changes to the enum that would affect ordinal values.
*
- * @param enumClass the class of the enum we are working with, not {@code null}.
- * @param value the long value representation of a set of enum values.
- * @param the type of the enumeration.
- * @return a set of enum values.
- * @throws NullPointerException if {@code enumClass} is {@code null}.
- * @throws IllegalArgumentException if {@code enumClass} is not an enum class or has more than 64 values.
+ * @param enumClass the class of the enum we are working with, not {@code null}
+ * @param value the long value representation of a set of enum values
+ * @param the type of the enumeration
+ * @return a set of enum values
+ * @throws IllegalArgumentException if {@code enumClass} is not an enum class or has more than 64 values
+ * @throws NullPointerException if {@code enumClass} is {@code null}
* @since 3.0.1
*/
public static > EnumSet processBitVector(final Class enumClass, final long value) {
@@ -433,12 +433,12 @@ public static > EnumSet processBitVector(final Class enu
*
*
If you store this value, beware any changes to the enum that would affect ordinal values.
*
- * @param enumClass the class of the enum we are working with, not {@code null}.
- * @param values the long[] bearing the representation of a set of enum values, the least significant digits rightmost, not {@code null}.
- * @param the type of the enumeration.
- * @return a set of enum values.
- * @throws NullPointerException if {@code enumClass} is {@code null}.
- * @throws IllegalArgumentException if {@code enumClass} is not an enum class.
+ * @param enumClass the class of the enum we are working with, not {@code null}
+ * @param values the long[] bearing the representation of a set of enum values, the least significant digits rightmost, not {@code null}
+ * @param the type of the enumeration
+ * @return a set of enum values
+ * @throws IllegalArgumentException if {@code enumClass} is not an enum class
+ * @throws NullPointerException if {@code enumClass} is {@code null}
* @since 3.2
*/
public static > EnumSet processBitVectors(final Class enumClass, final long... values) {
@@ -457,11 +457,11 @@ public static > EnumSet processBitVectors(final Class en
/**
* Returns a sequential ordered stream whose elements are the given class' enum values.
*
- * @param the type of stream elements.
- * @param clazz the class containing the enum values, may be null.
- * @return the new stream, empty of {@code clazz} is null.
- * @since 3.18.0
+ * @param the type of stream elements
+ * @param clazz the class containing the enum values, may be null
+ * @return the new stream, empty of {@code clazz} is null
* @see Class#getEnumConstants()
+ * @since 3.18.0
*/
public static Stream stream(final Class clazz) {
return clazz != null ? Streams.of(clazz.getEnumConstants()) : Stream.empty();
diff --git a/src/main/java/org/apache/commons/lang3/Functions.java b/src/main/java/org/apache/commons/lang3/Functions.java
index 70f0aaf3927..5b5b5fc09bd 100644
--- a/src/main/java/org/apache/commons/lang3/Functions.java
+++ b/src/main/java/org/apache/commons/lang3/Functions.java
@@ -80,9 +80,9 @@ public class Functions {
*
*
TODO for 4.0: Move to org.apache.commons.lang3.function.
*
- * @param Consumed type 1.
- * @param Consumed type 2.
- * @param Thrown exception.
+ * @param consumed type 1
+ * @param consumed type 2
+ * @param thrown exception
* @deprecated Use {@link org.apache.commons.lang3.function.FailableBiConsumer}.
*/
@Deprecated
@@ -94,7 +94,7 @@ public interface FailableBiConsumer {
*
* @param object1 the first parameter for the consumable to accept
* @param object2 the second parameter for the consumable to accept
- * @throws T Thrown when the consumer fails.
+ * @throws T thrown when the consumer fails
*/
void accept(O1 object1, O2 object2) throws T;
}
@@ -104,10 +104,10 @@ public interface FailableBiConsumer {
*
*
TODO for 4.0: Move to org.apache.commons.lang3.function.
*
- * @param Input type 1.
- * @param Input type 2.
- * @param Return type.
- * @param Thrown exception.
+ * @param input type 1
+ * @param input type 2
+ * @param return type
+ * @param thrown exception
* @deprecated Use {@link org.apache.commons.lang3.function.FailableBiFunction}.
*/
@Deprecated
@@ -120,7 +120,7 @@ public interface FailableBiFunction {
* @param input1 the first input for the function
* @param input2 the second input for the function
* @return the result of the function
- * @throws T Thrown when the function fails.
+ * @throws T thrown when the function fails
*/
R apply(O1 input1, O2 input2) throws T;
}
@@ -130,9 +130,9 @@ public interface FailableBiFunction {
*
*
TODO for 4.0: Move to org.apache.commons.lang3.function.
*
- * @param Predicate type 1.
- * @param Predicate type 2.
- * @param Thrown exception.
+ * @param predicate type 1
+ * @param predicate type 2
+ * @param thrown exception
* @deprecated Use {@link org.apache.commons.lang3.function.FailableBiPredicate}.
*/
@Deprecated
@@ -155,8 +155,8 @@ public interface FailableBiPredicate {
*
*
TODO for 4.0: Move to org.apache.commons.lang3.function.
*
- * @param Return type.
- * @param Thrown exception.
+ * @param return type
+ * @param thrown exception
* @deprecated Use {@link org.apache.commons.lang3.function.FailableCallable}.
*/
@Deprecated
@@ -166,7 +166,7 @@ public interface FailableCallable {
/**
* Calls the callable.
*
- * @return The value returned from the callable
+ * @return the value returned from the callable
* @throws T if the callable fails
*/
R call() throws T;
@@ -177,8 +177,8 @@ public interface FailableCallable {
*
*
TODO for 4.0: Move to org.apache.commons.lang3.function.
*
- * @param Consumed type 1.
- * @param Thrown exception.
+ * @param consumed type 1
+ * @param thrown exception
* @deprecated Use {@link org.apache.commons.lang3.function.FailableConsumer}.
*/
@Deprecated
@@ -189,7 +189,7 @@ public interface FailableConsumer {
* Accepts the consumer.
*
* @param object the parameter for the consumable to accept
- * @throws T Thrown when the consumer fails.
+ * @throws T thrown when the consumer fails
*/
void accept(O object) throws T;
}
@@ -199,9 +199,9 @@ public interface FailableConsumer {
*
*
TODO for 4.0: Move to org.apache.commons.lang3.function.
*
- * @param Input type 1.
- * @param Return type.
- * @param Thrown exception.
+ * @param input type 1
+ * @param return type
+ * @param thrown exception
* @deprecated Use {@link org.apache.commons.lang3.function.FailableFunction}.
*/
@Deprecated
@@ -213,7 +213,7 @@ public interface FailableFunction {
*
* @param input the input for the function
* @return the result of the function
- * @throws T Thrown when the function fails.
+ * @throws T thrown when the function fails
*/
R apply(I input) throws T;
}
@@ -223,8 +223,8 @@ public interface FailableFunction {
*
*
TODO for 4.0: Move to org.apache.commons.lang3.function.
*
- * @param Predicate type 1.
- * @param Thrown exception.
+ * @param predicate type 1
+ * @param thrown exception
* @deprecated Use {@link org.apache.commons.lang3.function.FailablePredicate}.
*/
@Deprecated
@@ -246,7 +246,7 @@ public interface FailablePredicate {
*
*
TODO for 4.0: Move to org.apache.commons.lang3.function.
*
- * @param Thrown exception.
+ * @param thrown exception
* @deprecated Use {@link org.apache.commons.lang3.function.FailableRunnable}.
*/
@Deprecated
@@ -256,7 +256,7 @@ public interface FailableRunnable {
/**
* Runs the function.
*
- * @throws T Thrown when the function fails.
+ * @throws T thrown when the function fails
*/
void run() throws T;
}
@@ -266,8 +266,8 @@ public interface FailableRunnable {
*
*
TODO for 4.0: Move to org.apache.commons.lang3.function.
*
- * @param Return type.
- * @param Thrown exception.
+ * @param return type
+ * @param thrown exception
* @deprecated Use {@link org.apache.commons.lang3.function.FailableSupplier}.
*/
@Deprecated
@@ -275,7 +275,7 @@ public interface FailableRunnable {
public interface FailableSupplier {
/**
- * Supplies an object
+ * Supplies an object.
*
* @return a result
* @throws T if the supplier fails
@@ -468,10 +468,10 @@ public static O call(final FailableCallable calla
/**
* Invokes a supplier, and returns the result.
*
- * @param supplier The supplier to invoke.
- * @param The suppliers output type.
- * @param The type of checked exception, which the supplier can throw.
- * @return The object, which has been created by the supplier
+ * @param supplier the supplier to invoke
+ * @param the suppliers output type
+ * @param the type of checked exception, which the supplier can throw
+ * @return the object, which has been created by the supplier
* @since 3.10
*/
public static O get(final FailableSupplier supplier) {
@@ -485,9 +485,9 @@ public static O get(final FailableSupplier suppli
/**
* Invokes a boolean supplier, and returns the result.
*
- * @param supplier The boolean supplier to invoke.
- * @param The type of checked exception, which the supplier can throw.
- * @return The boolean, which has been created by the supplier
+ * @param supplier the boolean supplier to invoke
+ * @param the type of checked exception, which the supplier can throw
+ * @return the boolean, which has been created by the supplier
*/
private static boolean getAsBoolean(final FailableBooleanSupplier supplier) {
try {
@@ -518,8 +518,8 @@ private static boolean getAsBoolean(final FailableBooleanS
* follow the method call, like a {@code return} statement from a value returning method.
*
*
- * @param throwable The throwable to rethrow possibly wrapped into an unchecked exception
- * @return Never returns anything, this method never terminates normally.
+ * @param throwable the throwable to rethrow possibly wrapped into an unchecked exception
+ * @return never returns anything, this method never terminates normally
*/
public static RuntimeException rethrow(final Throwable throwable) {
Objects.requireNonNull(throwable, "throwable");
@@ -533,7 +533,7 @@ public static RuntimeException rethrow(final Throwable throwable) {
/**
* Runs a runnable and rethrows any exception as a {@link RuntimeException}.
*
- * @param runnable The runnable to run
+ * @param runnable the runnable to run
* @param the type of checked exception the runnable may throw
*/
public static void run(final FailableRunnable runnable) {
@@ -551,9 +551,9 @@ public static void run(final FailableRunnable runnable)
*
* Functions.stream(collection.stream());
*
- * @param collection The collection, which is being converted into a {@link FailableStream}.
- * @param The collections element type. (In turn, the result streams element type.)
- * @return The created {@link FailableStream}.
+ * @param collection the collection, which is being converted into a {@link FailableStream}
+ * @param the collections element type. (In turn, the result streams element type.)
+ * @return the created {@link FailableStream}
* @since 3.10
*/
public static FailableStream stream(final Collection collection) {
@@ -566,9 +566,9 @@ public static