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

public Class ManagedMap<K, V>

extends LinkedHashMap<K, V>
implements Mergeable, BeanMetadataElement
Class Inheritance
All Implemented Interfaces
org.springframework.beans.BeanMetadataElement, org.springframework.beans.Mergeable
Annotations
@SuppressWarnings:serial
Type Parameters
<K>
the key type
<V>
the value type
Imports
java.util.LinkedHashMap, .Map, .Map.Entry, org.springframework.beans.BeanMetadataElement, .Mergeable, org.springframework.lang.Nullable

Tag collection class used to hold managed Map values, which may include runtime bean references (to be resolved into bean objects).
Authors
Juergen Hoeller, Rob Harrop
Since
27.05.2003

Field Summary

Modifier and TypeField and Description
private String
private boolean
private Object
private String

Constructor Summary

AccessConstructor and Description
public
public
ManagedMap(int initialCapacity)

Method Summary

Modifier and TypeMethod and Description
public String
getKeyTypeName()

Return the default key type name (class name) to be used for this map.

public Object
getSource()

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

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

public String
getValueTypeName()

Return the default value type name (class name) to be used for this map.

public boolean
isMergeEnabled()

Implements org.springframework.beans.Mergeable.isMergeEnabled.

Is merging enabled for this particular instance?

public Object
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 Map's key type
K
,
the Map's value type
V
>
ManagedMap<K, V>

Returns:

a Map containing the specified mappings
ofEntries
(Map.Entry<? extends K, ? extends V>...
Map.Entrys containing the keys and values from which the map is populated
entries
)

Hides java.util.Map.ofEntries.

Return a new instance containing keys and values extracted from the given entries.

public void
setKeyTypeName(String keyTypeName)

Set the default key type name (class name) to be used for this map.

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.

public void
setValueTypeName(String valueTypeName)

Set the default value type name (class name) to be used for this map.

Inherited from java.util.LinkedHashMap:
clearcontainsValueentrySetforEachgetgetOrDefaultkeySetnewLinkedHashMapputFirstputLastremoveEldestEntryreplaceAllreversedsequencedEntrySetsequencedKeySetsequencedValuesvalues

Field Detail

keyTypeNameback to summary
private String keyTypeName
Annotations
@Nullable
mergeEnabledback to summary
private boolean mergeEnabled
sourceback to summary
private Object source
Annotations
@Nullable
valueTypeNameback to summary
private String valueTypeName
Annotations
@Nullable

Constructor Detail

ManagedMapback to summary
public ManagedMap()
ManagedMapback to summary
public ManagedMap(int initialCapacity)

Method Detail

getKeyTypeNameback to summary
public String getKeyTypeName()

Return the default key type name (class name) to be used for this map.

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
getValueTypeNameback to summary
public String getValueTypeName()

Return the default value type name (class name) to be used for this map.

Annotations
@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 Object 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:Object

the result of the merge operation

Annotations
@Override
@SuppressWarnings:unchecked
ofEntriesback to summary
public static <K, V> ManagedMap<K, V> ofEntries(Map.Entry<? extends K, ? extends V>... entries)

Hides java.util.Map.ofEntries.

Return a new instance containing keys and values extracted from the given entries. The entries themselves are not stored in the map.

Parameters
<K>
the Map's key type
<V>
the Map's value type
entries:Map.Entry<? extends K, ? extends V>[]

Map.Entrys containing the keys and values from which the map is populated

Returns:ManagedMap<K, V>

a Map containing the specified mappings

Annotations
@SafeVarargs
@SuppressWarnings:unchecked
Since
5.3.16
setKeyTypeNameback to summary
public void setKeyTypeName(String keyTypeName)

Set the default key type name (class name) to be used for this map.

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.

setValueTypeNameback to summary
public void setValueTypeName(String valueTypeName)

Set the default value type name (class name) to be used for this map.