static L subList(L l, int startIndex) { ret subList(l, startIndex, l(l)); } static L subList(int startIndex, L l) { ret subList(l, startIndex); } static L subList(int startIndex, int endIndex, L l) { ret subList(l, startIndex, endIndex); } 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; ifdef OurSubLists ret ourSubList_noRangeCheck(l, startIndex, endIndex); endifdef ifndef OurSubLists ret l.subList(startIndex, endIndex); endifndef } ifclass IntRange static L subList(L l, IntRange r) { ret subList(l, r.start, r.end); } endif