.gitea
doc
gen
logFiles
resources
AllgemeinTest
Assign.jav
Bar.java
Box.jav
CaptureConversion.jav
Complex.jav
Foo.jav
InfReturn.jav
InfReturnII.jav
InnerInf.jav
Iteration.jav
List.jav
Overloading.jav
Pair.jav
RecursionCond.jav
StreamTest.jav
Test.jav
TripleTest.jav
Twice2.jav
UseWildcardPair.jav
bytecode
insertGenerics
packageTest
syntaxtreegenerator
src
.gitignore
README_aktuelle_Branches
pom.xml
47 lines
720 B
Java
47 lines
720 B
Java
import java.lang.Boolean;
|
|
import java.lang.Object;
|
|
|
|
class List {
|
|
elem;
|
|
next;
|
|
|
|
List() {
|
|
super();
|
|
}
|
|
|
|
List(elem, next) {
|
|
this.elem = elem;
|
|
this.next = next;
|
|
}
|
|
|
|
addElement(newElem) {
|
|
return new List(newElem, this);
|
|
}
|
|
|
|
append(l) {
|
|
if (next == null) {
|
|
return l;
|
|
}
|
|
else {
|
|
return new List(elem, next.append(l));
|
|
}
|
|
}
|
|
/*
|
|
addAll(l) {
|
|
var nextLoc = next;
|
|
while (//nextLoc != null
|
|
true) {
|
|
nextLoc = nextLoc.next;
|
|
}
|
|
nextLoc = l;
|
|
}
|
|
|
|
void m() {
|
|
List<? extends Object> l; // = new List<Integer>(1, null);
|
|
List<? extends Object> l2; // = new List<String>("SSS", null);
|
|
l.addAll(l2);
|
|
}
|
|
*/
|
|
}
|
|
|