泛型命名规范

参考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

posted @ 2019-12-04 16:44  lllunaticer  阅读(1103)  评论(0编辑  收藏  举报