class MemoizationListImpl extends LiveListBase<E> implements MemoizationList<E>, UnmodifiableByDefaultLiveList<E> {

    @Override
    public void force(int from, int to) {
        if(!isObservingInputs()) { // memoization is off
            throw new IllegalStateException(
                    "Cannot force items when memoization is off."
                    + " To turn memoization on, you have to be observing this"
                    + " list or its memoizedItems.");
        }

        Lists.checkRange(from, to, size());
        for(int i = from; i < to; ++i) {
            if(!sparseList.isPresent(i)) {
                E elem = source.get(i);
                if(sparseList.setIfAbsent(i, elem)) {
                    int presentBefore = sparseList.getPresentCountBefore(i);
                    memoizedItems.prepareNotifications(ProperLiveList.elemInsertion(presentBefore));
                }
            }
        }
        memoizedItems.publishNotifications();
    }

      MemoizationListImpl(ObservableList<E> source);

}