static ArrayList longArrayToList(long[] a) { if (a == null) null; ret longArrayToList(a, 0, a.length); } // no range checking on from/to in the interest of S P E E E E E EEED static ArrayList longArrayToList(long[] a, int from, int to) { if (a == null) null; ArrayList l = new(to-from); for (int i = from; i < to; i++) l.add(a[i]); ret l; }