Class ArrayUtils
java.lang.Object
gaiasky.util.ArrayUtils
Utilities to work with arrays.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T[]concatWithArrayCopy(T[] array1, T[] array2) Concatenates the given arrays into a new array.static float[]toFloatArray(double[] arr) Convert a double array to a float array.
-
Constructor Details
-
ArrayUtils
public ArrayUtils()
-
-
Method Details
-
concatWithArrayCopy
public static <T> T[] concatWithArrayCopy(T[] array1, T[] array2) Concatenates the given arrays into a new array.- Type Parameters:
T- Array element types.- Parameters:
array1- The first array.array2- The second array.- Returns:
- A new array which contains array1 + array2.
-
toFloatArray
public static float[] toFloatArray(double[] arr) Convert a double array to a float array.- Parameters:
arr- The double array.- Returns:
- The float array.
-