Here you can find the source of toIntArray(List
Parameter | Description |
---|---|
list | Eingabe Liste |
public static int[] toIntArray(List<Integer> list)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { /**// ww w . j av a2s .c o m * Erstellt Integer-Array aus Liste * * @param list * Eingabe Liste * * @return Integer-Array */ public static int[] toIntArray(List<Integer> list) { int[] ret = new int[list.size()]; int i = 0; for (Integer e : list) { ret[i++] = e.intValue(); } return ret; } }