Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Java Tip 38: The trick to "Iterator Observers"

Factor out common code and make your Iterators observable

  • Print
  • Feedback

Page 4 of 4

  • When more than one object is updated by the elements retrieved from an Iterator.

  • When the same iterator client code is duplicated throughout a system.

  • When encapsulating different Iterator syntax in adaptors that provide an Iterate() method.

  • When encapsulating access to queries on persistent data or from remote objects.


  • Print
  • Feedback

Resources