This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Could anyone be kind enough to elaborate on the concept of Enumeration? Your help will be greatly appreciated.
Joined: Nov 22, 2008
When I think of enumeration, I think of traversing the contents of a collection. Enumeration and Iteratation are an abstraction such that you don't have to worry about the collection's underlying structure. For instance, traversing a Vector is easy to manage because it's implemented as a dynamic array and, as such, you can use an index. But, to walk a linked list or a set, things are a bit different... Using Java's enumeration/iteration abstraction, you can use a common interface to traverse various types of collections.