mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Reviewed By: mdvacca Differential Revision: D7326562 fbshipit-source-id: e1229f84496e9181475979d757066e3796a24a3f
20 lines
442 B
Java
20 lines
442 B
Java
package com.facebook.react.common;
|
|
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
|
|
public class ArrayUtils {
|
|
|
|
public static float[] copyArray(float[] array) {
|
|
return array == null ? null : Arrays.copyOf(array, array.length);
|
|
}
|
|
|
|
public static int[] copyListToArray(List<Integer> list) {
|
|
int[] array = new int[list.size()];
|
|
for (int t = 0; t < list.size(); t++) {
|
|
array[t] = list.get(t);
|
|
}
|
|
return array;
|
|
}
|
|
}
|