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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "capacity method" Watch "capacity method" New topic

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
Martin Vajsar

Joined: Aug 22, 2010
Posts: 3606

Not all collection implementations have a capacity. A LinkedList, for example, hasn't.
I agree. Here's the link: http://aspose.com/file-tools
subject: capacity method
Similar Threads
ArrayList vs Vector Size and Capacity difference ?
capacity of a stringbuffer
the capacity() method
Local Inner Class: Quick Question.
BigDecimal nextProbablePrime(). HashMap initial capacity