wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes What is this declaration? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What is this declaration?" Watch "What is this declaration?" New topic
Author

What is this declaration?

Dan Nugent
Greenhorn

Joined: Jan 11, 2008
Posts: 2
Could you please help me read this and explain what it does?

public void buildPDFWindow(Collection<PdfPTable> windowList, etc...

Thank you
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by Dan Nugent:
Could you please help me read this and explain what it does?

public void buildPDFWindow(Collection<PdfPTable> windowList, etc...

Thank you


It is a method definition that accepts a Collection of PdfTable objects and obviously other arguments according to your , etc. Defining the type of object a Collection accepts as in <PdfTable> is called Generics and it was added to Java in 1.5. When the source is compiled the compiler will check that only PdfTable objects have been added to any Collection defined this way.


GenRocket - Experts at Building Test Data
 
GeeCON Prague 2014
 
subject: What is this declaration?