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