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>
- Type Parameters:
- E- the element type
- All Implemented Interfaces:
- Serializable,- Cloneable,- Iterable<E>,- Collection<E>,- Set<E>,- BeanMetadataElement,- Mergeable
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, Stephane Nicoll, Sam Brannen
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturn the default element type name (class name) to be used for this set.Return the configuration sourceObjectfor this metadata element (may benull).booleanIs merging enabled for this particular instance?Merge the current value set with that of the supplied object.static <E> ManagedSet<E>of(E... elements) Create a new instance containing an arbitrary number of elements.voidsetElementTypeName(@Nullable String elementTypeName) Set the default element type name (class name) to be used for this set.voidsetMergeEnabled(boolean mergeEnabled) Set whether merging should be enabled for this collection, in case of a 'parent' collection value being present.voidSet the configuration sourceObjectfor this metadata element.Methods inherited from class java.util.LinkedHashSetspliteratorMethods inherited from class java.util.HashSetadd, clear, clone, contains, isEmpty, iterator, remove, size, toArray, toArrayMethods inherited from class java.util.AbstractSetequals, hashCode, removeAllMethods inherited from class java.util.AbstractCollectionaddAll, containsAll, retainAll, toStringMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.CollectionparallelStream, removeIf, stream, toArray
- 
Constructor Details- 
ManagedSetpublic ManagedSet()
- 
ManagedSetpublic ManagedSet(int initialCapacity) 
 
- 
- 
Method Details- 
ofCreate a new instance containing an arbitrary number of elements.- Type Parameters:
- E- the- Set's element type
- Parameters:
- elements- the elements to be contained in the set
- Returns:
- a ManagedSetcontaining the specified elements
- Since:
- 5.3.16
 
- 
setSourceSet the configuration sourceObjectfor this metadata element.The exact type of the object will depend on the configuration mechanism used. 
- 
getSourceDescription copied from interface:BeanMetadataElementReturn the configuration sourceObjectfor this metadata element (may benull).- Specified by:
- getSourcein interface- BeanMetadataElement
 
- 
setElementTypeNameSet the default element type name (class name) to be used for this set.
- 
getElementTypeNameReturn the default element type name (class name) to be used for this set.
- 
setMergeEnabledpublic void setMergeEnabled(boolean mergeEnabled) Set whether merging should be enabled for this collection, in case of a 'parent' collection value being present.
- 
isMergeEnabledpublic boolean isMergeEnabled()Description copied from interface:MergeableIs merging enabled for this particular instance?- Specified by:
- isMergeEnabledin interface- Mergeable
 
- 
mergeDescription copied from interface:MergeableMerge the current value set with that of the supplied object.The supplied object is considered the parent, and values in the callee's value set must override those of the supplied object. 
 
-