Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -867,14 +867,14 @@ public final boolean hasQueuedOperations() {
}

@Override
public final Iterator<E> queuedAdditionIterator() {
public final Iterator<?> queuedAdditionIterator() {
if ( hasQueuedOperations() ) {
return new Iterator<>() {
private int index;

@Override
public E next() {
return operationQueue.get( index++ ).getAddedInstance();
public Object next() {
return operationQueue.get( index++ ).getAddedEntry();
}

@Override
Expand Down Expand Up @@ -1249,6 +1249,10 @@ protected interface DelayedOperation<E> {

E getAddedInstance();

default Object getAddedEntry() {
return getAddedInstance();
}

E getOrphan();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ default boolean needsUpdating(
*
* @return The iterator
*/
Iterator<E> queuedAdditionIterator();
Iterator<?> queuedAdditionIterator();

/**
* Get the "queued" orphans
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,11 @@ protected AbstractMapValueDelayedOperation(K index, E addedValue, E orphan) {
protected final K getIndex() {
return index;
}

@Override
public Object getAddedEntry() {
return Map.entry( getIndex(), getAddedInstance() );
}
}

final class Put extends AbstractMapValueDelayedOperation {
Expand Down
Loading