Java Collection to Array toIntArray(Collection values)

Here you can find the source of toIntArray(Collection values)

Description

to Int Array

License

Apache License

Declaration

private static int[] toIntArray(Collection<Integer> values) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Collection;

public class Main {
    private static int[] toIntArray(Collection<Integer> values) {
        int[] result = new int[values.size()];
        int i = 0;
        for (int value : values)
            result[i++] = value;//  w ww. java2s .c  o m
        return result;
    }
}

Related

  1. toIntArray(Collection collection)
  2. toIntArray(Collection collection)
  3. toIntArray(Collection ints)
  4. toIntArray(Collection list)
  5. toIntArray(Collection list)
  6. toIntArray(final Collection c)
  7. toIntArray(final Collection col)
  8. toIntArray(final Collection collection)
  9. toIntArray(final Collection values)