forked from JavaTX/JavaCompilerCore
26 lines
394 B
Plaintext
26 lines
394 B
Plaintext
|
import java.util.Vector;
|
||
|
import java.lang.Boolean;
|
||
|
|
||
|
class Pair<U, T> {
|
||
|
U a;
|
||
|
T b;
|
||
|
|
||
|
make(x) {
|
||
|
var ret = new Pair<>();
|
||
|
ret.a = x.elementAt(0);
|
||
|
ret.b = x.elementAt(1);
|
||
|
return ret;
|
||
|
}
|
||
|
/*
|
||
|
compare(p) {
|
||
|
|
||
|
return p.a = p.b;
|
||
|
}
|
||
|
|
||
|
void m(Pair<?, ?> p, List<? extends Eq> b)
|
||
|
{
|
||
|
//this.compare(p); //1, type incorrect
|
||
|
this.compare(this.make(b)); //2, OK
|
||
|
}
|
||
|
*/
|
||
|
}
|