首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用CellList<String>对象作为CellList<String>构造函数的参数实例化TextCell对象?

如何使用CellList<String>对象作为CellList<String>构造函数的参数实例化TextCell对象?
EN

Stack Overflow用户
提问于 2014-03-18 17:13:30
回答 1查看 71关注 0票数 0

这是GWT Javadoc迷你教程中代码的样子:

代码语言:javascript
复制
TextCell textCell = new TextCell();
CellList<String> cellList = new CellList<String>(textCell);

我问这个问题是因为我看不到TextCell和它与CellList构造函数需求之间的任何关系,因此,我看不出textCell如何满足CelList需求。

CellList构造函数是:

代码语言:javascript
复制
CellList(Cell<T> cell)
Construct a new CellList.
CellList(Cell<T> cell, CellList.Resources resources)
Construct a new CellList with the specified CellList.Resources.
CellList(Cell<T> cell, CellList.Resources resources, ProvidesKey<T> keyProvider)
Construct a new CellList with the specified CellList.Resources and key provider.
CellList(Cell<T> cell, ProvidesKey<T> keyProvider)
Construct a new CellList with the specified key provider.

我的问题主要是了解这是如何工作的,如果你们能告诉我哪个Java或OOP主题可以详细解释这一点。

谢谢。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-03-18 17:17:13

TextCell只是实现了Cell<String>http://www.gwtproject.org/javadoc/latest/com/google/gwt/cell/client/TextCell.html

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22486383

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档