static L subList(L l, int startIndex) { ret subList(l, startIndex, l(l)); } static L subList(L l, int startIndex, int endIndex) { if (l == null) null; int n = l(l); startIndex = Math.max(0, startIndex); endIndex = Math.min(n, endIndex); if (startIndex >= endIndex) ret ll(); if (startIndex == 0 && endIndex == n) ret l; ret l.subList(startIndex, endIndex); } ifclass IntRange static L subList(L l, IntRange r) { ret subList(l, r.start, r.end); } endif