Package com.viaversion.viaversion.util
Class ArrayUtil
java.lang.Object
com.viaversion.viaversion.util.ArrayUtil
For type safety and effort reasons, buffer types use arrays instead of lists.
This class includes simple methods to work with these arrays in case they need to be modified (obviously being more expensive due to the required array copies for every modification).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T[]
add
(T[] array, T element) static <T> T[]
add
(T[] array, T... elements) static Boolean[]
boxedArray
(boolean[] array) static Float[]
boxedArray
(float[] array) static Integer[]
boxedArray
(int[] array) static <T> T[]
remove
(T[] array, int index)
-
Constructor Details
-
ArrayUtil
public ArrayUtil()
-
-
Method Details
-
add
public static <T> T[] add(T[] array, T element) -
add
-
remove
public static <T> T[] remove(T[] array, int index) -
boxedArray
-
boxedArray
-
boxedArray
-