Because we'd like our Lists to be generic in the type of element they contain, we'd like our static factory method to take an argument of type variable t and return an instance of List.
因为我们希望List成为其所包含的元素类型的泛型,所以希望静态factory方法带有类型变量t这一参数并返回List的实例。
As you can see the type of the class variables is generic, but you can improve the generator to understand if a variable should contain a number or a function.
如你所见,类的成员变量的类型是通用类型,但是你可以改进产生器,使之知道一个变量应该包含一个数字或一个函数。
应用推荐