Class ArrayUtil

java.lang.Object
org.drasyl.util.ArrayUtil

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

    Modifier and Type
    Method
    Description
    static byte[]
    concat(byte[] a, byte[] b)
    Creates a new byte array containing all bytes from a first and then from b.
    static <E> E[]
    concat(E[] a, E[] b)
    Creates a new array containing all elements from a first and then from b.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • 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