generic parameter

noun
UK /dʒəˈnɛrɪk pəˈræmɪtə/
US /dʒəˈnɛrɪk pəˈræmɪtər/

A generic parameter is a placeholder name in code that gets filled in with a real type later.

In the class Box<T>, the letter T is a generic parameter that can stand for any type.


OTHER MEANINGS

2. A parameter in a generic function that lets the same code work with many different data types.

The function sort<T>(list: T[]) uses a generic parameter so it can sort numbers or words.

3. A symbol declared in angle brackets that a compiler replaces with a concrete type.

List<String> fills the generic parameter E of List<E> with String.

4. A stand-in for a type in a generic class or method, chosen by the programmer when using it.

Map<K, V> has two generic parameters, K for keys and V for values.