3
的JavaDoc的说:为什么TableCloumn <S,T>需要2个元素?
Type Parameters:
S - The type of the TableView generic type (i.e. S == TableView<S>)
T - The type of the content in all cells in this TableColumn.
什么是 “通用型” 在这种情况下呢?如果内容是一个字符串,泛型类型也是一个字符串,不是吗?
我试图编译下面的代码以一个字符串:
TableColumn col = new TableColumn<?, String>();
public void append(String str) {
col.add(str);
}
为什么我没有能够做到这一点?
您想使用此TableColumn的一个的TableView内,使用父视图的泛型类型。 – Kostronor