public static int[] convertToIntArray(List<Integer> list) {
    int[] array = new int[list.size()];
    for (int i = 0; i < list.size(); i++) {
      array[i] = list.get(i);
    }
    return array;
  }
Test if all {@code check} items are contained in {@code array}.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/ArrayUtils.java