Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions src/main/java/org/apache/commons/lang3/ArrayUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -5276,7 +5276,7 @@ public static <T> T[] remove(final T[] array, final int index) {
* array is always the same as that of the input array.
* </p>
* <p>
* If the input array is {@code null}, an IndexOutOfBoundsException will be thrown, because in that case no valid index can be specified.
* If the input array is {@code null}, {@code null} will be returned.
* </p>
*
* <pre>
Expand All @@ -5286,8 +5286,8 @@ public static <T> T[] remove(final T[] array, final int index) {
*
* @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 &lt; 0 || index &gt;= array.length), or if the array is {@code null}.
* @return A new array containing the existing elements except those at the specified positions or {@code null} if the input array is {@code null}.
* @throws IndexOutOfBoundsException if any index is out of range (index &lt; 0 || index &gt;= array.length).
* @since 3.0.1
*/
public static boolean[] removeAll(final boolean[] array, final int... indices) {
Expand All @@ -5301,7 +5301,7 @@ public static boolean[] removeAll(final boolean[] array, final int... indices) {
* array is always the same as that of the input array.
* </p>
* <p>
* If the input array is {@code null}, an IndexOutOfBoundsException will be thrown, because in that case no valid index can be specified.
* If the input array is {@code null}, {@code null} will be returned.
* </p>
*
* <pre>
Expand All @@ -5315,8 +5315,8 @@ public static boolean[] removeAll(final boolean[] array, final int... indices) {
*
* @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 &lt; 0 || index &gt;= array.length), or if the array is {@code null}.
* @return A new array containing the existing elements except those at the specified positions or {@code null} if the input array is {@code null}.
* @throws IndexOutOfBoundsException if any index is out of range (index &lt; 0 || index &gt;= array.length).
* @since 3.0.1
*/
public static byte[] removeAll(final byte[] array, final int... indices) {
Expand All @@ -5330,7 +5330,7 @@ public static byte[] removeAll(final byte[] array, final int... indices) {
* array is always the same as that of the input array.
* </p>
* <p>
* If the input array is {@code null}, an IndexOutOfBoundsException will be thrown, because in that case no valid index can be specified.
* If the input array is {@code null}, {@code null} will be returned.
* </p>
*
* <pre>
Expand All @@ -5344,8 +5344,8 @@ public static byte[] removeAll(final byte[] array, final int... indices) {
*
* @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 &lt; 0 || index &gt;= array.length), or if the array is {@code null}.
* @return A new array containing the existing elements except those at the specified positions or {@code null} if the input array is {@code null}.
* @throws IndexOutOfBoundsException if any index is out of range (index &lt; 0 || index &gt;= array.length).
* @since 3.0.1
*/
public static char[] removeAll(final char[] array, final int... indices) {
Expand All @@ -5359,7 +5359,7 @@ public static char[] removeAll(final char[] array, final int... indices) {
* array is always the same as that of the input array.
* </p>
* <p>
* If the input array is {@code null}, an IndexOutOfBoundsException will be thrown, because in that case no valid index can be specified.
* If the input array is {@code null}, {@code null} will be returned.
* </p>
*
* <pre>
Expand All @@ -5373,8 +5373,8 @@ public static char[] removeAll(final char[] array, final int... indices) {
*
* @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 &lt; 0 || index &gt;= array.length), or if the array is {@code null}.
* @return A new array containing the existing elements except those at the specified positions or {@code null} if the input array is {@code null}.
* @throws IndexOutOfBoundsException if any index is out of range (index &lt; 0 || index &gt;= array.length).
* @since 3.0.1
*/
public static double[] removeAll(final double[] array, final int... indices) {
Expand All @@ -5388,7 +5388,7 @@ public static double[] removeAll(final double[] array, final int... indices) {
* array is always the same as that of the input array.
* </p>
* <p>
* If the input array is {@code null}, an IndexOutOfBoundsException will be thrown, because in that case no valid index can be specified.
* If the input array is {@code null}, {@code null} will be returned.
* </p>
*
* <pre>
Expand All @@ -5402,8 +5402,8 @@ public static double[] removeAll(final double[] array, final int... indices) {
*
* @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 &lt; 0 || index &gt;= array.length), or if the array is {@code null}.
* @return A new array containing the existing elements except those at the specified positions or {@code null} if the input array is {@code null}.
* @throws IndexOutOfBoundsException if any index is out of range (index &lt; 0 || index &gt;= array.length).
* @since 3.0.1
*/
public static float[] removeAll(final float[] array, final int... indices) {
Expand All @@ -5417,7 +5417,7 @@ public static float[] removeAll(final float[] array, final int... indices) {
* array is always the same as that of the input array.
* </p>
* <p>
* If the input array is {@code null}, an IndexOutOfBoundsException will be thrown, because in that case no valid index can be specified.
* If the input array is {@code null}, {@code null} will be returned.
* </p>
*
* <pre>
Expand All @@ -5431,8 +5431,8 @@ public static float[] removeAll(final float[] array, final int... indices) {
*
* @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 &lt; 0 || index &gt;= array.length), or if the array is {@code null}.
* @return A new array containing the existing elements except those at the specified positions or {@code null} if the input array is {@code null}.
* @throws IndexOutOfBoundsException if any index is out of range (index &lt; 0 || index &gt;= array.length).
* @since 3.0.1
*/
public static int[] removeAll(final int[] array, final int... indices) {
Expand All @@ -5446,7 +5446,7 @@ public static int[] removeAll(final int[] array, final int... indices) {
* array is always the same as that of the input array.
* </p>
* <p>
* If the input array is {@code null}, an IndexOutOfBoundsException will be thrown, because in that case no valid index can be specified.
* If the input array is {@code null}, {@code null} will be returned.
* </p>
*
* <pre>
Expand All @@ -5460,8 +5460,8 @@ public static int[] removeAll(final int[] array, final int... indices) {
*
* @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 &lt; 0 || index &gt;= array.length), or if the array is {@code null}.
* @return A new array containing the existing elements except those at the specified positions or {@code null} if the input array is {@code null}.
* @throws IndexOutOfBoundsException if any index is out of range (index &lt; 0 || index &gt;= array.length).
* @since 3.0.1
*/
public static long[] removeAll(final long[] array, final int... indices) {
Expand Down Expand Up @@ -5528,7 +5528,7 @@ static Object removeAll(final Object array, final int... indices) {
* array is always the same as that of the input array.
* </p>
* <p>
* If the input array is {@code null}, an IndexOutOfBoundsException will be thrown, because in that case no valid index can be specified.
* If the input array is {@code null}, {@code null} will be returned.
* </p>
*
* <pre>
Expand All @@ -5542,8 +5542,8 @@ static Object removeAll(final Object array, final int... indices) {
*
* @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 &lt; 0 || index &gt;= array.length), or if the array is {@code null}.
* @return A new array containing the existing elements except those at the specified positions or {@code null} if the input array is {@code null}.
* @throws IndexOutOfBoundsException if any index is out of range (index &lt; 0 || index &gt;= array.length).
* @since 3.0.1
*/
public static short[] removeAll(final short[] array, final int... indices) {
Expand All @@ -5557,7 +5557,7 @@ public static short[] removeAll(final short[] array, final int... indices) {
* array is always the same as that of the input array.
* </p>
* <p>
* If the input array is {@code null}, an IndexOutOfBoundsException will be thrown, because in that case no valid index can be specified.
* If the input array is {@code null}, {@code null} will be returned.
* </p>
*
* <pre>
Expand All @@ -5568,8 +5568,8 @@ public static short[] removeAll(final short[] array, final int... indices) {
* @param <T> 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 &lt; 0 || index &gt;= array.length), or if the array is {@code null}.
* @return A new array containing the existing elements except those at the specified positions or {@code null} if the input array is {@code null}.
* @throws IndexOutOfBoundsException if any index is out of range (index &lt; 0 || index &gt;= array.length).
* @since 3.0.1
*/
@SuppressWarnings("unchecked") // removeAll() always creates an array of the same type as its input
Expand Down
Loading