Java List to Int List toIntArray(List a)

Here you can find the source of toIntArray(List a)

Description

to Int Array

License

Apache License

Declaration

public static int[] toIntArray(List<Integer> a) 

Method Source Code

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

import java.util.*;

public class Main {
    public static int[] toIntArray(List<Integer> a) {
        int[] d = new int[a.size()];
        for (int i = 0; i < d.length; ++i) {
            d[i] = a.get(i);/*www . j a v  a  2  s  .com*/
        }
        return d;
    }

    public static <T extends Number, R> T get(Map<R, T> map, R key, T defaultValue) {
        T val = map.get(key);
        return val == null ? defaultValue : val;
    }
}

Related

  1. toIntArray(java.util.List list)
  2. toIntArray(List list)
  3. toIntArray(List nums)
  4. toIntArray(List ints)
  5. toIntArray(List bytes)
  6. toIntArray(List integerList)
  7. toIntArray(List intList)
  8. toIntArray(List list)
  9. toIntArray(List list)