Class ImmutableMap.Builder<K,V> 
java.lang.Object
software.amazon.awssdk.utils.ImmutableMap.Builder<K,V> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionallowDuplicateKeys(boolean allowDuplicateKeys) Sets whether duplicate keys are allowed.build()Generates and returns a new ImmutableMap instance which contains all the entries added into the Builder byput()method.Add a key-value pair into the built map.
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
putAdd a key-value pair into the built map. The method will throw IllegalArgumentException immediately when duplicate keys are provided and allowDuplicateKeys is false (default value). If duplicate keys are provided and allowDuplicateKeys is true, the latest value will overwrite the existing value, and the SDK will log a message at WARN level.- Returns:
- Returns a reference to this object so that method calls can be chained together.
 
- 
allowDuplicateKeysSets whether duplicate keys are allowed. If true, the latest value will overwrite the existing value. If false, an error will be thrown when attempting to put an entry with a duplicate key. Default value is false.- Returns:
- Returns a reference to this object so that method calls can be chained together.
 
- 
buildGenerates and returns a new ImmutableMap instance which contains all the entries added into the Builder byput()method.
 
-