예제 #1
0
 public static List<Boolean> asList(boolean[] values) {
   if (values == null) return Collections.emptyList();
   List<Boolean> list = new ArrayList<Boolean>(values.length);
   for (boolean value : values) {
     list.add(value);
   }
   return list;
 }
예제 #2
0
 public static List<Object> asList(Object[] values) {
   if (values == null) return Collections.emptyList();
   List<Object> list = new ArrayList<Object>(values.length);
   for (Object value : values) {
     list.add(value);
   }
   return list;
 }
예제 #3
0
 public static List<Double> asList(double[] values) {
   if (values == null) return Collections.emptyList();
   List<Double> list = new ArrayList<Double>(values.length);
   for (double value : values) {
     list.add(value);
   }
   return list;
 }
예제 #4
0
 public static List<Long> asList(long[] values) {
   if (values == null) return Collections.emptyList();
   List<Long> list = new ArrayList<Long>(values.length);
   for (long value : values) {
     list.add(value);
   }
   return list;
 }
예제 #5
0
 public static List<Integer> asList(int[] values) {
   if (values == null) return Collections.emptyList();
   List<Integer> list = new ArrayList<Integer>(values.length);
   for (int value : values) {
     list.add(value);
   }
   return list;
 }
예제 #6
0
 public static List<Character> asList(char[] values) {
   if (values == null) return Collections.emptyList();
   List<Character> list = new ArrayList<Character>(values.length);
   for (char value : values) {
     list.add(value);
   }
   return list;
 }