code: public static List<Integer> asList (int[] list)
      {
          if (list == null) {
              return null;
          }
          List<Integer> ilist = new ArrayList<Integer>(list.length);
          for (int ii = 0; ii < list.length; ii++) {
              ilist.add(list[ii]);
          }
          return ilist;
      }
docs: Converts an array of primitives to a list of Integers.