Package org.drasyl.util
Class ArrayUtil
java.lang.Object
org.drasyl.util.ArrayUtil
Utility class for operations on arrays.
-
Method Summary
-
Method Details
-
concat
public static <E> E[] concat(E[] a, E[] b) Creates a new array containing all elements froma
first and then fromb
.- Type Parameters:
E
- the arrays element type- Parameters:
a
- array ab
- array b- Returns:
- array containing all elements from
a
first and then fromb
- Throws:
NullPointerException
- ifa
orb
isnull
-
concat
public static byte[] concat(byte[] a, byte[] b) Creates a new byte array containing all bytes froma
first and then fromb
.- Parameters:
a
- array ab
- array b- Returns:
- byte array containing all bytes from
a
first and then fromb
- Throws:
NullPointerException
- ifa
orb
isnull
-