Iterator iter = mySomeKindOfList.myListIterator ( );
Sunday, October 28, 2007
Iterator for Collection and Nested Class
When we are creating an Iterator for a class, we are actually calling
on the nested/inner class maybe. If the iterator is inside the main class,
it makes perfect sense to put the iterator there with its hasNext(), hasElement(),
initIterator(), and other methods...
So we create an iterator like this and looks like a method call but it's a call
on the nested class...
Subscribe to:
Post Comments (Atom)
Just some daily notes ...
Things I'm into now...
Blog Archive
-
▼
2007
(29)
-
▼
October
(15)
- Deconstructing a Scheme recursive function and imp...
- Anasi Boys
- Iterator for Collection and Nested Class
- The Uninvited!
- Inheritence and PolyMorphIsm
- Iterator Example
- Java Library ArrayList
- Inserting into an array non-destructively
- Singly linked list operations...
- PascalTriangles once more!
- Sieve of Erotosthenes
- Linked List Constructor Functionality Testing
- The Linked List Maker method
- Simple Linked List operations
- Old blogs before Day 0.
-
▼
October
(15)
No comments:
Post a Comment