IntelliJ IDEA警告Type parameter ‘T‘ hides visible type ‘org.apache.poi.ss.formula.functions.T‘

问题分析

由于我的代码里引入了org.apache.poi.ss.formula.functions.T类,该类名为T,导致了IDEA警告Type parameter 'T' hides visible type 'org.apache.poi.ss.formula.functions.T'问题,由于该T是一个具体的类型名称,不是泛型参数。

示例:

class T { // A concrete type T 
} 

interface B<T> { // warning: The type parameter T is hiding the type T 
} 

interface A<T> extends B<T> { // warning: The type parameter T is hiding the type T 
    T getObject(); 
} 

代码里有一个名为T类或接口,或者您使用的T作为具体类型名称,而不是某个地方作为一个类型参数,则会提示The type parameter T is hiding the type T

问题解决

只需要删除引入或自定义的具体类型名称为T的类或接口即可。

示例:

interface B<T> {
} 

interface A<T> extends B<T> {
    T getObject(); 
} 

参考文献:
1.疑难解答“类型参数T隐藏类型T”警告:http://www.uwenku.com/question/p-cezmltye-bda.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
org.apache.poi.hssf.util.CellRangeAddressApache POI库中的一个类,用于表示Excel单元格的区域范围。可以使用它来指定要操作的合并单元格的范围。 在使用这个类之前,你需要确保已经正确导入了POI库的相关类。根据你提供的引用内容,你可能遇到了导入类的问题。错误信息"The import org.apache.poi cannot be resolved"提示你无法解析org.apache.poi的导入,这通常是因为POI库没有正确添加到你的Java项目中。 要解决这个问题,首先确保你已经正确下载和导入了Apache POI库。然后,根据你使用的Java开发工具(如Eclipse、IntelliJ等),你需要将POI库添加到你的项目构建路径中。具体步骤可能会有所不同,但通常你需要在项目的构建路径或依赖项中添加POI库的jar文件。 一旦你正确导入了POI库,你就可以在你的代码中使用org.apache.poi.hssf.util.CellRangeAddress类来操作合并单元格了。通过创建CellRangeAddress对象,你可以指定要操作的合并单元格的起始行、结束行、起始列和结束列。 希望这些信息对你有帮助!如果你还有其他问题,请随时提问。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [org.apache.poi JAR包](https://download.csdn.net/download/u011075267/8825249)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [org.apache.poi jar包](https://download.csdn.net/download/vampire_ddd/10477496)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [导入Excel报错:org.apache.poi.util.RecordFormatException: Unhandled Continue Record followining class...](https://blog.csdn.net/xx_xyzz/article/details/124849020)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值