mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 00:20:55 +07:00
Part of IDEA-334171 Store MockJDK in artifact repository, rather than in Git GitOrigin-RevId: 9c6214e3ead47cc164d20813f5a2b37136607213
29 lines
717 B
Java
29 lines
717 B
Java
// "Fix all 'SequencedCollection method can be used' problems in file" "true"
|
|
import java.util.*;
|
|
|
|
interface Foo extends SequencedCollection<String> {}
|
|
|
|
public class Test {
|
|
public static void main(Foo foo, String[] args) {
|
|
List<String> list = List.of(args);
|
|
|
|
var e1 = foo.iterator().n<caret>ext();
|
|
var e2 = list.get(0);
|
|
var e3 = list.get(list.size() - 1);
|
|
var e4 = list.remove(0);
|
|
var e5 = list.remove(list.size() - 1);
|
|
list.remove("e");
|
|
list.get(1);
|
|
}
|
|
|
|
void testAdd(List<String> list) {
|
|
list.add(0, "hello");
|
|
}
|
|
|
|
void testSeries(List<String> list) {
|
|
System.out.println(list.get(0));
|
|
System.out.println(list.get(1));
|
|
System.out.println(list.get(2));
|
|
}
|
|
}
|