*
The moose likes Beginning Java and the fly likes Collection Frameworks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Collection Frameworks" Watch "Collection Frameworks" New topic
Author

Collection Frameworks

lavanya Ananth
Ranch Hand

Joined: Apr 04, 2005
Posts: 40
I was reading the book 'Effective Java Programming Language' and There was topic on static factories. I could not understand the disadvantage of using them given below :

It is impossible to subclass any of the convenience implemetaion classes in the Collections Framework.

What are the convenience implementation classes?

Pls explain.

Thanks
Lavanya
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by lavanya Ananth:
... What are the convenience implementation classes? ...

Since the topic was "static factories," I assume this refers to the Collections class. This class "consists exclusively of static methods that operate on or return collections." The Collections class (not to be confused with the Collection interface) cannot be extended (or instantiated) because its constructor is private.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
lavanya Ananth
Ranch Hand

Joined: Apr 04, 2005
Posts: 40
Thanks Marc...

I did get confused with Collection interface. Thanks for pointing it out.
Your reply was very helpful now that I can move along reading the book.
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

It's kind of like the Arrays class. (Note the "s" on the end, as with the Collections class.)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Collection Frameworks