Top Description Fields Constructors Methods
org.springframework.beans.factory.support

public Class ManagedSet<E>

extends LinkedHashSet<E>
implements Mergeable, BeanMetadataElement
Class Inheritance
All Implemented Interfaces
org.springframework.beans.BeanMetadataElement, org.springframework.beans.Mergeable
Annotations
@SuppressWarnings:serial
Type Parameters
<E>
the element type
Imports
java.util.Collections, .LinkedHashSet, .Set, org.springframework.beans.BeanMetadataElement, .Mergeable, org.springframework.lang.Nullable

Tag collection class used to hold managed Set values, which may include runtime bean references (to be resolved into bean objects).
Authors
Juergen Hoeller, Rob Harrop, Stephane Nicoll, Sam Brannen
Since
21.01.2004

Field Summary

Modifier and TypeField and Description
private String
private boolean
private Object

Constructor Summary

AccessConstructor and Description
public
public
ManagedSet(int initialCapacity)

Method Summary

Modifier and TypeMethod and Description
public String
getElementTypeName()

Return the default element type name (class name) to be used for this set.

public Object
getSource()

Overrides default org.springframework.beans.BeanMetadataElement.getSource.

Return the configuration source Object for this metadata element (may be null).
public boolean
isMergeEnabled()

Implements org.springframework.beans.Mergeable.isMergeEnabled.

Is merging enabled for this particular instance?
public Set<E>
merge(Object
the object to merge with
parent
)

Implements org.springframework.beans.Mergeable.merge.

Merge the current value set with that of the supplied object.
public static <
the Set's element type
E
>
ManagedSet<E>

Returns:

a ManagedSet containing the specified elements
of
(E...
the elements to be contained in the set
elements
)

Hides java.util.Set.of, java.util.Set.of.

Create a new instance containing an arbitrary number of elements.
public void
setElementTypeName(String elementTypeName)

Set the default element type name (class name) to be used for this set.

public void
setMergeEnabled(boolean mergeEnabled)

Set whether merging should be enabled for this collection, in case of a 'parent' collection value being present.

public void
setSource(Object source)

Set the configuration source Object for this metadata element.

Inherited from java.util.LinkedHashSet:
addFirstaddLastgetFirstgetLastnewLinkedHashSetremoveFirstremoveLastreversedspliterator

Field Detail

elementTypeNameback to summary
private String elementTypeName
Annotations
@Nullable
mergeEnabledback to summary
private boolean mergeEnabled
sourceback to summary
private Object source
Annotations
@Nullable

Constructor Detail

ManagedSetback to summary
public ManagedSet()
ManagedSetback to summary
public ManagedSet(int initialCapacity)

Method Detail

getElementTypeNameback to summary
public String getElementTypeName()

Return the default element type name (class name) to be used for this set.

Annotations
@Nullable
getSourceback to summary
public Object getSource()

Overrides default org.springframework.beans.BeanMetadataElement.getSource.

Doc from org.springframework.beans.BeanMetadataElement.getSource.

Return the configuration source Object for this metadata element (may be null).

Annotations
@Override
@Nullable
isMergeEnabledback to summary
public boolean isMergeEnabled()

Implements org.springframework.beans.Mergeable.isMergeEnabled.

Doc from org.springframework.beans.Mergeable.isMergeEnabled.

Is merging enabled for this particular instance?

Annotations
@Override
mergeback to summary
public Set<E> merge(Object parent)

Implements org.springframework.beans.Mergeable.merge.

Doc from org.springframework.beans.Mergeable.merge.

Merge 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.

Parameters
parent:Object

the object to merge with

Returns:Set<E>

the result of the merge operation

Annotations
@Override
@SuppressWarnings:unchecked
ofback to summary
public static <E> ManagedSet<E> of(E... elements)

Hides java.util.Set.of, java.util.Set.of.

Create a new instance containing an arbitrary number of elements.

Parameters
<E>
the Set's element type
elements:E[]

the elements to be contained in the set

Returns:ManagedSet<E>

a ManagedSet containing the specified elements

Annotations
@SafeVarargs
@SuppressWarnings:varargs
Since
5.3.16
setElementTypeNameback to summary
public void setElementTypeName(String elementTypeName)

Set the default element type name (class name) to be used for this set.

setMergeEnabledback to summary
public void setMergeEnabled(boolean mergeEnabled)

Set whether merging should be enabled for this collection, in case of a 'parent' collection value being present.

setSourceback to summary
public void setSource(Object source)

Set the configuration source Object for this metadata element.

The exact type of the object will depend on the configuration mechanism used.