@Override
  public boolean removeAll(final @NotNull Collection<?> c) {
    HashSet<?> hs = new HashSet<>(c);
    ListIterator<V> iter = delegate.listIterator();
    boolean updated = false;
    while (iter.hasNext()) {
      V v = iter.next();
      if (hs.contains(v)) {
        undoLog.add(new UndoEntry<>(iter.previousIndex(), false, v));
        iter.remove();
        updated = true;
      }
    }
    return updated;
  }
Create an UndoList backed by another List instance.

@param delegate The List instance to use for backing storage
evm/src/main/java/org/hyperledger/besu/collections/undo/UndoList.java