| java.lang.Object org.springframework.util.AutoPopulatingList
AutoPopulatingList | public class AutoPopulatingList implements List(Code) | | Simple
List wrapper class that allows for elements to be
automatically populated as they are requested. This is particularly
useful for data binding to
List 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
java.util.Collections.synchronizedList utility methods.
Inspired by LazyList from Commons Collections.
author: Rob Harrop author: Juergen Hoeller since: 2.0 |
Inner Class :public interface ElementFactory | |
Inner Class :public static class ElementInstantiationException extends RuntimeException | |
Constructor Summary | |
public | AutoPopulatingList(Class elementClass) Creates a new AutoPopulatingList that is backed by a standard
ArrayList and adds new instances of the supplied
Class element Class to the backing
List on demand. | public | AutoPopulatingList(List backingList, Class elementClass) Creates a new AutoPopulatingList that is backed by the supplied
List and adds new instances of the supplied
Class element Class to the backing
List on demand. | public | AutoPopulatingList(ElementFactory elementFactory) Creates a new AutoPopulatingList that is backed by a standard
ArrayList and creates new elements on demand using the supplied
ElementFactory . | public | AutoPopulatingList(List backingList, ElementFactory elementFactory) Creates a new AutoPopulatingList that is backed by the supplied
List and creates new elements on demand using the supplied
ElementFactory . |
AutoPopulatingList | public AutoPopulatingList(Class elementClass)(Code) | | Creates a new AutoPopulatingList that is backed by a standard
ArrayList and adds new instances of the supplied
Class element Class to the backing
List on demand.
|
AutoPopulatingList | public AutoPopulatingList(List backingList, Class elementClass)(Code) | | Creates a new AutoPopulatingList that is backed by the supplied
List and adds new instances of the supplied
Class element Class to the backing
List on demand.
|
AutoPopulatingList | public AutoPopulatingList(ElementFactory elementFactory)(Code) | | Creates a new AutoPopulatingList that is backed by a standard
ArrayList and creates new elements on demand using the supplied
ElementFactory .
|
AutoPopulatingList | public AutoPopulatingList(List backingList, ElementFactory elementFactory)(Code) | | Creates a new AutoPopulatingList that is backed by the supplied
List and creates new elements on demand using the supplied
ElementFactory .
|
clear | public void clear()(Code) | | |
get | public Object get(int index)(Code) | | Get the element at the supplied index, creating it if there is
no element at that index.
|
hashCode | public int hashCode()(Code) | | |
isEmpty | public boolean isEmpty()(Code) | | |
subList | public List subList(int fromIndex, int toIndex)(Code) | | |
|
|