Here you can find the source of toList(int[] array)
Parameter | Description |
---|---|
array | Das umzuwandelnde Array |
public static List<Integer> toList(int[] array)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { /**// w w w .j a v a2s .c om * Wandelt ein int-Array in eine Integer-Liste um. * * @param array Das umzuwandelnde Array * @return Die Integer-Liste * * @see ArrayHelper#toArray(List) Integer-Liste zu int-Array */ public static List<Integer> toList(int[] array) { List<Integer> list = new ArrayList<Integer>(); for (int value : array) list.add(value); return list; } }