The next part of this chapter is based on Eclipse PDT 2.0 in Windows. However, you can use these steps for a standard Eclipse installation as the feature set is common to the core Eclipse distribution. If you use a different IDE and have never tried out PDT, I suggest that you try it out now with this next tutorial. You can acquire the newest PDT package from http://zend.com/pdt. If you continue to use a different IDE, you may be able to adapt these steps to fit your own IDE. (Perhaps you may even want to write these up in your own technical blog!)
One useful feature in Eclipse PDT is the code snippets function. Snippets allow code templates to be created and inserted into your current file. These can range from a simple code comment template to a complex set of function definitions for a reusable interface.
For this example, we're going to use the SPL Iterator interface. As you build your own library of Design Pattern based modules, you may find you will need to create more code snippets.
When implementing the Iterator interface, five methods are required to be part of your object: current(), key(),