This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-lang.git
The following commit(s) were added to refs/heads/master by this push: new 8f9f302e0 Javadoc 8f9f302e0 is described below commit 8f9f302e015e28c227c9a2a63e96ebc82f953fdb Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Thu Mar 13 15:26:35 2025 -0400 Javadoc --- .../java/org/apache/commons/lang3/ArrayUtils.java | 92 +++++++++++----------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/ArrayUtils.java b/src/main/java/org/apache/commons/lang3/ArrayUtils.java index bb892c699..ae8d92ab9 100644 --- a/src/main/java/org/apache/commons/lang3/ArrayUtils.java +++ b/src/main/java/org/apache/commons/lang3/ArrayUtils.java @@ -1848,7 +1848,7 @@ public static <T> Class<T> getComponentType(final T[] array) { * ArrayUtils.getLength(["a", "b", "c"]) = 3 * </pre> * - * @param array the array to retrieve the length from, may be null + * @param array the array to retrieve the length from, may be {@code null}. * @return The length of the array, or {@code 0} if the array is {@code null} * @throws IllegalArgumentException if the object argument is not an array. * @since 2.1 @@ -3193,7 +3193,7 @@ private static boolean isArrayEmpty(final Object array) { * </pre> * * @param <T> the component type of the array - * @param array the array to inspect, may be null + * @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 @@ -6746,7 +6746,7 @@ public static void reverse(final double[] array, final int startIndexInclusive, * This method does nothing for a {@code null} input array. * </p> * - * @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) { @@ -6761,7 +6761,7 @@ public static void reverse(final float[] array) { * </p> * * @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. @@ -6792,7 +6792,7 @@ public static void reverse(final float[] array, final int startIndexInclusive, f * This method does nothing for a {@code null} input array. * </p> * - * @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) { @@ -6807,7 +6807,7 @@ public static void reverse(final int[] array) { * </p> * * @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. @@ -6838,7 +6838,7 @@ public static void reverse(final int[] array, final int startIndexInclusive, fin * This method does nothing for a {@code null} input array. * </p> * - * @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) { @@ -6853,7 +6853,7 @@ public static void reverse(final long[] array) { * </p> * * @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. @@ -6887,7 +6887,7 @@ public static void reverse(final long[] array, final int startIndexInclusive, fi * This method does nothing for a {@code null} input array. * </p> * - * @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) { @@ -6902,7 +6902,7 @@ public static void reverse(final Object[] array) { * </p> * * @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. @@ -6933,7 +6933,7 @@ public static void reverse(final Object[] array, final int startIndexInclusive, * This method does nothing for a {@code null} input array. * </p> * - * @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) { @@ -6948,7 +6948,7 @@ public static void reverse(final short[] array) { * </p> * * @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. @@ -6980,8 +6980,8 @@ public static void reverse(final short[] array, final int startIndexInclusive, f * state. * </p> * - * @param <T> type of elements of the array. - * @param array array to be initialized. + * @param <T> 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 @@ -7000,8 +7000,8 @@ public static <T> T[] setAll(final T[] array, final IntFunction<? extends T> gen * state. * </p> * - * @param <T> type of elements of the array. - * @param array array to be initialized. + * @param <T> 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 @@ -7021,7 +7021,7 @@ public static <T> T[] setAll(final T[] array, final Supplier<? extends T> genera * <p>There is no special handling for multi-dimensional arrays. This method * does nothing for {@code null} or empty input arrays.</p> * - * @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. @@ -7040,7 +7040,7 @@ public static void shift(final boolean[] array, final int offset) { * does nothing for {@code null} or empty input arrays.</p> * * @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. @@ -7091,7 +7091,7 @@ public static void shift(final boolean[] array, int startIndexInclusive, int end * <p>There is no special handling for multi-dimensional arrays. This method * does nothing for {@code null} or empty input arrays.</p> * - * @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. @@ -7110,7 +7110,7 @@ public static void shift(final byte[] array, final int offset) { * does nothing for {@code null} or empty input arrays.</p> * * @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. @@ -7161,7 +7161,7 @@ public static void shift(final byte[] array, int startIndexInclusive, int endInd * <p>There is no special handling for multi-dimensional arrays. This method * does nothing for {@code null} or empty input arrays.</p> * - * @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. @@ -7180,7 +7180,7 @@ public static void shift(final char[] array, final int offset) { * does nothing for {@code null} or empty input arrays.</p> * * @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. @@ -7231,7 +7231,7 @@ public static void shift(final char[] array, int startIndexInclusive, int endInd * <p>There is no special handling for multi-dimensional arrays. This method * does nothing for {@code null} or empty input arrays.</p> * - * @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. @@ -7250,7 +7250,7 @@ public static void shift(final double[] array, final int offset) { * does nothing for {@code null} or empty input arrays.</p> * * @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. @@ -7301,7 +7301,7 @@ public static void shift(final double[] array, int startIndexInclusive, int endI * <p>There is no special handling for multi-dimensional arrays. This method * does nothing for {@code null} or empty input arrays.</p> * - * @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. @@ -7320,7 +7320,7 @@ public static void shift(final float[] array, final int offset) { * does nothing for {@code null} or empty input arrays.</p> * * @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. @@ -7371,7 +7371,7 @@ public static void shift(final float[] array, int startIndexInclusive, int endIn * <p>There is no special handling for multi-dimensional arrays. This method * does nothing for {@code null} or empty input arrays.</p> * - * @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. @@ -7390,7 +7390,7 @@ public static void shift(final int[] array, final int offset) { * does nothing for {@code null} or empty input arrays.</p> * * @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. @@ -7441,7 +7441,7 @@ public static void shift(final int[] array, int startIndexInclusive, int endInde * <p>There is no special handling for multi-dimensional arrays. This method * does nothing for {@code null} or empty input arrays.</p> * - * @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. @@ -7460,7 +7460,7 @@ public static void shift(final long[] array, final int offset) { * does nothing for {@code null} or empty input arrays.</p> * * @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. @@ -7511,7 +7511,7 @@ public static void shift(final long[] array, int startIndexInclusive, int endInd * <p>There is no special handling for multi-dimensional arrays. This method * does nothing for {@code null} or empty input arrays.</p> * - * @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. @@ -7530,7 +7530,7 @@ public static void shift(final Object[] array, final int offset) { * does nothing for {@code null} or empty input arrays.</p> * * @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. @@ -7581,7 +7581,7 @@ public static void shift(final Object[] array, int startIndexInclusive, int endI * <p>There is no special handling for multi-dimensional arrays. This method * does nothing for {@code null} or empty input arrays.</p> * - * @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. @@ -7600,7 +7600,7 @@ public static void shift(final short[] array, final int offset) { * does nothing for {@code null} or empty input arrays.</p> * * @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. @@ -8318,7 +8318,7 @@ public static <T> T[] subarray(final T[] array, int startIndexInclusive, int end * <li>ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]</li> * </ul> * - * @param array the array to swap, may be {@code null} + * @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 @@ -8345,7 +8345,7 @@ public static void swap(final boolean[] array, final int offset1, final int offs * <li>ArrayUtils.swap([true, false, true, false], 0, 3, 3) -> [false, false, true, true]</li> * </ul> * - * @param array the array to swap, may be {@code null} + * @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 @@ -8381,7 +8381,7 @@ public static void swap(final boolean[] array, int offset1, int offset2, int len * <li>ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]</li> * </ul> * - * @param array the array to swap, may be {@code null} + * @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 @@ -8408,7 +8408,7 @@ public static void swap(final byte[] array, final int offset1, final int offset2 * <li>ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]</li> * </ul> * - * @param array the array to swap, may be {@code null} + * @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 @@ -8444,7 +8444,7 @@ public static void swap(final byte[] array, int offset1, int offset2, int len) { * <li>ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]</li> * </ul> * - * @param array the array to swap, may be {@code null} + * @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 @@ -8471,7 +8471,7 @@ public static void swap(final char[] array, final int offset1, final int offset2 * <li>ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]</li> * </ul> * - * @param array the array to swap, may be {@code null} + * @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 @@ -8507,7 +8507,7 @@ public static void swap(final char[] array, int offset1, int offset2, int len) { * <li>ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]</li> * </ul> * - * @param array the array to swap, may be {@code null} + * @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 @@ -8534,7 +8534,7 @@ public static void swap(final double[] array, final int offset1, final int offse * <li>ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]</li> * </ul> * - * @param array the array to swap, may be {@code null} + * @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 @@ -8570,7 +8570,7 @@ public static void swap(final double[] array, int offset1, int offset2, int len * <li>ArrayUtils.swap([1, 2, 3], -1, 1) -> [2, 1, 3]</li> * </ul> * - * @param array the array to swap, may be {@code null} + * @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 @@ -8597,7 +8597,7 @@ public static void swap(final float[] array, final int offset1, final int offset * <li>ArrayUtils.swap([1, 2, 3, 4], 0, 3, 3) -> [4, 2, 3, 1]</li> * </ul> * - * @param array the array to swap, may be {@code null} + * @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 @@ -9585,7 +9585,7 @@ public static String toString(final Object array, final String stringIfNull) { * This method returns {@code null} for a {@code null} input array. * </p> * - * @param array the {@code Object[]} to be processed, may be null + * @param array the {@code Object[]} to be processed, may be {@code null}. * @return {@code String[]} of the same size as the source with its element's string representation, * {@code null} if null array input * @since 3.6 @@ -9601,7 +9601,7 @@ public static String[] toStringArray(final Object[] array) { * This method returns {@code null} for a {@code null} input array. * </p> * - * @param array the Object[] to be processed, may be null + * @param array the Object[] to be processed, may be {@code null}. * @param valueForNullElements the value to insert if {@code null} is found * @return a {@link String} array, {@code null} if null array input * @since 3.6