generics: <E>, <K>, ...

T

Timo Nentwig

Hi!

Tiger's sources contain lots of generics like <E> but there's no class E
defined. What are those generics about?

Timo
 
C

Chris Smith

Timo said:
Tiger's sources contain lots of generics like <E> but there's no class E
defined. What are those generics about?

Looks to me like those are parameterized type names; they fill in for
the real generic type parameters, so they aren't supposed to be existing
classes.

Just a guess.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
M

mromarkhan

Timo said:
Hi!

Tiger's sources contain lots of generics like <E> but there's no class E
defined. What are those generics about?

Timo

Peace be unto you.
Just a naming convention (a nomenclature, if you like)
for the formal type parameters.
E is for element
K is for keys
....S is for cases where T is used
T is for type variables
U... is for cases where T is used
V is for values
? is for unknown type
& is for multiple bounds

Have a good day.

-- References (pdf)
Gilad Bracha covers the use of
generics in j2se 1.5 (Tiger, if you like)
http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Generics Amanuensis? 2
Generics 24
Generic generics help 7
generics puzzle 57
incremental generic association 3
More Generics warnings. 5
E, T and V in Generics Syntax 3
Generics the way of the future? 10

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top