public List<Box> getBoxes() { if (dataSource != null && lookahead != EOF) { return new LazyList<Box>(boxes, this); } else { return boxes; } }
public E get(int i) { if (underlying.size() > i) { return underlying.get(i); } else { if (elementSource.hasNext()) { underlying.add(elementSource.next()); return get(i); } else { throw new NoSuchElementException(); } } }
@Override public int size() { LOG.logDebug("potentially expensive size() call"); blowup(); return underlying.size(); } }