Package org.drasyl.util
Class ArrayUtil
- java.lang.Object
-
- org.drasyl.util.ArrayUtil
-
public final class ArrayUtil extends Object
Utility class for operations on arrays.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
concat(byte[] a, byte[] b)
Creates a new byte array containing all bytes froma
first and then fromb
.static <E> E[]
concat(E[] a, E[] b)
Creates a new array containing all elements froma
first and then fromb
.
-
-
-
Method Detail
-
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
-
-