Class ArrayUtil


  • public final class ArrayUtil
    extends Object
    Utility class for operations on arrays.
    • Method Detail

      • concat

        public static <E> E[] concat​(E[] a,
                                     E[] b)
        Creates a new array containing all elements from a first and then from b.
        Type Parameters:
        E - the arrays element type
        Parameters:
        a - array a
        b - array b
        Returns:
        array containing all elements from a first and then from b
        Throws:
        NullPointerException - if a or b is null
      • concat

        public static byte[] concat​(byte[] a,
                                    byte[] b)
        Creates a new byte array containing all bytes from a first and then from b.
        Parameters:
        a - array a
        b - array b
        Returns:
        byte array containing all bytes from a first and then from b
        Throws:
        NullPointerException - if a or b is null