docs: public static int[] toIntArray(Collection<Integer> collection) {
          int[] collectionArray = new int[collection.size()];
          int index = 0;
          for (Integer item : collection) {
              collectionArray[index++] = item;
          }
          return collectionArray;
      }