Utility class for a list with dynamically added contents.
LazyList wraps around a standard ArrayList and ensures that any get() activity which returns a null
value will return a freshly instantiated item instead.
This class should allow the Component Builder framework to function well within a form-based UI, where child components are added / removed at the web page level.
This class is similar in intent to the Apache commons-collections version, but my implementation differs in the following ways:
- Simplified layers of abstraction.
- Eliminated overhead of Factory boilerplate to instantiate new items. Classes can just be instantiated through the basic no-arg constructor.
- Interim positions are also instantiated when an index beyond the size of the list is requested.
@author Brian Uri!
@since 1.9.0