class LazyList extends PagerBase<Type> {

    @Override
    @Nullable
    public Type get(int index) {
        if (index < 0 || index >= mSize) {
            throw new IndexOutOfBoundsException(index + " is out of bounds. Size:" + mSize);
        }

        mLastAccessed = index;

        final boolean initialLoadComplete = mItems != null;

        // note: intentionally avoid triggering prefetching, so that prefetches aren't outstanding
        // when LazyList is passed to consumers

        // prefetch
        int minTarget = Math.max(0, index - mConfig.mPrefetchDistance);
        int maxTarget = Math.min(mSize, index + mConfig.mPrefetchDistance);
        if (minTarget < mMissedMinIndex) {
            mMissedMinIndex = minTarget;
            if (initialLoadComplete) {
                loadBeforeIfNeeded();
            }
        }
        if (maxTarget > mMissedMaxIndex) {
            mMissedMaxIndex = maxTarget;
            if (initialLoadComplete) {
                loadAfterIfNeeded();
            }
        }

        if (initialLoadComplete) {
            return access(index);
        } else {
            triggerInitialLoad(getInitialLoadPositionFor(index));
            return null;
        }
    }

    @WorkerThread public  LazyList(@NonNull CountedDataSource<Type> countedDataSource,
            @NonNull Executor mainThreadExecutor, @NonNull Executor backgroundThreadExecutor,
            @NonNull ListConfig config);

}