org.apache.ignite.internal.util

## Class GridArrays

- java.lang.Object
- - org.apache.ignite.internal.util.GridArrays

    public final class GridArrays
    extends Object

Utility methods to work with arrays.

### Method Summary

All Methods Static Methods Concrete Methods
`static void` `clearTail(Object[] arr, int fromIdx)` Nullify array elements from the given index until the first `null` element (assuming that after the first `null` tail is already cleared).
`static long[]` `remove(long[] arr, int idx)`
`static <T> T[]` `remove(T[] arr, int idx)`
`static <T> T[]` `set(T[] arr, int idx, T o)` Set element to the array at the given index.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### set

    public static <T> T[] set(T[] arr,
                              int idx,
                              T o)

Set element to the array at the given index. Grows the array if needed.

Parameters:
  `arr` - Array.
  `idx` - Index.
  `o` - Object.
Returns:
  The given or grown array.

#### remove

    public static <T> T[] remove(T[] arr,
                                 int idx)

Parameters:
  `arr` - Array.
  `idx` - Index to remove.
Returns:
  Smaller array.

#### remove

    public static long[] remove(long[] arr,
                                int idx)

Parameters:
  `arr` - Array.
  `idx` - Index to remove.
Returns:
  Smaller array.

#### clearTail

    public static void clearTail(Object[] arr,
                                 int fromIdx)

Nullify array elements from the given index until the first `null` element (assuming that after the first `null` tail is already cleared).

Parameters:
  `arr` - Array.
  `fromIdx` - From index (including).

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.5.0
Release Date | : May 23 2018