Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0029/X.js')
-rw-r--r--tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0029/X.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0029/X.js b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0029/X.js
new file mode 100644
index 0000000..3ffc867
--- /dev/null
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/workspace/Converter15/src/test0029/X.js
@@ -0,0 +1,28 @@
+package test0029;
+
+import java.util.Iterator;
+
+interface Predicate<T> {
+ boolean is(T t);
+}
+
+interface List<T> {
+ List<T> select(Predicate<T> p);
+}
+
+class X<T> implements List<T>, Iterable<T> {
+ public List<T> select(Predicate<T> p) {
+ X<T> result = new X<T>();
+ for (T t : this) {
+ if (p.is(t))
+ result.add(t);
+ }
+ return result;
+ }
+
+ public Iterator<T> iterator() {
+ return null;
+ }
+ void add(T t) {
+ }
+} \ No newline at end of file

Back to the top