test_class.file: reactfx/src/test/java/org/reactfx/collection/MemoizationListTest.java
test_class.identifier: MemoizationListTest
test_case.body: @Test
      public void testForget() {
          LiveList<Integer> source = new LiveArrayList<>(0, 1, 2, 3, 4, 5, 6);
          MemoizationList<Integer> memoizing = source.memoize();
          LiveList<Integer> memoized = memoizing.memoizedItems();
  
          memoizing.pin(); // otherwise no memoization takes place
  
          memoizing.force(0, 7);
          assertEquals(7, memoized.size());
  
          memoizing.forget(2, 4);
          assertEquals(5, memoized.size());
  
          memoizing.forget(3, 5);
          assertEquals(4, memoized.size());
  
          Counter counter = new Counter();
          memoized.observeQuasiChanges(ch -> {
              counter.inc();
              assertEquals(1, ch.getModificationCount());
              QuasiListModification<?> mod = ch.getModifications().get(0);
              assertEquals(1, mod.getFrom());
              assertEquals(Arrays.asList(1, 5), mod.getRemoved());
              assertEquals(0, mod.getAddedSize());
          });
  
          memoizing.forget(1, 6);
          assertEquals(1, counter.get());
      }
test_case.class_method_signature: MemoizationListTest.testForget()
test_case.full_signature: @Test public void testForget()
test_case.identifier: testForget
test_case.invocations: memoize memoizedItems pin force assertEquals size forget assertEquals size forget assertEquals size observeQuasiChanges inc assertEquals getModificationCount get getModifications assertEquals getFrom assertEquals asList getRemoved assertEquals getAddedSize forget assertEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testForget()
focal_class.declarator: sparseList = new SparseList<>()
focal_class.modifier: private final
focal_class.original_string: private final SparseList<E> sparseList = new SparseList<>();
focal_class.type: SparseList<E>
focal_class.var_name: sparseList
focal_class.declarator: memoizedItems = new MemoizedView()
focal_class.modifier: private final
focal_class.original_string: private final MemoizedView memoizedItems = new MemoizedView();
focal_class.type: MemoizedView
focal_class.var_name: memoizedItems
focal_class.declarator: source
focal_class.modifier: private final
focal_class.original_string: private final ObservableList<E> source;
focal_class.type: ObservableList<E>
focal_class.var_name: source
focal_class.file: reactfx/src/main/java/org/reactfx/collection/MemoizationList.java
focal_class.identifier: MemoizationListImpl
focal_class.interfaces: implements MemoizationList<E>, UnmodifiableByDefaultLiveList<E>
focal_class.class_method_signature: MemoizationListImpl.MemoizationListImpl(ObservableList<E> source)
focal_class.full_signature:   MemoizationListImpl(ObservableList<E> source)
focal_class.identifier: MemoizationListImpl
focal_class.parameters: (ObservableList<E> source)
focal_class.signature:  MemoizationListImpl(ObservableList<E> source)
focal_class.class_method_signature: MemoizationListImpl.observeInputs()
focal_class.full_signature: @Override protected Subscription observeInputs()
focal_class.identifier: observeInputs
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: Subscription
focal_class.signature: Subscription observeInputs()
focal_class.class_method_signature: MemoizationListImpl.sourceChanged(QuasiListChange<? extends E> qc)
focal_class.full_signature: private void sourceChanged(QuasiListChange<? extends E> qc)
focal_class.identifier: sourceChanged
focal_class.modifiers: private
focal_class.parameters: (QuasiListChange<? extends E> qc)
focal_class.return: void
focal_class.signature: void sourceChanged(QuasiListChange<? extends E> qc)
focal_class.class_method_signature: MemoizationListImpl.get(int index)
focal_class.full_signature: @Override public E get(int index)
focal_class.identifier: get
focal_class.modifiers: @Override public
focal_class.parameters: (int index)
focal_class.return: E
focal_class.signature: E get(int index)
focal_class.class_method_signature: MemoizationListImpl.force(int from, int to)
focal_class.full_signature: @Override public void force(int from, int to)
focal_class.identifier: force
focal_class.modifiers: @Override public
focal_class.parameters: (int from, int to)
focal_class.return: void
focal_class.signature: void force(int from, int to)
focal_class.class_method_signature: MemoizationListImpl.size()
focal_class.full_signature: @Override public int size()
focal_class.identifier: size
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int size()
focal_class.class_method_signature: MemoizationListImpl.memoizedItems()
focal_class.full_signature: @Override public LiveList<E> memoizedItems()
focal_class.identifier: memoizedItems
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: LiveList<E>
focal_class.signature: LiveList<E> memoizedItems()
focal_class.class_method_signature: MemoizationListImpl.isMemoized(int index)
focal_class.full_signature: @Override public boolean isMemoized(int index)
focal_class.identifier: isMemoized
focal_class.modifiers: @Override public
focal_class.parameters: (int index)
focal_class.return: boolean
focal_class.signature: boolean isMemoized(int index)
focal_class.class_method_signature: MemoizationListImpl.getIfMemoized(int index)
focal_class.full_signature: @Override public Optional<E> getIfMemoized(int index)
focal_class.identifier: getIfMemoized
focal_class.modifiers: @Override public
focal_class.parameters: (int index)
focal_class.return: Optional<E>
focal_class.signature: Optional<E> getIfMemoized(int index)
focal_class.class_method_signature: MemoizationListImpl.getMemoizedCountBefore(int position)
focal_class.full_signature: @Override public int getMemoizedCountBefore(int position)
focal_class.identifier: getMemoizedCountBefore
focal_class.modifiers: @Override public
focal_class.parameters: (int position)
focal_class.return: int
focal_class.signature: int getMemoizedCountBefore(int position)
focal_class.class_method_signature: MemoizationListImpl.getMemoizedCountAfter(int position)
focal_class.full_signature: @Override public int getMemoizedCountAfter(int position)
focal_class.identifier: getMemoizedCountAfter
focal_class.modifiers: @Override public
focal_class.parameters: (int position)
focal_class.return: int
focal_class.signature: int getMemoizedCountAfter(int position)
focal_class.class_method_signature: MemoizationListImpl.getMemoizedCount()
focal_class.full_signature: @Override public int getMemoizedCount()
focal_class.identifier: getMemoizedCount
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMemoizedCount()
focal_class.class_method_signature: MemoizationListImpl.forget(int from, int to)
focal_class.full_signature: @Override public void forget(int from, int to)
focal_class.identifier: forget
focal_class.modifiers: @Override public
focal_class.parameters: (int from, int to)
focal_class.return: void
focal_class.signature: void forget(int from, int to)
focal_class.class_method_signature: MemoizationListImpl.indexOfMemoizedItem(int index)
focal_class.full_signature: @Override public int indexOfMemoizedItem(int index)
focal_class.identifier: indexOfMemoizedItem
focal_class.modifiers: @Override public
focal_class.parameters: (int index)
focal_class.return: int
focal_class.signature: int indexOfMemoizedItem(int index)
focal_class.class_method_signature: MemoizationListImpl.getMemoizedItemsRange()
focal_class.full_signature: @Override public IndexRange getMemoizedItemsRange()
focal_class.identifier: getMemoizedItemsRange
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: IndexRange
focal_class.signature: IndexRange getMemoizedItemsRange()
focal_class.superclass: extends LiveListBase<E>
focal_method.body: @Override
      public void forget(int from, int to) {
          if(!isObservingInputs()) { // memoization is off
              throw new IllegalStateException(
                      "There is nothing to forget, because memoization is off."
                      + " To turn memoization on, you have to be observing this"
                      + " list or its memoizedItems.");
          }
  
          Lists.checkRange(from, to, size());
          int memoChangeFrom = sparseList.getPresentCountBefore(from);
          List<E> memoRemoved = sparseList.collect(from, to);
          sparseList.spliceByVoid(from, to, to - from);
          memoizedItems.fireRemoveRange(memoChangeFrom, memoRemoved);
      }
focal_method.class_method_signature: MemoizationListImpl.forget(int from, int to)
focal_method.full_signature: @Override public void forget(int from, int to)
focal_method.identifier: forget
focal_method.invocations: isObservingInputs checkRange size getPresentCountBefore collect spliceByVoid fireRemoveRange
focal_method.modifiers: @Override public
focal_method.parameters: (int from, int to)
focal_method.return: void
focal_method.signature: void forget(int from, int to)