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>, SequencedCollection<E>
@Deprecated(since="7.1",
forRemoval=true)
public class AutoPopulatingList<E>
extends Object
implements List<E>, Serializable
Deprecated, for removal: This API element is subject to removal in a future version.
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(List) utility methods.
Inspired by LazyList from Commons Collections.
- Since:
- 2.0
- Author:
- Rob Harrop, Juergen Hoeller
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated, for removal: This API element is subject to removal in a future version.as of 7.1, along withAutoPopulatingList; to be removed in 8.0static classDeprecated, for removal: This API element is subject to removal in a future version.as of 7.1, along withAutoPopulatingList; to be removed in 8.0 -
Constructor Summary
ConstructorsConstructorDescriptionAutoPopulatingList(Class<? extends E> elementClass) Deprecated, for removal: This API element is subject to removal in a future version.Creates a newAutoPopulatingListthat is backed by a standardArrayListand adds new instances of the suppliedelement Classto the backingListon demand.AutoPopulatingList(List<E> backingList, Class<? extends E> elementClass) Deprecated, for removal: This API element is subject to removal in a future version.Creates a newAutoPopulatingListthat is backed by the suppliedListand adds new instances of the suppliedelement Classto the backingListon demand.AutoPopulatingList(List<E> backingList, AutoPopulatingList.ElementFactory<E> elementFactory) Deprecated, for removal: This API element is subject to removal in a future version.Creates a newAutoPopulatingListthat is backed by the suppliedListand creates new elements on demand using the suppliedAutoPopulatingList.ElementFactory.AutoPopulatingList(AutoPopulatingList.ElementFactory<E> elementFactory) Deprecated, for removal: This API element is subject to removal in a future version.Creates a newAutoPopulatingListthat is backed by a standardArrayListand creates new elements on demand using the suppliedAutoPopulatingList.ElementFactory. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanaddAll(int index, Collection<? extends E> c) Deprecated, for removal: This API element is subject to removal in a future version.booleanaddAll(Collection<? extends E> c) Deprecated, for removal: This API element is subject to removal in a future version.voidclear()Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleancontainsAll(Collection<?> c) Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.get(int index) Deprecated, for removal: This API element is subject to removal in a future version.Get the element at the supplied index, creating it if there is no element at that index.inthashCode()Deprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.booleanisEmpty()Deprecated, for removal: This API element is subject to removal in a future version.iterator()Deprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.listIterator(int index) Deprecated, for removal: This API element is subject to removal in a future version.remove(int index) Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanremoveAll(Collection<?> c) Deprecated, for removal: This API element is subject to removal in a future version.booleanretainAll(Collection<?> c) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.intsize()Deprecated, for removal: This API element is subject to removal in a future version.subList(int fromIndex, int toIndex) Deprecated, for removal: This API element is subject to removal in a future version.Object[]toArray()Deprecated, for removal: This API element is subject to removal in a future version.<T> T[]toArray(T[] a) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Constructor Details
-
AutoPopulatingList
Deprecated, for removal: This API element is subject to removal in a future version.Creates a newAutoPopulatingListthat is backed by a standardArrayListand adds new instances of the suppliedelement Classto the backingListon demand. -
AutoPopulatingList
Deprecated, for removal: This API element is subject to removal in a future version.Creates a newAutoPopulatingListthat is backed by the suppliedListand adds new instances of the suppliedelement Classto the backingListon demand. -
AutoPopulatingList
Deprecated, for removal: This API element is subject to removal in a future version.Creates a newAutoPopulatingListthat is backed by a standardArrayListand creates new elements on demand using the suppliedAutoPopulatingList.ElementFactory. -
AutoPopulatingList
Deprecated, for removal: This API element is subject to removal in a future version.Creates a newAutoPopulatingListthat is backed by the suppliedListand creates new elements on demand using the suppliedAutoPopulatingList.ElementFactory.
-
-
Method Details
-
add
-
add
-
addAll
Deprecated, for removal: This API element is subject to removal in a future version. -
addAll
Deprecated, for removal: This API element is subject to removal in a future version. -
clear
-
contains
-
containsAll
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceList<E>
-
get
-
indexOf
-
isEmpty
-
iterator
-
lastIndexOf
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
lastIndexOfin interfaceList<E>
-
listIterator
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
listIteratorin interfaceList<E>
-
listIterator
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
listIteratorin interfaceList<E>
-
remove
-
remove
-
removeAll
Deprecated, for removal: This API element is subject to removal in a future version. -
retainAll
Deprecated, for removal: This API element is subject to removal in a future version. -
set
-
size
-
subList
-
toArray
-
toArray
-
equals
-
hashCode
-
DataBinder.setAutoGrowNestedPaths(boolean)andDataBinder.setAutoGrowCollectionLimit(int)