Class AutoPopulatingList<E>

java.lang.Object
org.springframework.util.AutoPopulatingList<E>
Type Parameters:
E - the element type
All Implemented Interfaces:
Serializable, Iterable<E>, Collection<E>, List<E>

public class AutoPopulatingList<E> extends Object implements List<E>, Serializable
Simple List wrapper class that allows for elements to be automatically populated as they are requested. This is particularly useful for data binding to Lists, allowing for elements to be created and added to the List in a "just in time" fashion.

Note: This class is not thread-safe. To create a thread-safe version, use the Collections.synchronizedList(java.util.List<T>) utility methods.

Inspired by LazyList from Commons Collections.

Since:
2.0
Author:
Rob Harrop, Juergen Hoeller
See Also: