Chapter 7. Iterator Pattern


In This Chapter

Understanding the Problems with Iteration 95

Understanding Iterator Elements 97

Using Iterators 101

Using Null Iterators 102

Summary 102

Nearly every application uses collections. A collection is simply a group of organized data. ActionScript has lots of collections including standard types such as arrays and associative arrays as well as more sophisticated collections such as multidimensional arrays and custom collection data types. When working with collections, you will naturally need to access the elements of that collection. The Iterator pattern described in this chapter does all that while avoiding some of the pitfalls that other approaches to data access might present.




Advanced ActionScript 3 with Design Patterns
Advanced ActionScript 3 with Design Patterns
ISBN: 0321426568
EAN: 2147483647
Year: 2004
Pages: 132

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net