参考Generic type parameter naming convention for Java

按照惯例, 类型变量(泛型)的命名采用单个大写字母。这是为了区分普通变量名和泛型变量名。
常见的泛型命名有:

E - Element (used extensively by the Java Collections Framework)
K - Key
N - Number
T - Type
V - Value
S, U, V etc. - 2nd, 3rd, 4th types
R - Result
A - Accumulator

相关文章:

猜你喜欢
  • 2022-12-23
  • 2021-12-16
  • 2021-08-11
  • 2021-11-20
相关资源
相似解决方案