• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

capacity method

 
Tapan Maru
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Martin Vajsar
Sheriff
Pie
Posts: 3747
62
Chrome Netbeans IDE Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not all collection implementations have a capacity. A LinkedList, for example, hasn't.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic