private static int[] extractIndices(HashSet<Integer> coll) {
        int[] result = new int[coll.size()];
        int i = 0;
        for (Integer index : coll) {
            result[i++] = index.intValue();
        }
        return result;
    }
Extract a set of Integer indices into an int[].
@param coll {@code HashSet} of {@code Integer}
@return int[]
@since 3.0.1
android/android_framework/base/src/main/java/lang3/ArrayUtils.java