static ListEntryWithPrevAndNext listEntryWithPrevAndNext(L l, int idx) {
if (idx < 0 || idx >= l(l)) null;
ret new ListEntryWithPrevAndNext() {
public A get() { ret _get(l, idx); }
public void set(A a) { l.set(idx, a); }
public ListEntryWithPrevAndNext prev() { ret listEntryWithPrevAndNext(l, idx-1); }
public ListEntryWithPrevAndNext next() { ret listEntryWithPrevAndNext(l, idx+1); }
};
}