因此,我有以下想法:
public class Enclosing<T extends Comparable<T>> {
// non-relevant code snipped
public class Inner {
private T value;
public Inner(T t) {
value = t;
}
}
}
一切汇编,全世界都感到高兴。 然而,每当我试图创建一个<代码>披露的事例时。 内部代码>如下:
new Enclosing<Integer>.Inner(5);
The following error happens:
Cannot distribution the member category
Enclosing<Integer>.Inner
using a paraileized compounds name; use its summary name and an enclosing instance of categoryEnclosing<Integer>
.
必须指出,我无法使内班<代码>static成为一门,因为它包含一个类型的<代码>。 T。
How can I work around this?