作者silver8250 ((阿信))
看板java
标题Re: [问题] generic type parameter bound?
时间Fri May 1 12:23:05 2009
我猜你说得是像 List<String[]> myList
至於什麽情况会用到 要看个人
我是用在读取某个档案,档案内容的每一行长度都一样的时候
但是档案内容行数不固定的情况下~
给你参考~
※ 引述《Senkousha ( )》之铭言:
: 在 eclipse jdt 的 document 里面看到这个:
: http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/dom/TypeParameter.html
: http://tinyurl.com/TypeParameter
: 底下的 typeBounds list ,据我的理解是在 type declaration 里面
: 宣告 generic type parameter 时可以用的
: 如:
: class Test<SomeType extends TypeBound0 & TypeBound1>
: 可是後面的注解黄字部份让我觉得很奇怪:
: Returns the live ordered list of type bounds of this type parameter.
: For the type parameter to be plausible, there can be at most one class
: in the list, and it must be first, and the remaining ones must be
: interfaces; the list should not contain primitive types
: (but array types and parameterized types are allowed).
: type bound 可以放 array type 吗? :Q
: 在什麽情况下可以放呢?
--
我是活在角落的一个 programmer
http://silver8250.blogspot.com/
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.115.156.8