mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
22 lines
454 B
Java
22 lines
454 B
Java
// "Replace iteration with bulk 'Collection.addAll()' call" "true-preview"
|
|
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
static class MyList extends AbstractCollection<String> {
|
|
@Override
|
|
public Iterator<String> iterator() {
|
|
return Collections.emptyIterator();
|
|
}
|
|
|
|
@Override
|
|
public int size() {
|
|
return 0;
|
|
}
|
|
|
|
public boolean myAdd(Collection<? extends String> c) {
|
|
this.addAll(c);
|
|
return true;
|
|
}
|
|
}
|
|
} |