Re: [問題] generic type parameter bound?
我猜你說得是像 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
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 8 篇):