API文档中,分别代表什么意思

时间:2024-05-16 22:05:38

although they are all type parameters, the convention is:
E Element
T or S Type
K Key, as in <K, V>
V Value

? is the wildcard.

I guess this is mentioned in the API doc... looking for it...
Java Tutorial, Using Generic Types
http://java.sun.com/docs/books/tutorial/java/javaOO/gentypes.html

Type Parameter Conventions
You have already seen the angle bracket and single letter notation used to 
represent a type parameter. By convention, a type parameter is a single, 
uppercase letter — this allows easy identification and distinguishes a type 
parameter from a class name. The most common type parameters you will see are:

* <T> — Type
* <S> — for Type, when T is already in use
* <E> — Element (used extensively by the Java Collections Framework)
* <K> — Key
* <V> — Value
* <N> — Number