static L powersOfTwoUpTo(int n) { new IntBuffer l; int i = 1; while (i <= n && i > 0) { l.add(i); i *= 2; } ret l.asVirtualList(); }