Class ManagedSet<E>
- java.lang.Object
- java.util.AbstractCollection<E>
- java.util.AbstractSet<E>
- java.util.HashSet<E>
- java.util.LinkedHashSet<E>
- org.springframework.beans.factory.support.ManagedSet<E>
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<E>
,Collection<E>
,Set<E>
,BeanMetadataElement
,Mergeable
public class ManagedSet<E> extends LinkedHashSet<E> implements Mergeable, BeanMetadataElement
Tag collection class used to hold managed Set values, which may include runtime bean references (to be resolved into bean objects).- Since:
- 21.01.2004
- Author:
- Juergen Hoeller, Rob Harrop
- See Also:
- Serialized Form
Constructor Summary
Constructors Constructor Description ManagedSet()
ManagedSet(int initialCapacity)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getElementTypeName()
Return the default element type name (class name) to be used for this set.Object
getSource()
Return the configuration sourceObject
for this metadata element (may benull
).boolean
isMergeEnabled()
Is merging enabled for this particular instance?Set<E>
merge(Object parent)
Merge the current value set with that of the supplied object.void
setElementTypeName(String elementTypeName)
Set the default element type name (class name) to be used for this set.void
setMergeEnabled(boolean mergeEnabled)
Set whether merging should be enabled for this collection, in case of a 'parent' collection value being present.void
setSource(Object source)
Set the configuration sourceObject
for this metadata element.Methods inherited from class java.util.LinkedHashSet
spliterator
Methods inherited from class java.util.HashSet
add, clear, clone, contains, isEmpty, iterator, remove, size
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Constructor Detail
ManagedSet
public ManagedSet()
ManagedSet
public ManagedSet(int initialCapacity)
Method Detail
setSource
public void setSource(Object source)
Set the configuration sourceObject
for this metadata element.The exact type of the object will depend on the configuration mechanism used.
getSource
public Object getSource()
Description copied from interface:BeanMetadataElement
Return the configuration sourceObject
for this metadata element (may benull
).- Specified by:
getSource
in interfaceBeanMetadataElement
setElementTypeName
public void setElementTypeName(String elementTypeName)
Set the default element type name (class name) to be used for this set.
getElementTypeName
public String getElementTypeName()
Return the default element type name (class name) to be used for this set.
setMergeEnabled
public void setMergeEnabled(boolean mergeEnabled)
Set whether merging should be enabled for this collection, in case of a 'parent' collection value being present.
isMergeEnabled
public boolean isMergeEnabled()
Description copied from interface:Mergeable
Is merging enabled for this particular instance?- Specified by:
isMergeEnabled
in interfaceMergeable