aspose file tools*
The moose likes Java in General and the fly likes capacity method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "capacity method" Watch "capacity method" New topic
Author

capacity method

Tapan Maru
Ranch Hand

Joined: May 08, 2006
Posts: 65
Vector class in java has capacity method. My question is why it is not in any generic class like AbstractCollection so that any collection class can call that method to check current capacity?


Tapan Maru
tapanmaru@gmail.com
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

Not all collection implementations have a capacity. A LinkedList, for example, hasn't.
 
wood burning stoves
 
subject: capacity method