Skip to content
Closed
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
13 changes: 13 additions & 0 deletions guava/src/com/google/common/collect/Lists.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.RandomAccess;
import java.util.Spliterator;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.function.Predicate;
import org.jspecify.annotations.Nullable;
Expand Down Expand Up @@ -605,6 +606,12 @@ public boolean removeIf(Predicate<? super T> filter) {
return fromList.removeIf(element -> filter.test(function.apply(element)));
}

@Override
@GwtIncompatible // Spliterator
public Spliterator<T> spliterator() {
return CollectSpliterators.map(fromList.spliterator(), 0, function);
}

@GwtIncompatible @J2ktIncompatible private static final long serialVersionUID = 0;
}

Expand Down Expand Up @@ -678,6 +685,12 @@ public int size() {
return fromList.size();
}

@Override
@GwtIncompatible // Spliterator
public Spliterator<T> spliterator() {
return CollectSpliterators.map(fromList.spliterator(), 0, function);
}

@GwtIncompatible @J2ktIncompatible private static final long serialVersionUID = 0;
}

Expand Down
Loading