Java List to Array asArray(List indices)

Here you can find the source of asArray(List indices)

Description

as Array

License

Open Source License

Declaration

private static int[] asArray(List<Integer> indices) 

Method Source Code

//package com.java2s;
// it under the terms of the GNU General Public License as published by      //

import java.util.*;

public class Main {
    private static int[] asArray(List<Integer> indices) {
        int[] _indices = new int[indices.size()];
        for (int i = 0; i < indices.size(); i++)
            _indices[i] = indices.get(i);
        return _indices;
    }/*w w w. j  a  va  2 s . c  o  m*/
}

Related

  1. asArray(Collection list)
  2. asArray(List values)
  3. asArray(List list)
  4. asArray(List list)
  5. asArrayList(E first, E... other)
  6. asArrayList(T... a)