Here you can find the source of toList(boolean... booleans)
public static List<Boolean> toList(boolean... booleans)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static List<Boolean> toList(boolean... booleans) { List<Boolean> list = new ArrayList<>(); for (boolean b : booleans) { list.add(b);/* w w w .j av a2 s . co m*/ } return list; } public static List<Character> toList(char... chars) { List<Character> list = new ArrayList<>(); for (char b : chars) { list.add(b); } return list; } public static List<Short> toList(short... shorts) { List<Short> list = new ArrayList<>(); for (short b : shorts) { list.add(b); } return list; } public static List<Integer> toList(int... ints) { List<Integer> list = new ArrayList<>(); for (int i : ints) { list.add(i); } return list; } public static List<Long> toList(long... longs) { List<Long> list = new ArrayList<>(); for (long l : longs) { list.add(l); } return list; } public static List<Float> toList(float... floats) { List<Float> list = new ArrayList<>(); for (float f : floats) { list.add(f); } return list; } public static List<Double> toList(double... doubles) { List<Double> list = new ArrayList<>(); for (double d : doubles) { list.add(d); } return list; } public static List<Byte> toList(byte... bytes) { List<Byte> list = new ArrayList<>(); for (byte b : bytes) { list.add(b); } return list; } }